note 127368 added to function.apache-get-version

From: Date: Sat, 30 Jul 2022 06:34:33 +0000
Subject: note 127368 added to function.apache-get-version
Groups: php.notes 
Request: Send a blank email to php-notes+get-219082@lists.php.net to get a copy of this message
On my server apache_get_version() will end all web page output, just like die(), with no errors. So use; <?php if(function_exists("apache_get_version")){ $AVerpache = apache_get_version(); } else { $AVerpache = "unknown"; } print $AVerpache; ?> The following may work on your server and return "Apache/x.x.xx" <?php print $_SERVER["SERVER_SOFTWARE"]; ?> but on mine it only returns "Apache". ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.133 (proxied: 2a02:c7c:2a1f:d800:a10a:72d0:bf6e:8415) ---- Manual Page -- https://php.net/manual/en/function.apache-get-version.php Edit -- https://main.php.net/note/edit/127368 Del: integrated -- https://main.php.net/note/delete/127368/integrated Del: useless -- https://main.php.net/note/delete/127368/useless Del: bad code -- https://main.php.net/note/delete/127368/bad+code Del: spam -- https://main.php.net/note/delete/127368/spam Del: non-english -- https://main.php.net/note/delete/127368/non-english Del: in docs -- https://main.php.net/note/delete/127368/in+docs Del: other reasons-- https://main.php.net/note/delete/127368 Reject -- https://main.php.net/note/reject/127368 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219082) next »