【问题标题】:Codeigniter CLI working in terminal, not in Cpanel cronCodeigniter CLI 在终端中工作,而不是在 Cpanel cron 中
【发布时间】:2014-03-15 01:59:33
【问题描述】:

我在使用 CodeIgniter 设置 cron 时遇到问题。我已经关注documentation 并设置了一个测试 cron

* * * * * php /home/USERN/public_html/spider/index.php tools message

但这不起作用。输出只是 index.php 默认控制器,而不是工具/消息。当我在服务器上的终端中运行它时,我得到了我期望的结果。是我做错了什么,还是我需要在服务器上更改一些东西?

【问题讨论】:

  • 你必须使用 /usr/local/bin/php
  • 非常感谢 :-)
  • 如果答案是正确的,(看起来像)@ahmad 将其添加为答案,iSenne 接受它。这样它就不会一直无人回答,;D
  • 好的,我已经添加了这个作为答案。

标签: codeigniter cron cpanel command-line-interface


【解决方案1】:

对于 cPanel 服务器,为了让 CI 正确使用 URI 段,您必须使用

/usr/local/bin/php

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-11-08
    • 2016-09-11
    • 2015-01-21
    • 1970-01-01
    • 2017-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多