#37323 [Opn->Bgs]: SERVER_NAME not following apache directive
| From: | mike@php.net | Date: | Fri, 05 May 2006 16:32:40 +0000 |
| Subject: | #37323 [Opn->Bgs]: SERVER_NAME not following apache directive | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96661@lists.php.net to get a copy of this message | ||
ID: 37323
Updated by: mike@php.net
Reported By: jameslporter at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Apache2 related
Operating System: Gentoo
PHP Version: 5.1.4
New Comment:
This is what we get from Apache.
Previous Comments:
------------------------------------------------------------------------
[2006-05-05 06:00:13] jameslporter at gmail dot com
Description:
------------
$_SERVER[SERVER_NAME] needs to have the value of ServerName Directive
in Apache....it's not..it's using the url (www)...this is definitely
not the expected result and makes this variable useless....makes our
hostname on our SSL Cert not match.
Reproduce code:
---------------
<?php
echo $_SERVER['SERVER_NAME'];
?>
Expected result:
----------------
http://website.com/
website.com
http://www.website.com/
website.com
Actual result:
--------------
http://website.com/
website.com
http://www.website.com/
www.website.com
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37323&edit=1