I have installed Apache 2.2.14 (Win32) on a Windows XP machine and am trying to add the latest PHP module. I downloaded the ZIP file from here labeled "VC9 x86 Non Thread Safe" and extracted to my Apache directory. I then copied php5.dll
to Apache's bin
directory and copied php.ini
to C:\Windows
.
In httpd.conf, I added these lines:
LoadModule php5_module "C:/Program Files/Apache Software Foundation/Apache2.2/bin/php5.dll"
AddType application/x-httpd-php .php
Now Apache will not start. error.log
says this: "Can't locate API module structure php5_module
in file C:/Program Files/Apache Software Foundation/Apache2.2/bin/php5.dll": No error"
I think I may have the wrong .dll
file, because I found tutorials that use the filename php5apache2.dll
and I didn't see that in the PHP package I got.
Also, I have seen references to a file called php5ts.dll
, but I don't see that either.
What exactly do I need to make PHP5 work?
Hmmm, well I bet that I just found the answer, right on the page I linked in the question.
Downloading that now.
Update: Working Now
The solution was mostly to Read The Freaking Manual, with the caveat that part of my problem was downloading the wrong package, and "the manual" in this case was
install.txt,
which is included in the PHP package. So there was some trial and error.Here's what I did to get this working:
The rest of the steps were in
install.txt
. Here's the condensed version:httpd.conf
, changeDocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
to point to the folder where you want to put your html/php files. Do use forward slashes for the path.Also edit http.conf to add these lines:
From there, PHP worked for me. You may also want to edit
php.ini
to tweak settings.