title: CodeIgniter + Command Line + Cron + Cpanel
body: <p>SOLVED:
  Crap... why is it always you figure something out right AFTER you finally decided to ask for help!! </p>
  
  <p>If anyone else is having this problem, try running from /usr/local/bin/php instead of /usr/bin/php to get codeigniter to pick up on the URI segments.</p>
  
  <p>QUESTION</p>
  
  <p>I have the latest installation of codeigniter and everything seems to be working fine locally.  I recently put my files on my server and everything except my cron command is working.</p>
  
  <p>When I try to call a controller through cron (as described here: <a href="http://codeigniter.com/user_guide/general/cli.html" rel="nofollow noreferrer">http://codeigniter.com/user_guide/general/cli.html</a>), I am not getting the controller.  Instead, the output I get is simply my default controller (login page).</p>
  
  <p>This worked fine locally and the index.php IS getting called because I'm getting emailed the output from the default page.  </p>
  
  <p>Someone asked a similar question here: <a href="https://stackoverflow.com/questions/8332278/codeigniter-cron-job-on-shared-hosting">CodeIgniter Cron Job on Shared Hosting?</a>  Responders suggested that it was a problem with Cpanel (which is what i'm now trying to use to set up the cron job), but talking to my hosting provider, they said the whole command is being run.  Nevertheless, CI isn't grabbing the URI for the controller.   I also checked to make sure the base_url is set correctly (which is proven by the file working fine through a URL call).</p>
  
  <p>Any thoughts? I just can't seem to figure out why it's not grabbing the URI when in command line format: /usr/bin/php index.php controller_class method</p>