我从cpanel设置了一个cronjob,但意外地导致了mysql错误。
This is the command i set from CPANEL:
php -f /home/server1/public_html/xad/imp.php
It need to be executed after half hour.
1) This job runs from browser without issue.
2) Also it runs from commandline correclty.
**root@server1 [~]# php -f /home/server1/public_html/xad/imp.php**
But it failed from cpanel cronjob setting and cause mySQL Error:
**Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)**
I am using pconnect as below:
$link = mysql_pconnect($hostName, $userNam_souq, $password) or die(mysql_error());