I installed Apache2.2 on "C:\Apache2.2" directory, using windows installer.
It works OK. (I can do these functions with out an error -> stop,start,restart)
Now, i'm going to installe PHP 5.1.4 manually, which will work with Apache.
I extract the content of "php-5.1.4-Win32.zip" to C: drive and rename that folder as php. Now, those php file(All .dll files & others) are resides in "C:\php"
Then i rename the "php.ini-recommended" as "php.ini" & copy that into the C:\WINNT folder.
Also copied the "php5ts.dll" to C:\WINNT
Now i'm going to configure "httpd.conf"
i put these lines into that file, in correct places-->
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
But when i do that, I CANNOT Restart the Apache ???
It gives this ERROR...
'The requested operation has failed'
--------------
I think the error is coming from this line...
LoadModule php5_module "c:/php/php5apache2.dll"
The path is correct... There is a file called "php5apache2.dll" in c:/php
when i comment that line,
#LoadModule php5_module "c:/php/php5apache2.dll"
i can do the operations with apache.(start,stop.restart)


I didn't do any changes to the php.ini
Changes are only made with httpd.conf
Do i need to insert a line like this to the httpd.conf
PHPIniDir "C:/php"
If so,... to where it should insert !!
Please help me to configure this...
(O/S using is Win2000 prof. with service pack 4)

(I did the same procedure with winxp sp-2. But it gives the same ERROR..)

Recommended Answers

All 11 Replies

I am very much sure that the error is not by adding the line LoadModule php5_module "c:/php/php5apache2.dll". If you are using Apache 2.X, we need to add “c:/php/php4apache2.dll" instead of "c:/php/php4apache.dll".

U need to add more one line in the "http.conf file
Simply search for the line in the file that begins with a "DirectoryIndex" and add "index.php" to the list of files on that line.
For Eg: change it to DirectoryIndex index.php index.html

The next time you access "localhost" or "localhost/directory/" without a filename, Apache will deliver "index.php" if available, or "index.html" if "index.php" is not available.

Then test for PHP

Create a PHP file with the following line:
<?phpinfo()?>

Save the file with the extension php(Eg:testphp.php) and save the file in your Apache htdocs directory(i.e c:\program files\apache group\apache\htdocs


access the file you just created by typing http://localhost/testphp..phpinto in your browser.

U shd able to see all the information about your PHP setup.

I hope i have answered ur question...

Good luck then...

Can you post a copy of your httpd config file

If you look in the error log in will have a more usefull error message.

Don't bother for all this configurations,,,,,,,somebody is already doing it for you........

google XAMPP and install it, look the documentation and change the passwords as suggested, you are all set........

It is opensource and free and preconfigured php, mysql, pear, filezillaFTP, Mercury Mail server and lot more.........

Good Luck.........

I came to this forum trying to find the solution for the same exact problem. I realize the original poster probably already figured a way out, but for future people with the same problem I recommend uninstalling apache 2.2 and getting apache 2.0- it worked for me. According to this site, apache 2.2 doesn't work with php5 (it needs a beta 5.2 version or something..)

What you need is php5apache2_2.dll, which is compatible with Apache 2.2. The file is available in the PHP 5.x snapshot at http://snaps.php.net/

there is WAMP server or XAMPP server which will configure php, apache, and mysql for you

bobodunno, you're a legend. :mrgreen::cheesy::mrgreen:
For anyone experiencing this error, this is what I did by following the link below which solved the issue (running on WinXP prof sp2):
1. Follow the link below
2. Download the latest WIN32 package snapshop which is a zip file.
3. Extract ONLY the php5apache2_2.dll file from the zip archive into your PHP install folder (I also extracted php5apache2_2_filter.dll, not sure if I needed to)
4. Double check your PATHs in httpd.conf are correct, save it and then restart Apache2.2

What you need is php5apache2_2.dll, which is compatible with Apache 2.2. The file is available in the PHP 5.x snapshot at http://snaps.php.net/

bobodunno ... that was a great . Thanks for the help.

Apache 2.2.x does not support the regular php. you need to get the snaps version of php from this site. follow the instructions and install and it should work fine
Hope it works well for you...:)

What you need is php5apache2_2.dll, which is compatible with Apache 2.2. The file is available in the PHP 5.x snapshot at http://snaps.php.net/

I know this is an old post, but thanks anyway wherever you are.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.