Cron Daemon错误使用PHP Cron作业

时间:2012-12-20 07:29:22

标签: php cron

所以我对Cron Jobs来说相当新,而且我试图让这个特定的cron工作正常工作。我想要的只是每天访问一个PHP网页。通过访问PHP页面,cron作业将激活脚本,其中向特定用户发送电子邮件。这是cron工作代码:

php -q /home/sitename/public_html/scripts/emailnotifications.php

不幸的是,每天早上1点,我收到此错误消息,没有人收到他们的电子邮件。

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_bz2.dll' - 

C:\xampp\php\ext/php_bz2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_bz2.dll' - C:\xampp\php\ext/php_bz2.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mbstring.dll' - C:\xampp\php\ext/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mbstring.dll' - C:\xampp\php\ext/php_mbstring.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_exif.dll' - C:\xampp\php\ext/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_exif.dll' - C:\xampp\php\ext/php_exif.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gd2.dll' - C:\xampp\php\ext/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gd2.dll' - C:\xampp\php\ext/php_gd2.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gettext.dll' - C:\xampp\php\ext/php_gettext.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gettext.dll' - C:\xampp\php\ext/php_gettext.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_imap.dll' - C:\xampp\php\ext/php_imap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_imap.dll' - C:\xampp\php\ext/php_imap.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysql.dll' - C:\xampp\php\ext/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysql.dll' - C:\xampp\php\ext/php_mysql.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysqli.dll' - C:\xampp\php\ext/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysqli.dll' - C:\xampp\php\ext/php_mysqli.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_mysql.dll' - C:\xampp\php\ext/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_mysql.dll' - C:\xampp\php\ext/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_odbc.dll' - C:\xampp\php\ext/php_pdo_odbc.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_odbc.dll' - C:\xampp\php\ext/php_pdo_odbc.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_sqlite.dll' - C:\xampp\php\ext/php_pdo_sqlite.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_sqlite.dll' - C:\xampp\php\ext/php_pdo_sqlite.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_soap.dll' - C:\xampp\php\ext/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_soap.dll' - C:\xampp\php\ext/php_soap.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sockets.dll' - C:\xampp\php\ext/php_sockets.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sockets.dll' - C:\xampp\php\ext/php_sockets.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sqlite.dll' - C:\xampp\php\ext/php_sqlite.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sqlite.dll' - C:\xampp\php\ext/php_sqlite.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sqlite3.dll' - C:\xampp\php\ext/php_sqlite3.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sqlite3.dll' - C:\xampp\php\ext/php_sqlite3.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_xmlrpc.dll' - C:\xampp\php\ext/php_xmlrpc.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_xmlrpc.dll' - C:\xampp\php\ext/php_xmlrpc.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_ming.dll' - C:\xampp\php\ext/php_ming.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_ming.dll' - C:\xampp\php\ext/php_ming.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
PHP Warning:  Cannot open 'C:\xampp\php\extras\browscap.ini' for reading in Unknown on line 0
<br />
<b>Warning</b>:  Cannot open 'C:\xampp\php\extras\browscap.ini' for reading in <b>Unknown</b> on line <b>0</b><br />
No input file specified.

我没有shell访问服务器或访问任何服务器设置文件(php.ini除外)。我该怎么做才能让这个脚本每天运行?

1 个答案:

答案 0 :(得分:2)

看起来你将你的完整php.ini从你的windows机器(可能是开发环境)复制到一个运行一些linux发行版的远程服务器。

xampp中列出的扩展程序提供的php.ini将不会以这种方式工作。如果您确定要从开发机器复制整个php.ini,(您很可能不需要),您可能必须删除或编辑extension=行以适应环境(他们最有可能至少以.so结束,并且路径不同。检查每个路径相关的设置也是明智的。

(在每个extension=行中使用完整路径是愚蠢的,因为有extension_dir