#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.
Saturday, 17 November 2018 13:01 CST
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
Custom Fields
PHP version (in x.y.z format) 7.0
Akeeba Solo version (x.y.x) 3.3.0
 
sj@rapid.demon.co.uk
Sunday, 18 November 2018 11:01 CST
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



Please keep in mind my timezone and cultural differences when reading my replies. Thank you!



nicholas
Tuesday, 27 November 2018 09:14 CST
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
 
sj@rapid.demon.co.uk
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

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!

Cookies Notification - Action required

This website uses cookies to provide user authentication and improve your user experience. Please indicate whether you consent to our site placing these cookies on your device. You can change your preference later, from the controls which will be made available to you at the bottom of every page of our site.