News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Error: Undefined array key "SERVER_SOFTWARE"

Started by aceone, April 01, 2022, 04:37:01 AM

Previous topic - Next topic

aceone

I geht this error all the in my smf 2.1 which was upgraded with large patch from 2.0 and converted from mybb. Everything seems to work but this error still shows up.
Fehler
Art des Fehlers
Undefined_vars
Fehlermeldung
2: Undefined array key "SERVER_SOFTWARE"
Datei
/srv/hps/pub/smf/Sources/Subs-Admin.php
Zeile
113
URL der Seite die den Fehler erzeugte
https://forum.example.com/index.php?action=admin;area=index;ac0fec39=0b2afcadadfe252ed7f8d43a4c9b8ae4
Backtrace-Informationen

    #0: smf_error_handler()
    Aufgerufen von /srv/hps/pub/smf/Sources/Subs-Admin.php in Zeile 113
    #1: getServerVersions()
    Aufgerufen von /srv/hps/pub/smf/Sources/Admin.php in Zeile 551
    #2: AdminHome()
    Aufgerufen von /srv/hps/pub/smf/Sources/Admin.php in Zeile 499
    #3: AdminMain()
    Aufgerufen von /srv/hps/pub/smf/index.php in Zeile 187


Doug Heffernan

This looks to be an issue with the server and not Smf. It looks like the $_SERVER['SERVER_SOFTWARE'] is not working on your server.

Can you check your phpinfo and see if a valid SERVER["SERVER_SOFTWARE"] value has been set?

What is a phpinfo() file?

P.s. What is your php version btw?

Arantor

More than PHP version, what server are you using PHP with? Apache, nginx or something else?
Holder of controversial views, all of which my own.


aceone

This is an Gentoo Server with nginx + php-fpm 8.0.
I couldn't find the SERVER_SOFTWARE variable in my php-info.

Oldiesmann

If it's set, $_SERVER['SERVER_SOFTWARE'] will be in the "PHP Variables" section of phpinfo near the bottom of the page

aceone

I have set the variable via fpm pool like this:
env[SERVER_SOFTWARE] = nginxNow I See it in php info.

Advertisement: