2

After attempting to upgrade my PHP version on Windows 7, I cannot start Apache. I get this error message:

The requested operation has failed!

  • I used the Windows installer to upgrade to PHP 5.3.8 from 5.2, afterwards I was unable to start Apache. I had stopped the server before the upgrade.
  • I ensured all virus software was disabled during all upgrade and repair attempts, and rebooted between each. Default installation settings were used in all cases.
  • I did not see anything in error.log
  • I tried the "Repair" option in the PHP installer, as well as different installation settings.

I tried reinstalling Apache, but it did not seem to help and I got this error during the installation:

enter image description here

I see this in httpd.conf:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
###PHPIniDir "C:/Program Files/PHP/"
###LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
##PHPIniDir "C:/Program Files/PHP/"
##LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
#PHPIniDir "C:/Program Files/PHP/"
#LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

...but I have no idea what to do with it.

Nothing I've found on this site has been helpful although I have found similar questions. I'm guessing that more information would be needed from me, but I'm not sure what, but I'm happy to provide it.

How can I resolve this?

Wesley Murch
  • 155
  • 2
  • 12

1 Answers1

4

Since the error message says, that the file "cannot be found", please check the location of your "php5apache2_2.dll" - maybe the installer did something strange and the file is not there (anymore). Further, I'd suggest NOT to use the installer. There are zip-Files for download at php.net. Download and unzip it in your directory "C:/Program Files/PHP/".

Edit: please also check the windows event log - what does it say?

If this does not help, try to download PHP 5.3.4 VC6 from php-archive, which is compiled with the legacy visual studio 6 compiler -> "If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP".

I hope, this helps!

  • Thanks, I'll take a look ASAP. I'm currently scrambling to patch 40 sites after our server upgraded to php 5.3 and I failed to set a default timezone (new requirement I guess) or turn off error reporting! – Wesley Murch Oct 12 '11 at 23:02
  • @Wesley Murch: Maybe this helps not to patch all 40 sites? => http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone – mjStallinger Oct 12 '11 at 23:08
  • Ahh yeah should have thought of that and emailed the server guy (he has control over the php.ini), I just finished patching (it was quick) but will send the request to him anyways, great advice. Moving on to your post's advice right now... – Wesley Murch Oct 12 '11 at 23:14
  • 1
    Although the VC9 releases were offered on the downloads page, I had to use the 5.3.4 VC6, just like you said. I unzipped it into `C:\Program Files\PHP` and this fixed everything, thank you so much! Not sure what I would have done without your help! – Wesley Murch Oct 13 '11 at 00:02
  • @WesleyMurch: I'd be glad to help! – mjStallinger Oct 13 '11 at 09:26