php5apache2_4.dll not found error

送分小仙女□ 提交于 2019-12-31 21:32:50

问题


I'm trying to integrate php on Apache. Following is the versions I'm using

Apache 2.4 (httpd-2.0.64-win32-x86-openssl-0.9.8o)
PHP (php-5.5.0-Win32-VC11-x64.zip)

I'm setting this on a 64 bit windows 7 machine. I have made the configurations as per this, but I'm getting the following error even though I have place the dll in the specified folder.

Cannot load C:/php/php5apache2_4.dll into server: The specified module could not be found.

The httpd.conf line entry is this

LoadModule php5_module "C:/php/php5apache2_4.dll"

Is there any version compatible issues?


回答1:


The only way I've been able to get PHP (5.5) to work with Apache (2.4) on Windows (7 and 8) is to make sure Apache and PHP are both either 32-bit (x86) or 64-bit (x64) and that Apache and PHP are both Thread Safe (TS). Using Non-Thread Safe (NTS) did not work for me (or others), and the Thread Safe build comes bundled with the needed Apache Module for PHP "php5apache2_4.dll". Once all my bit-depths and thread safety was matched up, Apache 2.4 and PHP 5.5 work well together on my Windows systems.

Both products must also have been compiled using the same major versions of Microsoft Visual Studio/C++, such as VC6 (the legacy VC++ compiler), VC9=Studio 2008, or VC11=Studio 2012. For the above Apache versions, only VC9 or VC11 are commonly used.

Links:

Get Windows Apache binaries here: http://www.apachelounge.com/download/

Get Windows PHP binaries here: http://windows.php.net/download/

Install the Visual C++ Redistributable compiler runtime library for the specific Visual Studio version used to prepare both Apache and PHP for Windows:

2012: http://www.microsoft.com/en-us/download/details.aspx?id=30679

2008: http://www.microsoft.com/en-us/download/details.aspx?id=5582




回答2:


You are right Marty, they work only if both are either 32bit or 64 bit. I used XAMPP- Apache's distributed installation to resolve this issue.




回答3:


Apache win 32 with 64 bits its the problem, you need Apache64



来源:https://stackoverflow.com/questions/17609096/php5apache2-4-dll-not-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!