2015-08-12 01:44
浏览 63

Drupal cron错误:无法打开流

I've set up my Drupal 7 cron job like so:

/usr/local/bin/php /home/myaccount/public_html/cron.php

However, cron sends me an email with the following error message:

Warning: include_once(/home/myaccount/includes/ failed to open stream: No such file or directory in /home/myaccount/public_html/cron.php on line 13

Warning: include_once(): Failed opening '/home/myaccount/includes/' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myaccount/public_html/cron.php on line 13

Fatal error: Call to undefined function drupal_bootstrap() in /home/tente myaccount studios/public_html/cron.php on line 14

It appears that cron is somehow stripping out public_html from the path. I uploaded a temporary PHP file and printed out getcwd() and it reports the path correctly, including public_html. So somewhere between line 11 when DRUPAL_ROOT is defined as getcwd() and line 13 when the include is called, something strips out public_html from the path.

图片转代码服务由CSDN问答提供 功能建议

我已经设置了我的Drupal 7 cron作业:

/ usr / local / bin / php /home/myaccount/public_html/cron.php


但是,cron发给我一封电子邮件,内容如下: / p>

警告:include_once(/home/myaccount/includes/无法打开流:/ home / myaccount / public_html / cron中没有此类文件或目录 第13行的.php

警告:include_once():无法打开包含的'/home/myaccount/includes/'(include_path ='。:/ usr / lib / php :/ us / local / lib / php')在第13行的/home/myaccount/public_html/cron.php中

致命错误:在/ home /中调用未定义的函数drupal_bootstrap() 第14行的tenac myaccount studios / public_html / cron.php

看来cron正在以某种方式从路径中删除 public_html 。 我上传了一个临时PHP文件并打印出 getcwd(),它正确报告了路径,包括 public_html 。 因此,当 DRUPAL_ROOT 被定义为 getcwd()时第11行和第13行之间的某个地方,当调用include时,从路径中删除了 public_html

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongshanni1611 2015-08-13 08:55

    You should use curl to call your webserver so that the correct php.ini and openbasedir directives are set. See

    解决 无用
    打赏 举报

相关推荐 更多相似问题