Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Since asking this question, I have figured out the whole process and written a blog post with screenshots: "Setting up Apache, PHP, MySQL, PHPMyAdmin, and Filezilla Server on Windows XP", located at… – Nathan Long Jan 19 '10 at 14:58
What's a liderhosen? – Pacerier Apr 5 '15 at 15:31
up vote 7 down vote accepted

Hmmm, well I bet that I just found the answer, right on the page I linked in the question.

If you are using PHP with Apache 1 or Apache2 from you need to use the VC6 versions of PHP.

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:

  • Extract everything to C:\php
  • Make sure C:\php is in the Windows system path, and reboot if you added it
    • (In Windows XP: right-click My Computer, choose Advanced tab, click "Environment Variables," scroll down to Path in lower box, choose Edit, and append "C:\php;" to the variable value.)
  • Copy either php.ini-production or php-ini.development to simply c:\php.ini
  • In httpd.conf, change DocumentRoot "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:

 #How to process PHP code
 LoadModule php5_module "c:/php/php5apache2_2.dll"
 #Files that end in .php should be processed as PHP code
 AddType application/x-httpd-php .php
 #Where the php.ini file is located
 PHPIniDir "C:\php"

From there, PHP worked for me. You may also want to edit php.ini to tweak settings.

share|improve this answer
this helped me thanks but in the http.conf should your PHPIniDir not just be C:\ ? – iamjonesy Oct 13 '10 at 8:30
@iamjonesy - No, I extracted all the PHP files into C:\php so that I could keep them together. This is cleaner, and let me do interesting stuff; for example, when I wanted to try a newer version of PHP, I renamed C:\php to c:\php_old_version (or whatever) and put the new one in C:\php. Note: to make this work, you have to add C:\php to your path in Windows, so that when Apache says "run php.exe!," Windows can say, "let's see, that's not in C:\... ah, here it is, it's in C:\php." See… for the whole process. – Nathan Long Nov 18 '10 at 15:38
thanks buddy Nathan Long. ur explaination worked for me. so very thankful – Nafay Idrees Feb 6 '11 at 17:03
Also see . – Pacerier Apr 5 '15 at 15:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.