Product:
Search Type:

I see the message "PHP Startup: Unable to load dynamic library" in the Apache error log when starting the service.

Article ID: 1352 
Last Review: Apr,27 2007
APPLIES TO:
  • Plesk for Linux/Unix

SYMPTOMS

Apache can be started, but I see the warnings in the error_log, for example: 

"PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' -  /usr/lib/php/modules/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0"

Module name can differ from the one listed in this error (pgsql.so).

CAUSE

This error means that PHP cannot open some module which is listed in it's configuration files with 'extension' directive. The error can be related to any PHP module, such as:
dom.so, gd.so, imap.so, ldap.so, mbstring.so, mysql.so, mysql.so, odbc.so, pgsql.so, sitebuilder.so, xsl.so, zip.so, etc...

RESOLUTION

If you deleted the problem module or do not need it to be loaded, you can avoid this message by commenting this module loading string ( in this example it is "extension=pgsql.so" ) in /etc/php.ini and /etc/php.d/* files.

 

If you wish to use this module, it should be placed into PHP extension directory that is configured with extension_dir directive in /etc/php.ini and listed in the error you get. Usually it is done automatically when you install the appropriate module package into the system, in our example pgsql.so module corresponds to php-pgsql package (for imap.so, it will be php-imap, for mysql.so - php-mysql, etc...). So, if the package that provides this module is not installed in the system, you should install it using the OS package manager, for example for RPM:

# rpm -Uvh php-pgsql-x.x.x-xx.x.rpm


Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields