Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

The requested operation has failed!

Nothing is written to error.log

How can I fix this?

share|improve this question
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

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:

PHPIniDir "C:\Program Files\PHP"
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2.dll"

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

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

I had this problem, but after I added these following lines to configure:

LoadModule php5_module "C:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:/php"

After I added those lines, and I try to restart, I got this problem:

The requested operation has failed!

I solved with adding a hash (#) in front of each line and fixed it like this:

# LoadModule php5_module "C:/php/php5apache2_4.dll"
# AddHandler application/x-httpd-php .php
# PHPIniDir "C:/php"

You only need to add a hash # and restart it. It worked for me.

share|improve this answer
Adding a # in front of those lines comments them out and therefor does not load PHP. This will fix the problem but you now have the problem of not having PHP. – Steve Valliere Mar 30 at 19:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .