Welcome Guest, Not a member yet? Register   Sign In
PHP Notice: Undefined variable: _SERVER
#1

(This post was last modified: 03-04-2019, 06:31 AM by makif.)

i was using nginx server and i  changed to apache 2.4. 
iam using ci 3.1.8 version
php version is 7.1.18
i guess server connection lost but why i have no idea why 

[Mon Mar 04 13:13:04.598041 2019] [php7:notice] [pid 4992:tid 1108] [client 51.11.0.4:56252] PHP Notice:  Undefined variable: _SERVER in C:\\Interface\\html\\application\\config\\config.php on line 28, referer: http://51.11.0.21/

PHP Code:
Line 27$root=(isset($_SERVER['HTTPS']) ? "https://" "http://").$_SERVER['HTTP_HOST'];
Line 28$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), ''$_SERVER['SCRIPT_NAME']);

Line 30$config['base_url'] = $root
Reply
#2

@makif,

Check your PHP.ini. Also, how did you install/configure Apache?

FYI: CI v3.1.10 is current version.
Reply
#3

(This post was last modified: 03-04-2019, 11:32 PM by makif.)

(03-04-2019, 08:25 AM)php_rocs Wrote: @makif,

Check your PHP.ini.  Also, how did you install/configure Apache?

FYI: CI v3.1.10 is current version.

i got once this error and i read some documents , for examle some author's  auto_globals_jit set off but i am not sure it will fix it, because i should be sure and i just wanna write here if anyone has this issue.
yeap i know ci 3.1.10  but i was using 3.1.9 and it had session issue then i change 3.1.8 and it's running well actually
for apache, i install as exe to another service
Reply




Theme © iAndrew 2016 - Forum software by © MyBB