Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cronjob php sapi error

Discussion in 'General Discussion' started by resellertr, Dec 2, 2013.

  1. resellertr

    resellertr Member

    Joined:
    Feb 16, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    We installed Group Office script, setup cronjob for it. But their cronjob script warns us

    "ERROR: This script must be run on the command line."

    our cronjob entry is

    * * * * * php /home/officela/public_html/groupofficecli.php -c=/home/officela/public_html/config.php -r=core/cron/run -q

    I tried to run via ssh and there is no problem.

    php /home/officela/public_html/groupofficecli.php -c=/home/officela/public_html/config.php -r=core/cron/run -q


    I asked Group Office support they told me that our cronjob is not running PHP_SAPI as CLI.

    Is there a fix or config cronjob php run as CLI?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Try using the full path to PHP to see if that helps. EX:

    Code:
    /usr/local/bin/php
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice