summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2012-06-05 21:35:48 -0700
committerBharat Mediratta <bharat@menalto.com>2012-06-05 21:35:48 -0700
commitc5088801598dba3a63034871cdf1073d4a288e80 (patch)
treefcd4db750d622853d973d5fdc28853cdad1e7d49
parente901645d59274e7d51281520f4ec0db437d7ae69 (diff)
Prevent Gallery from running on Windows. Fixes #1883.
-rw-r--r--index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.php b/index.php
index 689c0770..9a6cc2ea 100644
--- a/index.php
+++ b/index.php
@@ -24,6 +24,11 @@ define("IN_PRODUCTION", true);
version_compare(PHP_VERSION, "5.2.3", "<") and
exit("Gallery requires PHP 5.2.3 or newer (you're using " . PHP_VERSION . ")");
+// Gallery is not supported on Windows.
+if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+ exit("Gallery is not supported on Windows (PHP reports that you're using: " . PHP_OS . ")");
+}
+
// PHP 5.4 requires a timezone - if one isn't set date functions aren't going to work properly.
// We'll log this once the logging system is initialized (in the gallery_event::gallery_ready).
if (!ini_get("date.timezone")) {