Support

Akeeba Solo

#30520 PHP errors when trying to run a cron job

Posted in ‘Akeeba Solo (standalone)’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
Akeeba Solo version
n/a

Latest post by [email protected] on Tuesday, 27 November 2018 09:14 CST

[email protected]
Hi there
I have solo installed, and from the web front end it runs fine. I tried to set up a cron job to run one of the profiles.

using the cron command /opt/alt/php70/usr/bin/php /home/ringingt/public_html/ringingteachers.org/solo/cli/backup.php > public_html/ringingteachers.org/solo/cli/backup-log.txt 2>&1

I get the following errors in the log file:

[16-Nov-2018 19:50:02 Europe/London] PHP Notice: Undefined variable: argv in /home/ringingt/public_html/ringingteachers.org/solo/cli/backup.php on line 107
[16-Nov-2018 19:50:02 Europe/London] PHP Fatal error: Call to undefined function Awf\Registry\Format\json_decode() in /home/ringingt/public_html/ringingteachers.org/solo/Awf/Registry/Format/Json.php on line 60
[16-Nov-2018 20:00:02 Europe/London] PHP Notice: Undefined variable: argv in /home/ringingt/public_html/ringingteachers.org/solo/cli/backup.php on line 107
[16-Nov-2018 20:00:02 Europe/London] PHP Fatal error: Call to undefined function Awf\Registry\Format\json_decode() in /home/ringingt/public_html/ringingteachers.org/solo/Awf/Registry/Format/Json.php on line 60
[16-Nov-2018 20:10:02 Europe/London] PHP Notice: Undefined variable: argv in /home/ringingt/public_html/ringingteachers.org/solo/cli/backup.php on line 107
[16-Nov-2018 20:10:02 Europe/London] PHP Fatal error: Call to undefined function Awf\Registry\Format\json_decode() in /home/ringingt/public_html/ringingteachers.org/solo/Awf/Registry/Format/Json.php on line 60

What should I be checking next?

Best regards
Steve

nicholas
Akeeba Staff
Manager
You are using the PHP CGI instead of PHP CLI binary. Please ask your host for the correct path to the PHP CLI binary and use that in your CRON command line instead of /opt/alt/php70/usr/bin/php. That's the reason for the first warning. If they cannot do that, no problem, the backup will work despite the warning.

Furthermore, you need to ask your host to enable the PHP JSON module. That's the reason for the fatal error which prevents the backup from working at all. Please remember that each version of PHP and each binary of the same PHP version has its own configuration. Just because PHP JSON support is enabled for the web server doesn't mean you'll have it under the CLI>

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

[email protected]
Thanks. It transpires that this host doesn’t offer php-cli so i have enabled front end backup and swapped to a wget command.

This ticket can be closed

Thanks

S

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!