Jump to content

Recommended Posts

I installed PHP 5.2.12 on windows VISTA with Apache 2.2.14.

 

After installing PHP I cannot start Apache, I get error

‘The requested operation has failed.’

 

In the error log file I get this

[sun Dec 20 22:28:14 2009] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

 

When I run the Test Configuration, it runs and disappears with no problems.

 

If I delete the PHP part (see below) in the Apache config file it works but doesn’t load PHP files.

#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

 

Can anyone help?  Anything else I can check/test?

 

  • 1 month later...

Uninstall PHP and delete the C:/Program Files/PHP folder if its left behind. Also remove the following lines from the 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

 

Go to http://php.net/downloads and download the PHP Zip distribution instead. Extract the zip file to C:\PHP.

 

Add the following lines to Apache's httpd.conf file (at the bottom will do)

LoadModule php5_module "C:/PHP/php5apache2_2.dll"
PHPIniDir "C:/PHP"

 

Add PHP to the PATH Environment Variable.

 

Restart Apache. Apache should now be be running fine and be configured with PHP. To test go to C:/Program Files/Apache Software Foundation/Apache2.2/htdocs and delete any files in that folder. Create a new file called info.php and add the following code to it

<?php phpinfo(); ?>

Now open you web browser and go to http://localhost/info.php

 

You should see page generated about PHP's configuration. PHP is now setup with Apache. To configure PHP go to C:\PHP and rename the file named php.ini-recommended to just php.ini.

 

Dont forget to restart Apache after you have made any changes to the httpd.conf or php.ini

<?php phpinfo(); ?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.