php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33477 $_ENV['REMOTE_PORT'] not valid
Submitted: 2005-06-26 01:58 UTC Modified: 2005-06-26 16:57 UTC
From: spiderman_gtp at hotmail dot com Assigned:
Status: Not a bug Package: Network related
PHP Version: 5.0.4 OS: Win2K AS
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spiderman_gtp at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-06-26 01:58 UTC] spiderman_gtp at hotmail dot com
Description:
------------
$_ENV['REMOTE_ADDR'] returns the correct value of the IP of the remote user,

$_ENV['REMOTE_PORT'] generates:

Notice: Undefined index: REMOTE_PORT in ...


Reproduce code:
---------------
see description .. i also tried $HTTP_ENV ... and $_SERVER and none seem to work

Expected result:
----------------
expected to return the remote users port number

Actual result:
--------------
Notice: Undefined index: REMOTE_PORT in ...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-26 12:51 UTC] sniper@php.net
If it's not set then it's not set by the webserver.
Not PHP problem since PHP only fills the $_ENV variable with the environment variables which actually are SET.



 [2005-06-26 16:57 UTC] spiderman_gtp at hotmail dot com
fair enough ... so how would i SET the variable on the webserver? I don't recall setting the 'REMOTE_ADDR' on the webserver, and it works fine ... all i am looking for is determining the client request port number .. perhaps this is not a bug, as you say, but it is listed in the documentation and there is no mention of set or not set ... is this an IIS setting issue?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC