From 89ef0e6e1b99de2021ff308e9015fa7da665c269 Mon Sep 17 00:00:00 2001 From: thomascube Date: Wed, 13 Feb 2008 21:39:38 +0000 Subject: [PATCH] Check for 3rd party libs + test configured temp/logs dirs for write access + DRY --- check.php-dist | 95 +++++++++++++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/check.php-dist b/check.php-dist index f7fc0e787..800339063 100644 --- a/check.php-dist +++ b/check.php-dist @@ -56,6 +56,9 @@ $rctest_config['from'] = '_yourfrom_'; ******************************************** */ +define('CHECK_OK', 'OK'); +define('CHECK_NOK', 'NOT OK'); + error_reporting(E_ALL ^E_NOTICE); $include_path = dirname(__FILE__) . '/program/lib/'; @@ -64,10 +67,11 @@ $include_path .= dirname(__FILE__) . '/program/'; $include_path .= PATH_SEPARATOR; $include_path .= get_include_path(); +@ini_set('display_errors', 1); set_include_path($include_path); -$writable_dirs = array('logs/', 'temp/'); $create_files = array('config/db.inc.php', 'config/main.inc.php'); +$required_libs = array('PEAR' => 'PEAR.php', 'DB' => 'DB.php', 'Net_SMTP' => 'Net/SMTP.php', 'Mail_mime' => 'Mail/mime.php', 'iilConnection' => 'lib/imap.inc'); $path = dirname(__FILE__) . '/'; $check = basename(__FILE__); @@ -80,6 +84,8 @@ $check = basename(__FILE__);