- if 'egw-pear' exists, it is put in front of the include_path

- checking the php min-version of 4.3 now with version_compare and complain if it's not reached
This commit is contained in:
Ralf Becker 2007-01-01 14:35:44 +00:00
parent 5a397b7acb
commit 733e2cfe2d

View File

@ -22,11 +22,16 @@
error_reporting(E_ALL & ~E_NOTICE); error_reporting(E_ALL & ~E_NOTICE);
magic_quotes_runtime(false); magic_quotes_runtime(false);
if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+ $egw_min_php_version = '4.3';
if (!function_exists('version_compare') || version_compare(PHP_VERSION,$egw_min_php_version) < 0) //version_compare() is only available in PHP4.1+
{ {
echo 'eGroupWare requires PHP 4.1 or greater.<br>'; die("eGroupWare requires PHP $egw_min_php_version or greater.<br />Please contact your System Administrator to upgrade PHP!");
echo 'Please contact your System Administrator'; }
exit; // check if eGW's pear repository is installed and prefer it over the other ones
if (is_dir(EGW_SERVER_ROOT.'/egw-pear'))
{
set_include_path(EGW_SERVER_ROOT.'/egw-pear'.PATH_SEPARATOR.get_include_path());
//echo "<p align=right>include_path='".get_include_path()."'</p>\n";
} }
if (!defined('EGW_API_INC')) define('EGW_API_INC',PHPGW_API_INC); // this is to support the header upgrade if (!defined('EGW_API_INC')) define('EGW_API_INC',PHPGW_API_INC); // this is to support the header upgrade