com web/php: Quickfix for PHP builtin webserver: include/prepend.inc
| From: | Hannes Magnusson | Date: | Wed, 20 Nov 2013 02:37:33 +0000 |
| Subject: | com web/php: Quickfix for PHP builtin webserver: include/prepend.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17051@lists.php.net to get a copy of this message | ||
Commit: bb25868f0c5702a81f500d2d06b713040710aa3a
Author: Hannes Magnusson <bjori@mongodb.com> Tue, 19 Nov 2013 18:36:23 -0800
Parents: 989246fb3b836e1695d3d869bac4ad11756bd774
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=bb25868f0c5702a81f500d2d06b713040710aa3a
Log:
Quickfix for PHP builtin webserver
Changed paths:
M include/prepend.inc
Diff:
diff --git a/include/prepend.inc b/include/prepend.inc
index 54c135f..949cc36 100644
--- a/include/prepend.inc
+++ b/include/prepend.inc
@@ -15,6 +15,12 @@ if (ini_get("date.timezone") === "" &&
function_exists("date_default_timezone_se
date_default_timezone_set("UTC");
}
+
+/* Compatability with the PHP webserver.. */
+if (!isset($_SERVER["SERVER_ADDR"])) {
+ $_SERVER["SERVER_ADDR"] = "127.0.0.1";
+}
+
// As of PHP 5.3.0 multibyte sequence errors are no longer
// silent. Prior to that version this bitfield does not exist
// so define it to prevent notices on older versions