[英]running PHP script from cpanel cron scheduler
I have been looking all over the place and every line I try does not work. 我一直在寻找这个地方,我尝试的每一行都不起作用。
the latest line: 最新的一行:
/usr/local/bin/php /home/username/public_html/testing/filename/process/process_01.php
PHP Fatal error: Class 'PDO' not found in /home/username/public_html/testing/filename/lib/dbconfig.php on line 10
PHP致命错误:第10行的/home/username/public_html/testing/filename/lib/dbconfig.php中找不到类'PDO'
I can run this script from the browser no problem and I am 99% sure the path to PHP is correct in the line. 我可以从浏览器运行这个脚本没问题,我99%肯定PHP的路径是正确的。
I only have access to cpanel cron job manager no command line. 我只能访问cpanel cron作业管理器没有命令行。
It seems like it is a problem related to the include directory. 看起来这是与include目录相关的问题。
Try going to the folder first and running from there: 首先尝试访问该文件夹并从那里运行:
cd /home/username/public_html/testing/filename/process/; /usr/local/bin/php process_01.php
Depending on how the include is done, you may need to "cd" into a previous folder in the hierarchy. 根据包含的完成方式,您可能需要“cd”到层次结构中的上一个文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.