Welcome Guest, Not a member yet? Register   Sign In
CLI issues
#4

[eluser]toopay[/eluser]
In config, you could have something like :
Code:
if (defined('STDIN'))
{
   // You should hardcode the base url for cli, otherwise it will fails.
   $config['base_url'] = "http://yoursite.com/";
}
else
{
   $config['base_url'] = "http".((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "")."://".$_SERVER['HTTP_HOST'].str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
}
Above code should fix the error you received, but maybe you will need to tweak your htaccess too if something still goes wrong.


Messages In This Thread
CLI issues - by El Forum - 07-21-2011, 12:44 PM
CLI issues - by El Forum - 07-22-2011, 03:14 AM
CLI issues - by El Forum - 07-22-2011, 06:04 AM
CLI issues - by El Forum - 07-22-2011, 08:39 AM
CLI issues - by El Forum - 07-22-2011, 08:59 AM
CLI issues - by El Forum - 07-25-2011, 09:56 PM
CLI issues - by El Forum - 10-11-2013, 05:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB