I am facing this error while cli call.
![[Image: Untitled.jpg]](https://s22.postimg.org/je2ullmsx/Untitled.jpg)
CLI run error
|
I am facing this error while cli call.
![]()
11-26-2016, 02:44 AM
12-01-2016, 10:34 AM
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
12-01-2016, 10:45 AM
(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.
12-01-2016, 11:33 PM
Hi,
You use the $_SERVER array in your config file. This is useless when running from the command line. A good decision is based on knowledge and not on numbers. - Plato
12-02-2016, 04:40 AM
(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.
12-02-2016, 05:10 AM
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_" A good decision is based on knowledge and not on numbers. - Plato
|