ID: 51101 Updated by: ras...@php.net Reported By: balusc at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 5.3.1 New Comment:
As explained in the bug you are referencing, PHP doesn't set this at all. The value comes from the web server. If it is not set correctly, it is because your web server got it wrong. Previous Comments: ------------------------------------------------------------------------ [2010-02-20 21:26:09] balusc at gmail dot com Description: ------------ Environment: XAMPP 1.7.3 with Apache HTTPD 2.2.14 and PHP 5.3.1 on Windows XP SP3. Problem: $_SERVER['SERVER_NAME'] incorrectly returns the HTTP Host header. The $_SERVER['SERVER_NAME'] is supposed to return the server name as definied in the webserver. In this case, the ServerName property of Apache HTTPD's httpd.conf. It instead returns the HTTP Host header. This is likely a bug in the php5_module used. There was a similar bug report earlier http://bugs.php.net/bug.php?id=16867 but it was forwarded to Apache developers while the problem is likely in the php5_module. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51101&edit=1