13

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?

giannis christofakis
  • 8,201
  • 4
  • 54
  • 65
rvini
  • 441
  • 2
  • 4
  • 12
  • 1
    Yes, there is a version incompatibility issue here. You're trying to use Apache 2.0, which is ancient, with a copy of PHP for Apache 2.4. –  Jul 12 '13 at 07:09
  • 1
    I tried with apache 2.4 64 bit and php 5.5, still getting the same error . – rvini Jul 12 '13 at 13:38

3 Answers3

26

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

David Spector
  • 1,520
  • 15
  • 21
Marty McGee
  • 745
  • 8
  • 11
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.

giannis christofakis
  • 8,201
  • 4
  • 54
  • 65
rvini
  • 441
  • 2
  • 4
  • 12
0

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