Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a working installation of Apache 2.2.17 on Windows 7, and I installed PHP 5.3.5 (the VC6, x86, thread-safe version)

I make sure to choose Apache 2.2.x as my web server and chose the path to Apache2.2\conf for the Apache configuration path.

But now, when I try to start Apache, I get this error:

---------------------------
Error
---------------------------
The requested operation has failed!
---------------------------
OK
---------------------------

Nothing is written to error.log

How can I fix this?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Turns out I needed to put php5apache2_2.dll into my apache install folder and go into httpd.conf and change the "PhpIniDir" variable to be the path to the php.ini file in my PHP install folder.

share|improve this answer
add comment

Actually, there is no need to copy the files. You simply need to provide the correct paths. I did not change any of the defaults when installing, and in my case the edits look like this in the httpd.conf file:

#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

Kind of annoying that the installer doesn't do this correctly in the first place given that it has all the required info...

share|improve this answer
add comment

I had the same problem, but I fixed it.

In my folder Apache2.2\conf I have a file httpd.conf and in the folder Apache2.2\conf\original is the same file. You have to change only the file in the second folder.

At the end of this file write:

LoadModule php5_module "C:/Program Files (x86)/Apache Software Foundation/PHP/php5apache2_2.dll" 
AddType application/x-httpd-php .php
PHPIniDir "C:/Program Files (x86)/Apache Software Foundation/PHP"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.