Unable to load dynamic library under RedHat

General discussion forum for the Zend Server

Unable to load dynamic library under RedHat

Postby shadow_49 on Tue Dec 22, 2009 2:00 pm

Hi everyone,

I installed Zend Server 4.0.6 on a RedHat EL 5.3 and configured it for the application I have to host on the server.
The web application works well, but when I try to run a php script with the php command in shell, I have these errors :
/var/www/html/ScriptAuto/McrCopy/Scripts/CopyAllTodayMcr.php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/imap.so' - libssl.so.0.9.8: 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/local/zend/lib/php_extensions/mysql.so' - libmysqlclient.so.16: 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/local/zend/lib/php_extensions/mysqli.so' - libmysqlclient.so.16: 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/local/zend/lib/php_extensions/pdo_pgsql.so' - libpq.so.5: 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/local/zend/lib/php_extensions/pdo_mysql.so' - libmysqlclient.so.16: 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/local/zend/lib/php_extensions/mcrypt.so' - libmcrypt.so.4: 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/local/zend/lib/php_extensions/oci8.so' - libclntsh.so.11.1: 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/local/zend/lib/php_extensions/pdo_oci.so' - libclntsh.so.11.1: 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/local/zend/lib/php_extensions/ldap.so' - libldap-2.4.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/DatabaseAccess/Mysql_Access.php on line 24


I searched on the web, and I found one thing to do : add the bin path and the lib path of zend to the user's path ($PATH) and library path ($LD_LIBRARY_PATH)
I added it into the /etc/profile to add the two path for all users.


I tryed to run again the php script, but I get the same errors.
I have these errors only if I run the script without root rights.


Other point : I have these errors with the command "php -m" too (that's why I really don't understand the problem ... ). When I run the command, I have the errors, then the list of modules. The .so files for the unloaded extensions are at the same place than the loaded, and they have the same rights.


Thanks in advance for you help 'cause I really don't see what to do to rectify it.
shadow_49
 
Posts: 2
Joined: Tue Dec 22, 2009 1:51 pm

Re: Unable to load dynamic library under RedHat

Postby jess04 on Tue Dec 22, 2009 2:33 pm

Hello,

From the shell you're at, when you:
# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib; export LD_LIBRARY_PATH
Or, you can simply do:
# . /etc/zce.rc
Note the SPACE between "." and /etc/zce.rc
And then:
# ldd /usr/local/zend/lib/php_extensions/imap.so
Are the deps met properly? If so, then something must be wrong in how you export the LD_LIBRARY_PATH in profile, have you tried exporting in /etc/bashrc or ~/.bashrc? This is assuming you work with BASH of course.
May the source be with you,

Jess Portnoy
jess04
 
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm

Re: Unable to load dynamic library under RedHat

Postby shadow_49 on Tue Dec 22, 2009 2:48 pm

I added these commands into the /etc/profile :
Code: Select all
export PATH
export LD_LIBRARY_PATH

under these lines : http://files.zend.com/help/Zend-Server/rpm_installation.htm#MiniTOCBookMark5 and I tryed to run again the php script, the libraries seem to be well loaded. I just have now the error
Permission denied
on some files, but I think it's just rights to change on some files.

Thank you for your answer :)
shadow_49
 
Posts: 2
Joined: Tue Dec 22, 2009 1:51 pm

Re: Unable to load dynamic library under RedHat

Postby jess04 on Tue Dec 22, 2009 3:04 pm

Of course, you're quite welcome :)
May the source be with you,

Jess Portnoy
jess04
 
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm


Return to Zend Server

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests