I’m currently looking to run a report via Cron to automatically look through records and send alert emails out to users based on certain conditions.
The Console command works fine but when I run from the command line I get
PHP Notice: Undefined variable: argv in /home/airleagu/deploys/admin_develop/Console/cake.php on line 46
Error: This file has been loaded incorrectly and cannot continue.
Please make sure that /lib/Cake/Console is in your system path,
and check the cookbook for the correct usage of this command.
#0 /home/airleagu/deploys/admin_develop/Cake/lib/Cake/Console/ShellDispatcher.php(54): ShellDispatcher->_initEnvironment()
#1 /home/airleagu/deploys/admin_develop/Cake/lib/Cake/Console/ShellDispatcher.php(65): ShellDispatcher->__construct(NULL)
#2 /home/airleagu/deploys/admin_develop/Console/cake.php(46): ShellDispatcher::run(NULL)
I’ve done some research and seen that I need “register_argc_argv” on, however I’m also led to believe that this flag is a bad security practise.
Looking for feedback / advice