Bug 188349

Summary: www/mod_php5: PHP scripts report massively errors about non-existent function calls
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description O. Hartmann 2014-04-07 15:30:00 UTC
Since the extraction and creation of www/mod_php5 and a subsequent update of the ports, including installing www/mod_php5 (also recompilation of ALL installed php modules including lang/php5 itself with most recent ports tree) results in mostly every php-backed script installed on all Apache 2.4 servers we use with function calls not resolved! It seems that some inclusion is missing somewhere but I'm incapable of tracking it down.

The ports/clients involved, for instance, are:

textproc/refdb:
Fatal error: Call to undefined function session_start() in /usr/local/share/refdb/www/index.php on line 43
(www/php5-session is installed!)

devel/websvn:
Fatal error: Call to undefined function xml_parser_create() in /usr/local/www/websvn/include/svnlook.php on line 1143
(textproc/php5-xml is installed and has been recompiled/updated)

net/phpldapadmin:
Notice: Undefined variable: _SESSION in /usr/local/www/phpldapadmin/lib/page.php on line 379

Fatal error: Call to a member function getValue() on a non-object in /usr/local/www/phpldapadmin/lib/page.php on line 379

databases/phppgadmin:
Fatal error: Call to undefined function session_name() in /usr/local/www/phpPgAdmin/libraries/lib.inc.php on line 55

How-To-Repeat: Update www/mod_php5 as requested in UPDATING tag 20140327
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-04-07 15:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2014-04-11 09:57:31 UTC
State Changed
From-To: open->closed

You have to build php with ZTS enabled (and rebuild all extensions).
Comment 3 O. Hartmann 2014-04-11 10:26:46 UTC
The problem was caused by the update and installation of www/mod_php5. Since I use a
threaded Apache and follwoing the recommendation of enabling option ZTS in php5-5.4, I
didn't so in www/mod_php5. This lead to an incosisntency.

Having option ZTS enabled in both lang/php5 AND www/mod_php5, rebuilding for security
purposes ALL php5 ports again (including mod_php5), removing etc/php/extensions.ini also,
restarting then apache24 after all installations has been performed, resolved the
problem. The last steps removing extensions.ini might be overkill but I wanted to ensure
that everything is in the correct place.

Please close thir PR.