Page 1 of 1

Undefined index: SCRIPT_NAME

Posted: Sun Jul 11, 2021 4:27 pm
by Owl
Greetings,

Im getting this error on Phoenix 1.0.8.0 @PHP 7.1-7.4. Any thoughts?

[11-Jul-2021 03:00:03 Europe/Lisbon] PHP Notice: Undefined index: SCRIPT_NAME in /xxx/xxx/xxx/xxx/includes/system/segments/application/request.php on line 17

many thanks in advance

Re: Undefined index: SCRIPT_NAME

Posted: Mon Jul 12, 2021 1:25 am
by zipurman
What OS are you running on the server?

Re: Undefined index: SCRIPT_NAME

Posted: Mon Jul 12, 2021 5:05 pm
by Owl
zipurman wrote: Mon Jul 12, 2021 1:25 am What OS are you running on the server?
Linux with MySQL 10.2.37-MariaDB-cll-lve
Apache HTTP server with PHP Versão: 7.4.16 (Zend: 3.4.0)

Re: Undefined index: SCRIPT_NAME

Posted: Mon Jul 12, 2021 5:58 pm
by zipurman
hmm. I was expecting you to say Windows Server even though your path looked like *nix only because the only case I could see where $_SERVER['SCRIPT_NAME'] was not defined in a google search was on Windows.

You should try creating a test.php file in the root of your store and just echo $_SERVER['SCRIPT_NAME']; to see if it shows anything. Not sure why that array key value would not be available to you in request.php as your server should have that available on all PHP pages.