#23868 [NEW]: _SERVER["SERVER_PORT"] returns port 80 regardless...
| From: | excalibur at hub dot org | Date: | Thu, 29 May 2003 01:32:17 +0000 |
| Subject: | #23868 [NEW]: _SERVER["SERVER_PORT"] returns port 80 regardless... | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-40619@lists.php.net to get a copy of this message | ||
From: excalibur at hub dot org
Operating system: FreeBSD 4.8-STABLE
PHP version: 4.3.1
PHP Bug Type: Unknown/Other Function
Bug description: _SERVER["SERVER_PORT"] returns port 80 regardless...
Hi All,
Got an issue with PHP 4.3.1 that has driven me up one wall and down the
other :> I managed to trace it back to the PHP global variables causing me
the problem, here's what's happend:
I have a number of webservers, some run on the default port 80, others on
port 81 or more. But using this code:
$test = $_SERVER['SERVER_PORT'];
var_dump($test);
prints out 80 each time, even if the apache server is natively running on
port 81.
for instance, in the phpinfo output on a URL of:
- http://webmail.test.com:81
I get:
_SERVER["SERVER_PORT"] | 80
as the result...
I'm running a stock freebsd build of Apache 1.3.27 with modssl compiled
in:
- apache+mod_ssl-1.3.27+2.8.14
a stock compile of PHP 4.3.1, with the config line of:
'./configure' '--with-apxs=/usr/local/sbin/apxs'
'--with-config-file-path=/usr/local/etc' '--enable-versioning'
'--with-regex=system' '--without-gd' '--without-mysql'
'--with-zlib'
'--with-bz2=/usr' '--with-mcrypt=/usr/local' '--with-imap=/usr/local'
'--with-mysql=/usr/local' '--with-pgsql=/usr/local'
'--with-ldap=/usr/local' '--with-expat-dir=/usr/local'
'--with-dom=/usr/local' '--enable-ftp' '--with-gettext=/usr/local'
'--with-pspell=/usr/local' '--enable-mbstring'
'--with-mcal=/usr/local'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-trans-sid' '--prefix=/usr/local' 'i386-portbld-freebsd4.8'
no other components are built in at this point, just a bare native
compile on everthing and a very simple script:
<?php
$test = $_SERVER["SERVER_PORT"];
var_dump($test);
?>
please let me know if I can provide anything else..
--
Edit bug report at http://bugs.php.net/?id=23868&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23868&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23868&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23868&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23868&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23868&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23868&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23868&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23868&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23868&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23868&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23868&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23868&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23868&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23868&r=gnused