PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so'

22,040

Solution 1

If you are not planning to use APC then this can be safely removed from your PHP configuration.

First, find your php.ini file and edit it.

Find "apc" in the php.ini file, you should find a line that looks like this:

extension=apc.so

You can comment out this line by adding a semi-colon in front, e.g.

;extension=apc.so

If you cannot find the "apc.so" reference in your php.ini file, it could be included in a separate file. You could locate it by searching for the string "apc.so" within all files on your server, it must be there somewhere!

Just comment out that line then restart Apache.

Solution 2

APC is no longer compatible with PHP, as of PHP 5.5 (this may apply to 5.4 as well, I can't find the specific document right now). However Zend OPCACHE is included (in 5.5, no install necessary), because of this APC has been removed from PECL. Take a look at installing Zend OPCACHE instead. http://php.net/manual/en/opcache.installation.php

Depending on what you are running you may not need an opcode cache, however sites like wordpress, drupal, joomla, etc often benefit from having it.

Share:
22,040

Related videos on Youtube

user3207586
Author by

user3207586

Updated on September 18, 2022

Comments

  • user3207586
    user3207586 over 1 year

    I have updated my php from 5.3.3 to 5.4.31. I have a Debian 6 Squeeze.

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so' - /usr/lib/php5/20100525/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
    
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
    

    During the installation, the system ask me if I want to keep the actual php.ini or put the new one. I said to keep the actual one.

    Now, I have this 2 errors when I restart Apache..

    What should I do to solve them?

    • Drew Khoury
      Drew Khoury over 9 years
      ...some research?
    • user3207586
      user3207586 over 9 years
      I have resolved the second one with sudo aptitude purge php5-suhosin but I can't resolve the first one...
    • Tero Kilkanen
      Tero Kilkanen over 9 years
      Have you checked the differences between the configuration file you had in place, and the one that was included in the new package? Have you modified your current configuration file according to the changes?
    • user3207586
      user3207586 over 9 years
      What did you mean by "configuration file" ?