Undefined index: SCRIPT_NAME

Open to all! Ask other shopowners for help.
Post Reply
Owl
Member
Posts: 38
Joined: Sun Feb 28, 2021 8:03 pm
Phoenix Version:
Has thanked: 13 times

Undefined index: SCRIPT_NAME

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
zipurman
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Has thanked: 93 times
Been thanked: 162 times

Re: Undefined index: SCRIPT_NAME

Post by zipurman »

What OS are you running on the server?
zipurman
-----------
Owl
Member
Posts: 38
Joined: Sun Feb 28, 2021 8:03 pm
Phoenix Version:
Has thanked: 13 times

Re: Undefined index: SCRIPT_NAME

Post 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)
User avatar
zipurman
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Has thanked: 93 times
Been thanked: 162 times

Re: Undefined index: SCRIPT_NAME

Post 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.
zipurman
-----------


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply