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.

