• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CLI run error

#1
I am facing this error while cli call.

[Image: Untitled.jpg]
Reply

#2
(11-25-2016, 04:27 AM)Vimal Wrote: I am facing this error while cli call.

[Image: Untitled.jpg]

explain more
Reply

#3
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
Reply

#4
(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.

[Image: Untitled.jpg]

explain more

Calling controller function in Command Line.
Reply

#5
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

Reply

#6
(12-01-2016, 11:33 PM)salain Wrote: Hi,

You use the $_SERVER array in your config file. This is useless when running from the command line.

$_SERVER is not useless.
But $_SERVER['HTTP_HOST'] doesn't exist because it comes from the HTTP Host header.
Reply

#7
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

Reply

#8
so what is solution?

Edit.
Oops. I used $_SERVER['HTTP_HOST'] in config.php file for baseurl. Removed.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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