[Solved] CakePHP 3.5 Shell suddenly stopped working

I’m working on a system that is built with CakePHP 3.5, this system has multiple Cron Jobs that run throughout the day.

These cron jobs have always been executed in the following format:

/home/myuser/public_html/bin/cake shell_name command_name args

When the crons run they usually output their progress in the default system email that the server sends, for example:

Welcome to CakePHP v3.4.11 Console
App : src
Path: /home/myuser/public_html/src/
PHP : 5.6.31
Starting Thirty Minute Report Email Cron (JSON and PDF files).... 
 - Report 1 complete
 - Report 2 complete
Report emails sent.
Cron Finished.

Yesterday, with no changes to the shell code (All I did was add the AWS SDK via composer, but I’ve tried reverting that and still the same), these crons have stopped working.

Now all that is output is the CakePHP 3.5 Shell Helper:

Welcome to CakePHP v3.4.11 Console
App : src
Path: /home/myuser/public_html/src/
PHP : 5.6.31
Current Paths:

* app:  src
* root: /home/myuser/public_html
* core: /home/myuser/public_html/vendor/cakephp/cakephp

Available Shells:

[Bake] bake

[Migrations] migrations

[CORE] cache, i18n, orm_cache, plugin, routes, server

[app] console, backups, tasks

To run an app or core command, type `cake shell_name [args]`
To run a plugin command, type `cake Plugin.shell_name [args]`
To get help on a specific command, type `cake shell_name --help`

What is strange, is that if I run these commands via SSH (on the live production server) then they execute no problem, they also execute on localhost too.

I’m following the correct format as described in CakePHP docs, here’s my shell:

namespace App\Shell;

use Cake\Console\Shell;
use Cake\Core\Configure;

class TasksShell extends Shell {

    public function thirtyMinReport() {
      /** CODE **/


and the cron being run is:

/home/myuser/public_html/bin/cake tasks thirty_min_report

Today I’ve also tried variations of it:

/home/myuser/public_html/bin/cake tasks thirtyMinReport
/home/myuser/public_html/bin/cake Tasks thirtyMinReport
php /home/myuser/public_html/bin/cake.php Tasks thirtyMinReport
cd /home/myuser/public_html && bin/cake Tasks thirtyMinReport

Doing a quick search of the CakePHP forums, I’ve found somebody also had the same issue as me, but it was unresolved… check it out here.

What can I be overlooking that is stopping the cron shell_name and command_name from being executed?

To answer my own question, and for anybody who is having trouble, I managed to find the answer to this myself.

Some reason unknown to me, the server php config had been updated, and now register_argc_argv was set to Off.

I re-enabled this and the cron jobs are working again.

register_argc_argv = On

This edit was made to /opt/alt/php56/etc/php.ini