|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-05-05 06:00 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 08:00:01 2025 UTC |
<?php $envs = apache_getenv('Server_Name'); print_r($envs); ?> This will output www.website.com or website.com as well....I assume that this is truly what Apache reports then....Guess it goes up to them now?