Unable to load dynamic library '/usr/lib/php4/20020429/mysql.so

December 2016







Issue


You get a message like following following an update to PHP:

Unable to load dynamic library '/usr/lib/php4/20020429/gd2.so' - /usr/lib/php4/20020429/gd2.so: cannot open shared object file: No such file or directory in Unknown on line 0


Unable to load dynamic library '/usr/lib/php4/20020429/mysql.so' - /usr/lib/php4/20020429/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

Solution


The problem is due to the fact that the reference library has changed the directory. solve this, simply edit the php.ini file, find the section extension_dir and to define the new path, for example :

extension_dir = /usr/lib/php4/20050606



Another solution for Linux/Unix is to create a link using the name of the new directory using the command ln -s!

Related :

This document entitled « Unable to load dynamic library '/usr/lib/php4/20020429/mysql.so » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.