title: CakePHP Console Issue after Upgrade to PHP 5.4
body: <p>I have a CakePHP app running on a shared host who recently upgraded me to PHP 5.4.x. For the most part, everything went smoothly, but now my shells won't run:</p>
  
  <pre><code>CakePHP Console: This file has been loaded incorrectly and cannot continue.Please make sure that /cake/console is in your system path,and check the manual for the correct usage of this command.
  </code></pre>
  
  <p>Digging into <code>cake/console/cake.php</code>, it appears that the failure is occurring in this block:</p>
  
  <pre><code>if (!isset($this-&gt;args[0]) || !isset($this-&gt;params['working'])) {
  # debug($this-&gt;args);
  # debug(isset($this-&gt;args[0]));
    $this-&gt;stderr("\nCakePHP Console: ");
    $this-&gt;stderr('This file has been loaded incorrectly and cannot continue.');
    $this-&gt;stderr('Please make sure that ' . DIRECTORY_SEPARATOR . 'cake' . DIRECTORY_SEPARATOR . 'console is in your system path,');
    $this-&gt;stderr('and check the manual for the correct usage of this command.');
    $this-&gt;stderr('(http://manual.cakephp.org/)');
    $this-&gt;_stop();
  }
  </code></pre>
  
  <p>Specifically, the <code>$this-&gt;args</code> array is empty so there is no <code>0</code> index. This app is running CakePHP 1.3.17. I've checked another app running 1.3.16 and both the <code>cake</code> script and <code>cake.php</code> files are exactly the same. On the 1.3.16 site, though, the <code>$this-&gt;args[0]</code> value is set properly to the path of the script being called.</p>
  
  <p>Any idea why my newly upgraded site wouldn't be getting that same value sent? This is an app that hasn't been touched in months. The only change has been the PHP upgrade as far as I know and can tell.</p>
  
  <p>Any insight would be much appreciated.</p>