• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command Line Controller without URI AUTO? CI2.0

[eluser]Darkroom Dave[/eluser]
Not sure if this is a bug or a feature.

But due to certain redirects for paypal I can't run uri_protocol="AUTO" so I am running PATH_INFO.

But that means I can't run controllers straight from the commandline (from cron)

/* SNIP URI.php */

function _fetch_uri_string()
if (strtoupper($this->config->item('uri_protocol')) == 'AUTO')
// Arguments exist, it must be a command line request
if ( ! empty($_SERVER['argv']))
$this->uri_string = $this->_parse_cli_args();

/* SNIP URI.php */

If you are not in AUTO it doesn't test for args.

My temporary solution is to check for args in my config file and swap back to auto for cron jobs.

But this behavior required me to look thru the code to figure out what was going on.

Dave Dula

[eluser]Eric Barnes[/eluser]
You may want to download the tip from https://bitbucket.org/ellislab/codeigniter-reactor/

I remember seeing a commit to change the way this works in the past week or so.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.