9 April 2010 - 22:35PHP: Problem Starting Apache 2.x On Windows
You can see full explanation in Article on php.net about Apache 2.x on Microsoft Windows. What i want to write here is about error:
C:\apache\bin>apache -k start
Syntax error on line 957 of C:/apache/conf/httpd.conf:
Cannot load C:/PHPDEV/test/Debug_TS/php5apache2.dll into server: The specified module could not be found.
That error happened when i was starting apache web server (version 2.0.x).
After searching for 2 days through the web plus trial and error, i have another explanation of how that error can occur and solution which does not exist in an article in php.net. My explanation focus on debugging environment especially when you compile apache and php by yourself.
Source of error:
File php5apache2.dll needs another dll files in order to works. One of it is msvcr80.dll or msvcr80d.dll (in debugging environment). This dependency is mentioned in php5.apache2.manifest.
Solution:
So, in order to resolved this problem, you need to copy that dependecy on the same folder where php5apache2.dll is located.
Another error:
When you are in the debugging environment, msvcr80d.dll presence leads to another error.
When you choose ignore, this error is the output:
C:\apache\bin>apache -k start
Syntax error on line 957 of C:/apache/conf/httpd.conf:
Cannot load C:/PHPDEV/test/Debug_TS/php5apache2.dll into server: A dynamic link
library (DLL) initialization routine failed.
Solution:
Edit your apache.exe.manifest to:
<?xml version=’1.0′ encoding=’UTF-8′ standalone=’yes’?>
<assembly xmlns=’urn:schemas-microsoft-com:asm.v1′ manifestVersion=’1.0′>
<dependency>
<dependentAssembly>
<assemblyIdentity type=’win32′ name=’Microsoft.VC80.CRT’ version=’8.0.50727.42‘ processorArchitecture=’x86′ publicKeyToken=’1fc8b3b9a1e18e3b’ />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type=’win32′ name=’Microsoft.VC80.DebugCRT’ version=’8.0.50727.42‘ processorArchitecture=’x86′ publicKeyToken=’1fc8b3b9a1e18e3b’ />
</dependentAssembly>
</dependency>
</assembly>
And copy mscvr80d.dll into the same folder where apache.exe and apache.exe.manifest are located. Problem solved!
Note:
- You need to match msvcr80(d).dll version available on your platform and change the manifest file based on the version of the file.
- Do not mind about PHPIniDir error! This error will not appear if apache can load php 5 module correctly.
That’s it. Result of 2 days work. Hopefully this can help others.![]()
No Comments | Tags: English, Testing

