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

Here is the Apache I am using: (

And here is the version of PHP I am using: (VC11 x64 Non Thread Safe (2013-Jun-20 02:50:14))

My php.ini is configured correctly, as is httpd.conf, however after I add the following lines to get Apache to load PHP:

PHPIniDir "c:/php5" 
LoadModule php5_module "c:/php5/php5.dll" 
AddType application/x-httpd-php .php .php5 

I get the following error when I try to start the server:

Syntax error on line 527 of C:/Apache24/conf/httpd.conf: Can't locate API module structure `php5_module' in file C:/php5/php5.dll

I don't get what's wrong, I have the 64-bit versions of PHP and Apache, and they are both compiled using VC11. Why doesn't Apache like PHP's dll file?

share|improve this question

You are most likely using the wrong DLL. Usually there will be a php5apache2_2.dll or a php5apache2_4.dll which expresses the SAPI for apache and is usable as an apache module.

That said, you really should avoid WAMP stacks for many, many reasons: linux is effectively the primary development and support OS for both apache and php, and historically dev involvement in windows-only bugs and issues is scant. Moreover, the licensing costs for linux are lower, as is the performance overhead.

share|improve this answer
I agree with you that Linux is better for this, and infact it is what I use the vast majority of the time, but it's just not an option in this specific case. The strange thing is, the version of Apache I am using was Linked to explicitly from the PHP page, so I feel like it should be the correct dll :\ there is no php5apache2.dll included in the package I downloaded, just php5.dll. I will keep playing around though. – Cameron Ball Jun 23 '13 at 6:37
You may have the wrong package then. There should be an apache-specific module. – Falcon Momot Jun 23 '13 at 6:49

The correct dll was in the thread-safe version of php;

share|improve this answer

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.