php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58447 apc.php $host = $_SERVER['SERVER_ADDR']
Submitted: 2008-12-07 07:04 UTC Modified: 2008-12-16 02:15 UTC
From: paulgao at yeah dot net Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.2.5 OS: Slackware
Private report: No CVE-ID: None
 [2008-12-07 07:04 UTC] paulgao at yeah dot net
Description:
------------
in fastcgi mode, HOSTNAME variable may not exist.

so, patch code is:

$host = getenv('HOSTNAME');
if($host) { $host = '('.$host.')'; }
else { $host = '(' . $_SERVER['SERVER_ADDR'] . ')'; }


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-07 20:03 UTC] shire@php.net
You are saying that the environment variable $HOSTNAME is not setup on your system?  Does php_uname('n') return the expected value?
 [2008-12-15 23:03 UTC] paulgao at yeah dot net
I have disabled all environment variables,(include HOSTNAME, etc.), for simpler usage.
I want to replace HOSTNAME variable with SERVER_ADDR.
 [2008-12-16 02:15 UTC] shire@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 17:01:31 2024 UTC