From 3af03e2f8e71aaf46b994d80145c8f3e105db47f Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Thu, 3 Dec 2015 17:29:46 +0100 Subject: [PATCH] Throw exception when used within the PHP builtin webserver --- admin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin.php b/admin.php index aebfdbf2..b233ada0 100644 --- a/admin.php +++ b/admin.php @@ -102,6 +102,9 @@ class AdminPlugin extends Plugin { // Only activate admin if we're inside the admin path. if ($this->active) { + if (php_sapi_name() == 'cli-server') { + throw new \RuntimeException('The Admin Plugin cannot run on the PHP built-in webserver. It needs Apache, Nginx or another full-featured web server.', 500); + } $this->grav['debugger']->addMessage("Admin Basic"); $this->initializeAdmin();