2013-08-22 93 views
1

我試圖爲magento設置一個cronjob。 我的cronjob是:Magento cronjob錯誤

*/5 * * * * /bin/sh /var/www/vhosts/#######/httpdocs/cron.sh >/dev/null 2>&1 

這種運作良好,但cron.sh是給這個錯誤:

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0 
[eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.3.2-1ubuntu4.9. Rebuild it for your PHP version (5.3.2-1ubuntu4.14) or download precompiled binaries. 
PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 
PHP Warning: realpath(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /var/www/vhosts/########/httpdocs/app owned by uid 10001 in /var/www/vhosts/########/httpdocs/app/Mage.php on line 273 
PHP Fatal error: Uncaught exception 'Mage_Core_Exception' with message ' is not a directory or not readable by this user' in /var/www/vhosts/########/httpdocs/app/Mage.php:594 
Stack trace: 
#0 /var/www/vhosts/########/httpdocs/app/Mage.php(278): Mage::throwException(' is not a direc...') 
#1 /var/www/vhosts/########/httpdocs/app/Mage.php(752): Mage::setRoot() 
#2 /var/www/vhosts/########/httpdocs/cron.php(29): Mage::isInstalled() 
#3 {main} 
thrown in /var/www/vhosts/########/httpdocs/app/Mage.php on line 594 

回答

1

刪除/etc/php5/cli/conf.d/mcript的第一道防線。 INI(編號12)

This may help you 

For reference : 

https://bugs.launchpad.net/ubuntu/+source/php5/+bug/573436 

eAccelerator在:https://wiki.archlinux.org/index.php/EAccelerator

safe_mode設置:J-烏斯評論safe_mode設置或Laravel shared hosting - Directive 'safe_mode' is deprecated in PHP 5.3 and greater

應用:文件權限問題給-R 777

+0

我更換了#的了。警告消失了。還有其他問題。 – Royw

+0

請指明問題,將盡量建議 –

+0

一切,但「PHP已棄用」警告除外 – Royw