我设置了Crontab:
[root@root mysql]# crontab -l
5 * * * * php /home/admin/public_html/scheduleSendMail.php
但不要执行PHP代码!
[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
查找:
..
libmysqlclient.so.16
libmysqlclient.so.16(libmysqlclient_16)
..
我用的是Centos和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)
最佳答案
代码:
#ls -l /usr/lib/mysql | grep libmysqlclient.so
输出:
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
不工作!
但是:
#ln /usr/lib/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so.18
工作得很好:D
谢谢大家