php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60480 SERVER_ADDR should be present in server variables
Submitted: 2011-12-09 13:46 UTC Modified: 2011-12-10 15:55 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: lolautruche at gmail dot com Assigned: laruence (profile)
Status: Wont fix Package: Built-in web server
PHP Version: 5.4.0RC3 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-12-09 13:46 UTC] lolautruche at gmail dot com
Description:
------------
Hi

Currently, SERVER_ADDR is absent from server variables, so that it needs to be 
defined in a router script. IMHO this variable should be available out-of-the-
box.

Thanks !


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-10 03:21 UTC] laruence@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: laruence
 [2011-12-10 03:21 UTC] laruence@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

I added SERVER_NAME yesterday,  since it is handy.  you can use that instead :)
 [2011-12-10 14:28 UTC] lolautruche at gmail dot com
-Status: Feedback +Status: Assigned
 [2011-12-10 14:28 UTC] lolautruche at gmail dot com
Thanks ! Works smoothly :).
However, I still need to do $_SERVER['SERVER_ADDR'] = 
gethostbyname($_SERVER['SERVER_NAME']) in order to get SERVER_ADDR, resulting 
some overhead in the router script.
 [2011-12-10 15:55 UTC] laruence@php.net
okey, since there is no a handy value of that, won't fix now ~
 [2011-12-10 15:55 UTC] laruence@php.net
-Status: Assigned +Status: Wont fix
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC