APC - Unable to load dynamic library

12,666

Solution 1

  1. First, I went here
  2. Then, I downloaded Collection of PECL modules for PHP 5.2.3
  3. Then, I extracted the php_apc.dll file and copied it in the ext/ folder
  4. Restarted Apache
  5. It works!

Solution 2

Try using the full drive letter and path to extension_dir in php.ini:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "C:\somedir\php\ext"

And restart Apache after making the change.

(It might very well be something else, but this is the first thing I check on Windows systems -- those pesky filepaths.)

Solution 3

To complete other answers:

Using the non thread safe (NTS) version of the DLL instead of the thread safe one solved the problem for me.

That is, only the NTS version was compatible with my WAMP installation.

Share:
12,666
TechFanDan
Author by

TechFanDan

Eats, breathes anything tech related. #SOreadytohelp

Updated on June 14, 2022

Comments

  • TechFanDan
    TechFanDan almost 2 years

    Here is what I have in my PHP.ini:

    extension=php_apc.dll
    ...    
    [APC]
    apc.enabled = 1
    

    I'm running Apache 2.0.59, PHP version 5.2.3 on Windows Server 2003.

    I've already installed XDebug compiled with vc6. Thus, I got the APC version 5.2 vc6. Here are both filenames that I downloaded (and put the *.dll in php/ext/).

    php_apc-3.1.5-5.2-vc6-x86.zip php_apc-3.1.5-5.2-nts-vc6-x86.zip

    I got them here.

    I've tried rebooting the server and in both cases, I get the following error:

    PHP Warning:  PHP Startup: Unable to load dynamic library './ext/php_apc.dll' - The specified module could not be found.\r\n in Unknown on line 0