From d9e9eb462d6bcbef019d36f4175b5e26b453f1ea Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sat, 7 Feb 2009 03:54:36 +0000 Subject: add a check for Windows + PHP < 5.3 and update readme to reflect new requirements --- docs/README | 4 +++- lib/init.php | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/README b/docs/README index 295f86c9..1e9d284c 100755 --- a/docs/README +++ b/docs/README @@ -104,7 +104,7 @@ Contents: 2. Getting all the components Apache >= 1.3.x http://www.apache.org OR other web server - PHP >= 5.1.x http://www.php.net + PHP >= 5.1.x http://www.php.net ** PHP5-Mysql PHP5-Session PHP5-gd (recommended) @@ -112,6 +112,8 @@ Contents: PHP5 ZLIB support (recommended) MySQL >= 5.x+ http://www.mysql.com + ** PHP 5.3.x is required for Windows systems + 3. Setting Up Please see the included INSTALL file or if possible the wiki diff --git a/lib/init.php b/lib/init.php index a6dd443b..57d5f243 100644 --- a/lib/init.php +++ b/lib/init.php @@ -31,6 +31,10 @@ if (strcmp('5.0.0',phpversion()) > 0) { echo "ERROR: Ampache requires PHP5"; exit; } +if (strtoupper(substr(PHP_OS,0,3)) == 'WIN' AND strcmp('5.3.0',phpversion()) > 0) { + echo "Error: Ampache Requires PHP5.3 when running on Windows"; + exit; +} error_reporting(E_ERROR); // Only show fatal errors in production -- cgit