Search code examples
phpapache64-bitapcwindows-server

Compiled dll for APC extension for PHP 5.3


This might not be a programming question but I am posting it after long search and confusion.

I have a dedicated server running Windows server 2008/64bit running Apache as a web server and using PHP 5.3.9

I am trying to install APC extension for Apache. From what I found on php.net I should use a V6 version because I am using Apache.

I searched everywhere to find APC for PHP 5.3 vc6 x64 and found nothing

This comment says that "it’s not possible to compile 64 bit PHP binaries with VC6 since it does not have 64 bit compiler" I don't know if that's true or just an assumption

Any help will be gladly appreciated/

Update, I cannot use VC9 as stated on windows.php.net

If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP

If you are using PHP with IIS you should use the VC9 versions of PHP

VC6 Versions are compiled with the legacy Visual Studio 6 compiler

VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability. The VC9 versions require you to have the Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed

Do NOT use VC9 version with apache.org binaries

VC9 versions of Apache can be fetched at Apache Lounge. We use their binaries to build the Apache SAPIs.

Thanks

UPDATE

I was given wrong information about the server configuration and settings. phpinfo() revealed the following:

Compiler        MSVC9 (Visual C++ 2008)
Architecture    x86

So I used built VC9 and x86 and it worked perfectly.


Solution

  • I used to run PHP as an Apache module on my Windows development machine. However, as PHP has stopped releasing VC6 binaries, I run the VC9 non theadsafe 32-bit versions as a FCGI module. There is plenty of documentation from both Apache and PHP on how to install these.

    Then all you have to do is download the latest APC dll from here. Make sure you get the non-threadsafe version (nts), plonk it in your ext folder and just enable it like any other extension.

    Edit: Didn't see that you wanted to run the 64-bit version. I haven't had a chance to try that out. However, if you are happy with running 32-bit versions of Apache and PHP, the above should work well.