Support

Akeeba Backup for Joomla!

#27903 akeeba backup cron reports an older version of PHP

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
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

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by the gorilla on Wednesday, 07 June 2017 09:03 CDT

the gorilla
Hello Akeeba,

Akeeba Backup cron reports that my php version is 5.6.30.

You are using Joomla! 3.7.2 on PHP 5.6.30 (cli)


However, my Joomla installation is using php 7.0.19. This exact same issue exists on my Wordpress installations so this is not unique to Joomla. By the way, I'm hosting with SiteGround.

I'm sure there is a self-evident reason for this, but I'm not getting it. I'd appreciate it if you would enlighten me.

Many thanks and still love Akeeba Backup and Tools!

Chris

nicholas
Akeeba Staff
Manager
The version of PHP you are using on your web server and the PHP version you are using on CLI can be different as they are two different and completely separate executable files. Please consult with your host for the correct path to the PHP 7.0 CLI executable. Once you get it (e.g. /usr/bin/php70/php-cli) use it in your CRON command line.

For example, if your current CRON command line reads:

/usr/bin/php /home/myaccount/public_html/wp-content/plugins/akeebabackupwp/app/cli/backup.php

and the correct path to the PHP 7.0 CLI executable is /usr/bin/php70/php-cli then the correct CRON command line should read

/usr/bin/php70/php-cli /home/myaccount/public_html/wp-content/plugins/akeebabackupwp/app/cli/backup.php

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!

the gorilla
Based on your answer I had a look at the php version that was set on my SiteGround account and it turned out, as you suggested, that the server was set to an older version. This is an issue with the way the SiteGround cPanel reports the php version that is a little counter-intuitive.

Thanks for the reply.

nicholas
Akeeba Staff
Manager
cPanel has a very confusing behavior which, however, does make sense if you think about it. The PHP version it reports is the PHP version cPanel itself runs under, not the PHP version your site runs under. The former is set at the time cPanel is installed or updated. The latter is something you can set per directory on your site. And that's exactly why it doesn't report the site's version of PHP: it can vary by directory. It's perfectly possible to have ten different scripts in ten different subdirectories of the same hosting account, each running a completely different version of PHP than the others. It's even possible to have a different PHP version in the front-end and back-end of your site leading to some incredible issues which are hard to debug and harder to explain to clients.

So, never, ever, EVER trust the PHP version reported by cPanel. It has nothing to do with your site.

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!

the gorilla
Thanks again for the support.

Regards,
Chris

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!