CLI run error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: CLI run error (/showthread.php?tid=66725) |
CLI run error - Vimal - 11-25-2016 I am facing this error while cli call. RE: CLI run error - milan alphansotech - 11-26-2016 (11-25-2016, 04:27 AM)Vimal Wrote: I am facing this error while cli call. explain more RE: CLI run error - Vimal - 12-01-2016 This errors comes When I am trying to run controller through command line. like http://site.com/user/hello in cmd >php index.php user hello RE: CLI run error - Vimal - 12-01-2016 (11-26-2016, 02:44 AM)milan alphansotech Wrote:(11-25-2016, 04:27 AM)Vimal Wrote: I am facing this error while cli call. Calling controller function in Command Line. RE: CLI run error - salain - 12-01-2016 Hi, You use the $_SERVER array in your config file. This is useless when running from the command line. RE: CLI run error - Narf - 12-02-2016 (12-01-2016, 11:33 PM)salain Wrote: Hi, $_SERVER is not useless. But $_SERVER['HTTP_HOST'] doesn't exist because it comes from the HTTP Host header. RE: CLI run error - salain - 12-02-2016 You are right I did not write that very well. Sorry about that, better answer When running from the command line the $_SERVER array does not set most of the items stating with "HTTP_", "SERVER_" and "REMOTE_" RE: CLI run error - Vimal - 12-08-2016 so what is solution? Edit. Oops. I used $_SERVER['HTTP_HOST'] in config.php file for baseurl. Removed. |