logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Apache will not start when PHP added to httpd.conf
Author
Arch



Joined: 06 Dec 2011
Posts: 1
Location: Sacramento

PostPosted: Tue 06 Dec '11 19:41    Post subject: Apache will not start when PHP added to httpd.conf Reply with quote

I installed Apache 2.2 for the first time on my Windows 7 machine. Path is C:\Apache. I installed php 5.2.17. php path is C:\Apache\php (put php directory into Apache directory because I thought my problem might be permissions-related).

Works fine, but then I added the following to my httpd.conf file, per the instructions at php.com:

AddType application/x-httpd-php .php

and

PHPIniDir "C:\Apache\php"
LoadModule "C:\Apache\php\php5apache2_2.dll"

I also added index.php to the DirectoryIndex line.

Now my server won't restart, popup box says "The requested operation has failed.". No errors appear in the errorlog file. If I remark out the PHPIniDir and LoadModule lines, server starts.

Can anyone tell me how I'm screwing this up? Thanks for any help.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Tue 06 Dec '11 20:56    Post subject: Reply with quote

Be sure you have the Thread Safe download from http://windows.php.net/download/ , and use forward slashes (/) in the paths.

The LoadModule line must be (you forgot php5_module):

LoadModule php5_module "C:/Apache/php/php5apache2_2.dll"

btw, better to have:
AddHandler application/x-httpd-php .php instead of AddType.

Steffen
Back to top


Reply to topic   Topic: Apache will not start when PHP added to httpd.conf View previous topic :: View next topic
Post new topic   Forum Index -> Other Software