From: Operating system: Windows 2008 R2 PHP version: 5.3.5 Package: Apache2 related Bug Type: Bug Bug description:Upgrade breaks Apache config
Description: ------------ This happens basically everytime PHP is upgraded by simply executing the windows installer. The problem is that the apache config is modified (which is reallt not even neccesary in a minor upgrade), in a way that breaks apache. This is what gets added: #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir "" LoadModule php5_module "php5apache2_2.dll" #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL This is plain WRONG, because this piece of config assumes php5apache2_2.dll to be in apache's installation directory, which it isn't. The installer installs it in "C:\Program Files (x86)\PHP", which is a totally different directory, obviously. This problem produces two consecutive errors in the event log, upon starting Apache: >>> httpd.exe: Syntax error on line 426 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php5apache2_2.dll into server: The specified module could not be fo . >>> und. . The solution is to include the path to the dll, like so: LoadModule php5_module "C:/Program Files (x86)/PHP/php5apache2_2.dll" This should (can can) be handled by the installer. Also, second error is the PHPIniDir. It shouldn't be empty. That's WRONG as well, and produces the following error: >>> PHPINIDir takes one argument, Directory containing the php.ini file . Why on earth would the installer produce such errors in the apache conf?? The solution, again, is to simply include the path to where php.ini has been put, which is almost always the installation dir: PHPIniDir "C:/Program Files (x86)/PHP/" -- Edit bug report at http://bugs.php.net/bug.php?id=53721&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53721&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53721&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53721&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53721&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53721&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53721&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53721&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53721&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53721&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53721&r=support Expected behavior: http://bugs.php.net/fix.php?id=53721&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53721&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53721&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53721&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53721&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53721&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53721&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53721&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53721&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53721&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53721&r=mysqlcfg