Reputation: 1096
I'm Set Crontab :
[root@root mysql]# crontab -l
5 * * * * php /home/admin/public_html/scheduleSendMail.php
But Not Execute PHP code!
[root@root mysql]# php /home/admin/public_html/scheduleSendMail.php
php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
[root@root mysql]# rpm -qR postfix
find :
..
libmysqlclient.so.16
libmysqlclient.so.16(libmysqlclient_16)
..
I am using the Centos And DirectAdmin
PHP v: php-5.3.3-14.el6_3.i686
mysql v: mysql-5.1.66-2.el6_3.i686
centos v: CentOS release 6.3 (Final)
Upvotes: 2
Views: 33694
Reputation: 1
A better option is remove your php and install the version 5.3.23:
Upvotes: 0
Reputation: 1096
code:
#ls -l /usr/lib/mysql | grep libmysqlclient.so
outPut:
lrwxrwxrwx 1 root root 24 Dec 21 21:41 libmysqlclient.so -> libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root 24 Dec 21 21:41 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root 1524000 Dec 7 18:27 libmysqlclient.so.16.0.0
#ln /usr/lib/mysql/libmysqlclient.so.16.0.0 /usr/lib/mysql/libmysqlclient.so.18
Not Work !
But :
#ln /usr/lib/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so.18
It's Work very Good :D
Thanks All
Upvotes: 5
Reputation: 138
Php is compiled against the wrong mysql lib.
I suggest you to check if the php executable is the one provided with the rpm package.
You can also try a dirty workaround, go to the directory where the libmysqlclient.so.16 is located and write:
ln -s libmysqlclient.so.16 libmysqlclient.so.18
Upvotes: 1