Welcome Guest, Not a member yet? Register   Sign In
CLI run error
#1

(This post was last modified: 11-25-2016, 04:28 AM by Vimal.)

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

(This post was last modified: 12-08-2016, 01:28 PM by Vimal.)

so what is solution?

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




Theme © iAndrew 2016 - Forum software by © MyBB