|  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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
10 + 44 = ?
Subscribe to this entry?

 [2005-06-26 01:58 UTC] spiderman_gtp at hotmail dot com
$_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 ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-26 12:51 UTC]
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-2020 The PHP Group
All rights reserved.
Last updated: Wed May 27 04:01:26 2020 UTC