Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here is the Apache I am using: http://www.apachelounge.com/viewtopic.php?p=24281 (httpd-2.4.4-win64-VC11.zip)

And here is the version of PHP I am using: http://windows.php.net/download/ (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

2 Answers 2

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; php-5.5.0-Win32-VC11-x64.zip

share|improve this answer

Your Answer

 
discard

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.