Riven Posted February 25, 2018 Share Posted February 25, 2018 I seem to have a similar problem When I run php -q /path/to/cron.php as root, it works. When I run php -q /path/to/cron.php debug as root I get this [Symfony\Component\Console\Exception\CommandNotFoundException] Command "debug" is not defined. But, if I "su user" and run that command as the user(after giving it Jailed Shell access) , I get Could not open input file: /home/user/path/to/cron.php No, I have tried this in the default crons directory as well as in a custom directory cron.php tried in 0644, 0755 and even 0777 with the same result. /usr/local/bin/php -q /home/user/path/to/cron.php also gives me the same error. What could I be missing Using PHP 7.0 WHMCS Version: 7.4.2 Dirk Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted February 26, 2018 Share Posted February 26, 2018 Hi @Riven I have separated your issue into its own thread. Rather than debugging using "php -q /path/to/cron.php debug" the command php -q /path/to/cron.php -F all -vvv Will force your cron to run in full and debug, please enable Display & Log Errors under Setup > General Settings > Other prior to running the above command The permissions 0644 should be sufficient, is the user that you are running the jailed user as the same that owns cron.php? Link to comment Share on other sites More sharing options...
twhiting9275 Posted February 26, 2018 Share Posted February 26, 2018 If you try (as the jailed user) to cd to /home/user/path/to/ (ignore the cron.php) , does it work? What is the output of ls -la /home/user/path/to/cron.php (as the jailed user)? Assuming, of course, you've changed /home/user/path/to/ to the proper path, there shouldn't be a problem Link to comment Share on other sites More sharing options...
Riven Posted February 26, 2018 Author Share Posted February 26, 2018 Chris my path to the crons is as follow /home/hosting/crons/cron.php I am using the jailed shell with user hosting With the command you send I get this. Debug is on and file permission is 0644 -jailshell-4.2$ php -q /home/hosting/crons/cron.php -F all -vvv Could not open input file: /home/hosting/crons/cron.php Twihiting, -jailshell-4.2$ ls -la /home/hosting/crons/cron.php ls: cannot access /home/hosting/crons/cron.php: No such file or directory But, I can get half of that to give a reply, but not with the /crons/ or any other folder -jailshell-4.2$ ls -la /home/hosting/ total 8 drwxr-xr-x 2 root root 4096 Oct 11 2016 . drwxr-xr-x 3 root root 4096 Oct 11 2016 .. Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted February 26, 2018 Share Posted February 26, 2018 @Riven This does appear to be a permissions issue with your jailed user and the user hosting not having access to the files and folder Link to comment Share on other sites More sharing options...
twhiting9275 Posted February 27, 2018 Share Posted February 27, 2018 I'm not sure it's necessarily permissions, maybe ownership At this point, you will likely need to have your server admin take a look at this, as it seems that something is most definitely off, either ownership, or permissions, or maybe a bit of both. Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Alex Posted March 4, 2018 WHMCS Technical Analyst II Share Posted March 4, 2018 Hello, Thank you for your post! I see two very similar errors in your latest update: Could not open input file: /home/hosting/crons/cron.php cannot access /home/hosting/crons/cron.php: No such file or directory In addition to the suggestions of others, have you verified this is the correct path to your cron file? For example, in my test installation, my cron.php file is inside a '/crons' directory, if I spell that incorrectly as '/cron' rather than 'crons/' it will produce the same error, here is my test producing this: [root@alex ~]# php -q /home/v74whmcssupport/public_html/whmcs/cron/cron.php Could not open input file: /home/v74whmcssupport/public_html/whmcs/cron/cron.php Link to comment Share on other sites More sharing options...
Casey Posted April 25, 2018 Share Posted April 25, 2018 Hello all, I have this problem as well. When the root account or the jailed shell account tries to run cron.php from CLI the following error appears: Command: php -q /path/to/cron.php -F all -vvv Output: The file /path/to/cron.php is corrupted. I put a new cron.php and even tried a backup. Both did not work. Everything worked for a few days before. No changes in permissions was made. Any additional help would be appreciated. Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Alex Posted April 25, 2018 WHMCS Technical Analyst II Share Posted April 25, 2018 Hello, Can you please execute the command below in the CLI on your server and post it's output back into this thread? php -v I suspect that you are using WHMCS version 7.5. and the PHP configuration that your cron is executing under does not have Ioncube Loaders version 10.0.1 or above: http://help.whmcs.com/m/75601/l/851363-troubleshooting-a-the-file-path-to-whmcs-index-php-is-corrupted-error Link to comment Share on other sites More sharing options...
Casey Posted April 25, 2018 Share Posted April 25, 2018 WHMCS Alex, Thank you for your message. It turned out to be a php memory limit, which was very strange. It worked for many days on WHMCS 7.5 then quit 2 days ago. The only updates were to WHMCS and that was to 7.5.1. Link to comment Share on other sites More sharing options...
Recommended Posts