Jump to content

Cron not working


Riven

Recommended Posts

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

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

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

  • WHMCS Technical Analyst II

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

  • 1 month later...

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

  • WHMCS Technical Analyst II

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

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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated