From d860f1ad28c9378626646e6b6a78c7677cff958c Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 14 Mar 2012 10:21:55 +0100 Subject: [PATCH] MDL-32043 add support for built-in PHP Development Server --- lib/setuplib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/setuplib.php b/lib/setuplib.php index ccbcad6d187..e217d9a063a 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -853,7 +853,11 @@ function setup_get_remote_url() { //obscure name found on some servers - this is definitely not supported $rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded - } else { + } else if (strpos($_SERVER['SERVER_SOFTWARE'], 'PHP') === 0) { + // built-in PHP Development Server + $rurl['fullpath'] = $_SERVER['REQUEST_URI']; + + } else { throw new moodle_exception('unsupportedwebserver', 'error', '', $_SERVER['SERVER_SOFTWARE']); }