#30623 [Opn->Bgs]: Returns a wrong port info($_SERVER["SERVER_PORT"])
| From: | tony2001@php.net | Date: | Tue, 16 Nov 2004 16:05:03 +0000 |
| Subject: | #30623 [Opn->Bgs]: Returns a wrong port info($_SERVER["SERVER_PORT"]) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69146@lists.php.net to get a copy of this message | ||
ID: 30623
Updated by: tony2001@php.net
Reported By: artemsd at rambler dot ru
-Status: Open
+Status: Bogus
Bug Type: *Web Server problem
Operating System: Windows 2000 sp4
PHP Version: 4.3.9
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
This is Apache issue.
Set UseCanonicalName to Off in your httpd.conf and it'll work as you're
expecting.
Previous Comments:
------------------------------------------------------------------------
[2004-10-30 19:35:35] artemsd at rambler dot ru
PHP 4.3.9 works as CGI
PHP 5.0.2 works as Apache module
Apache version is 2.0.50
------------------------------------------------------------------------
[2004-10-30 19:18:09] artemsd at rambler dot ru
Description:
------------
PHP is sure, that web-server listens 80 port, but it is wrong.
This bug is only by PHP 4, by PHP 5 this is correct.
From phpinfo():
HTTP_HOST *.dyndns.org:81
----
SERVER_PORT 80
Reproduce code:
---------------
$serverPort = $_SERVER["SERVER_PORT"];//80, but must be 81
Expected result:
----------------
$serverPort = 81;
Actual result:
--------------
$serverPort = 80;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30623&edit=1