Php-apache-vista configuration

I am having trouble getting apache to load php. I got it running succesfully with a bit of effort 2 years ago but this is a fresh system so I am having to setup everything again… even though I kept some old config files for reference, I still cannot get php to load on apache.

I have apache-2.2.17 installed, works with various local websites(on computer), so apache works just fine.

I have extracted the php-5.3.6 extracted to c:\php
php5apache2_2.dll located in c:\php\php5apache2_2.dll

Now the next step is adding(to apache’s httpd.conf file):
LoadModule php5_module “c:/php/php5apache2_2.dll”
I added this to the end of my httpd.conf file, as I did on the last system and also tried adding it after the other LoadModule statements further up in the file… either way, when this line is added, apache fails to start.
Also in combination with:
Add the line just before the closing </IfModule> for that section.
AddType application/x-httpd-php .php
Add the following line to the end of your httpd.conf file.
PHPIniDir “c:/php”
apache still fails to start.

The main issue seems to be php5apache2_2.dll not loading for apache… the path is definetly correct and the file was in the php zip from the official site so the file is valid.

I have seen something about environment variables, but different guides say different things and I definetly don’t remember having to do this to get php to work on apache 2 years ago, so I don’t want to mess around with system stuff yet as I might do more damage than good… unless you think this is probably the way to solve this?

To further investigate…I have tried in command line to:
cd c:\Program Files (x86)\Apache Software Foundation\Apache2.2
=*** apache is not recognized as an internal or external command
I thought this was meant to help me debug but as you can see it dosn’t work? Even though apache works since I can view local sites(when I take out the not working php stuff).

I am confused as to why apache won’t load the php module and why I can’t use apache command to debug.

I have been trying to start apache from gui at via taskbar… also if I command in cmd.exe:
net start apache2.2
=***apache service could not be started
a service specific error occured: 1
more help by typing NET HELPMSG 3547

I googled this error and found this:
Troubleshooting the Apache web server after changing configuration settings
If the Apache web server can’t be started after a change to a configuration file, open a command prompt (you don’t need Administrator rights), change the working directory to the Apache bin directory, and run apache.exe with the -t option:
cd “C:\Program Files\Apache Group\Apache2\bin”
C:\Program Files\Apache Group\Apache2\bin>apache -t
apache: could not open document config file C:/Program Files/Apache Group/Apache

tried apache2.2 directory, and it’s bin directory with commands:
apache -t

all fail to be recognized -not internal or external command or batch file?

I’v tried again using more guides but I still get the “requested operation failed” when I try to start Apache with PHP on top.

Apache works fine, on its own, but when I add any or all of(to my httpd.conf):
LoadModule php5_module “C:\php\php5apache2_2.dll”
AddType application/x-httpd-php .php
AcceptPathInfo on
PHPIniDir “C:\php”
… Apache will no longer start and gives me that error.

I found the apache error log file but it does not tell me anything useful:
[Sat Jul 09 02:14:04 2011] [notice] Parent: Received shutdown signal – Shutting down the server.
[Sat Jul 09 02:14:04 2011] [notice] Child 3212: Exit event signaled. Child process is ending.
[Sat Jul 09 02:14:05 2011] [notice] Child 3212: Released the start mutex
[Sat Jul 09 02:14:06 2011] [notice] Child 3212: All worker threads have exited.
[Sat Jul 09 02:14:06 2011] [notice] Child 3212: Child process is exiting
[Sat Jul 09 02:14:06 2011] [notice] Parent: Child process exited successfully.

This is the new guide I used and I followed all the steps:
Installing Apache (with PHP) on Windows Vista |

I did add the environment variables part as stated in the guide… also tried changing the slash direction of httpd.conf of those lines… also tried adding to the C:\windows directory… nothing I try works.

The php5apache2_2 file was missing from my original php zip so I downloaded it from topdlls, maybe it’s corrupt? There was only a php5.dll in my original zip, I tried refering to that but that didn’t work either.

I’v uploaded a zip containing my httpd.conf file(in apache) and php.ini file(located in my c:/php directory).

If anyone has any idea what I have done wrong? Or maybe easier if anyone has a working setup (for VISTA) of apache2 + php5 (+sql if possible), just basic working setup without any crazy personal modifications can they upload a zip/rar for me? of their php and apache folders, or even just the most relative files(eg httpd, php.ini, php5apache2_2.dll) so I can use that or compare against my own setup to see what’s wrong with mine.

php5apache2_2.dll should be bundled with PHP. If it’s not you can’t just drop in a copy you found somewhere and hope it works, it most likely won’t.

If I were you I’d uninstall PHP and download the VC6 (for Apache) version from PHP For Windows: Binaries and sources Releases and take it from there.

There are no VC6 versions of PHP any longer being supported. You should update to VC9 on Windows. You can get VC9 binaries of Apache here: Apache on Windows binaries and modules download Also download mod_fcgi from the same page. You can then follow this guide to install PHP under FastCGI, [URL=“”]Apache mod_fcgid and PHP on Windows | Fuzzy Tolerance

Beaware you might also need: