Cron Management — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

Cron Management

How to setup cron to whmcs


  • this issue is due to the ioncube loader with cyberpanel 7.2 7.3 etc all being outdated
    You should still install it for the PHP version in use and then use that as a template to enable it.

    How i fixed it.

    You may find this helpful for the getting ioncube to work for php cli cronjobs for whmcs

    1. Put an phpinfo.php page in the directory of the site. go to the link

    2. ctrl+f look for "extension_dir"
    3. In my case it was
    For PHp 7.2
    for PHP 7.3

    4. Rename the original
    cd /usr/local/lsws/lsphp72/lib/php/20170718/

    cd /usr/local/lsws/lsphp73/lib/php/20180731/

    5. then upload the new copy of these loaders for those versions from

    cp /home/username/ /usr/local/lsws/lsphp72/lib/php/20170718/

    If your system default is php 7.2 there will be a cli for this version that needs the ioncube enabled as well so cronjobs will work.

    use nano/vi etc to edit and append this to the end.
    nano /etc/php/7.2/cli/php.ini
    zend_extension = /usr/local/lsws/lsphp72/lib/php/20170718/ioncube.s
    restart litespeed/openlitespeed

    Should work for both CLI and website PHP
  • Just an update in case your getting an error in whmcs php cli cron for the database connection issue.

    Critical Error

    Could not connect to the database.


    using an absolute path to the same version as the website is using with the -f vs -q works for me.
    so instead of this
    php -q /home/

    Using this:
    /usr/local/lsws/lsphp73/bin/php -f /home/

    After checking to see crons executed normally like im used to seeing on cPanel.

    If you notice it does not show the proper cron after added via webinterface using crontab -e to manually specify it should correct the issue.
  • edited May 2019
    I am on the latest release of OpenLiteSpeed and LSPHP and I am configured to PHP 7.3 and I have yet to see the issues you described with any of my cron jobs.
  • Well, thanks for the insight. I thought that was odd. I realized after more digging it was a symlink and permissions issue on this.

    What wasn't working.
    [email protected]:~$ stat /usr/bin/php
    File: /usr/bin/php -> /etc/alternatives/php

    The one that was working.
    [email protected]:~$ stat /usr/local/lsws/lsphp73/bin/php
    File: /usr/local/lsws/lsphp73/bin/php

    [email protected]:~# rm /usr/bin/php

    Made this the global default.
    [email protected]:~# cp /usr/local/lsws/lsphp73/bin/php /usr/bin/php

    Working beautifully now.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!