【问题标题】:Magento cronjob errorMagento cronjob 错误
【发布时间】:2013-08-22 11:30:54
【问题描述】:

我正在尝试为 magento 设置一个 cronjob。 我的 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

【问题讨论】:

    标签: magento cron


    【解决方案1】:

    删除 /etc/php5/cli/conf.d/mcript.ini 的第一行(编号 12)

    This may help you
    
    For reference :
    
    https://bugs.launchpad.net/ubuntu/+source/php5/+bug/573436
    

    每个加速器:https://wiki.archlinux.org/index.php/EAccelerator

    safe_mode : 只需评论 safe_mode 或 Laravel shared hosting - Directive 'safe_mode' is deprecated in PHP 5.3 and greater

    app :file 权限问题给 -R 777

    【讨论】:

    • 我用#替换了;。警告消失了。还有其他问题。
    • 请说明问题,会尽量建议
    • 一切,除了“PHP 已弃用”警告
    • 奇怪;我已经给了 cron.sh 和 cron.php 正确的权限。但是当我将保存模式注释掉时,一切正常。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-31
    • 1970-01-01
    • 2011-08-06
    • 1970-01-01
    相关资源
    最近更新 更多