As I said, die(2) would be inconsistent with the documentation and outright wrong as it would
print out the character 2. It would not set the error level to 2, which is what is documented. Moreover our documentation states:
The akeeba-backup.php script will return a different exit code, depending on the backup status. When the backup is successful and without warnings, the exit code will be 0. When the backup completed but with warnings, the exit code will be 1. Finally, if the backup fails, the exit code will be 2. This allows you to check the backup status, for example inside a shell script, for automation purposes.
Line 76 is only executed BEFORE the backup even starts. Actually, it occurs before the Joomla! CLI application dependencies are loaded, let alone our CRON script have he chance to run. It's part of the pre-run check which only checks the PHP version. Changing the exit status (errorlevel) to 2 at this point would be
INCONSISTENT with our documentation which declares that the exist status is only modified as the result of
backup warnings and errors.
Finally, please note that before you schedule an unattended CRON job you
must make sure that the minimum system requirements are met and it actually runs. When the line you mention executes you are receiving a message similar to the following:
================================================================================
WARNING! Incompatible PHP version 5.2.15
================================================================================
This CRON script must be run using PHP version 5.3.1 or later. Your server is
currently using a much older version which would cause this script to crash. As
a result we have aborted execution of the script. Please contact your host and
ask them for the correct path to the PHP CLI binary for PHP 5.3.1 or later, then
edit your CRON job and replace your current path to PHP with the one your host
gave you.
For your information, the current PHP version information is as follows.
PATH: /usr/bin/php-ancient
VERSION: 5.2.15
Further clarifications:
1. There is absolutely no possible way that you are receiving this warning in
error. We are using the PHP_VERSION constant to detect the PHP version you
are currently using. This is what PHP itself reports as its own version. It
simply cannot lie.
2. Even though your *site* may be running in a higher PHP version that the one
reported above, your CRON scripts will most likely not be running under it.
This has to do with the fact that your site DOES NOT run under the command
line and there are different executable files (binaries) for the web and
command line versions of PHP.
3. Please note that you MUST NOT ask us for support about this error. We cannot
possibly know the correct path to the PHP CLI binary as we have not set up
your server. Your host must know and give that information.
4. The latest published versions of PHP can be found at http://www.php.net/
Any older version is considered insecure and must NOT be used on a live
server. If your server uses a much older version of PHP than that please
notify them that their servers are insecure and in need of an update.
This script will now terminate. Goodbye.
When you see THAT message you don't need an exit code. It's not something that broke "suddenly". It's something that never worked, not the first time you tried using the ancient PHP version, not any later time. You need to fix your command line, not your configuration.
TL;DR:
This is not a bug. This ticket is closed.
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!