PHP Configurationcheck |
php Version | ";
if (phpversion()>='5.1.0'){
if (phpversion()<'5.2.0') $check .=" | Version: " . phpversion() . "! You should think about upgrade to the current php version (get it here) | ";
else $check .="X | Version: " . phpversion() . " | ";
}
else $check .=" | Version: " . phpversion() . "! Your PHP Version is very old, please upgrade to version >=5.1.0 to use full mapbender functionality and reduce problems! PHP >= 5.2 is recommended. | ";
#php-schnittstelle
if(php_sapi_name() == 'cgi') $check.="interface | X | CGI-PHP |
";
else $check.="interface | X | Modul-PHP |
";
# path to php.ini
if (!get_cfg_var('cfg_file_path')) $check .="path to php.ini | | No Path to php.ini found |
";
else $check .="path to php.ini | X | " . get_cfg_var('cfg_file_path') . " |
";
# extension dir
if (!get_cfg_var('extension_dir')||get_cfg_var('extension_dir')=='') $check .="extension_dir | | no extension_dir set! |
";
else $check .="extension_dir | X | " . get_cfg_var('extension_dir') . "(check the path, is it correct?) |
";
# session.save_path
if (!get_cfg_var('session.save_path')) $check .="session.save_path | | please configure a session.save_path! |
";
else $check .="session.save_path | X | " . get_cfg_var('session.save_path') . " (check out the authorisation of the dir) |
";
# memory_limit
if (get_cfg_var('memory_limit')) $check .="memory Limit | X | " . get_cfg_var('memory_limit') . " (running in memory-trouble with printing? Perhaps raise your memory limit) |
";
else $check .="memory Limit | | memory_limit must be set (30M will be enough for the moment) |
";
# error_reporting
#Error Reporting: 6135 =>error_reporting = E_ALL & ~E_NOTICE (6135-8(E_NOTICE))
#Error Reporting: 1 => error_reporting = E_ERROR
#Error Reporting: 6143 => error_reporting = E_ALL
$check .="error-reporting | ";
if (get_cfg_var('error_reporting')==6143||get_cfg_var('error_reporting')==8) $check .=" | please set error_reporting to 'E_ALL & ~E_NOTICE' or 'E_ERROR' except for debugging |
";
elseif (get_cfg_var('error_reporting')==6135)$check .="X | ok, error_reporting = E_ALL & ~E_NOTICE | ";
elseif (get_cfg_var('error_reporting')==1)$check .="X | ok, error_reporting = E_ERROR | ";
else $check .=" | (Your error_reporting configuration is not implementet into this test yet. You shoul know what you are doing or set it to E_ALL & ~E_NOTICE) | ";
# session.save_handler
if (!get_cfg_var('session.save_handler')||get_cfg_var('session.save_handler')!='files') $check .="session.save_handler | | session.save_handler must be set to 'session.save_handler = files'! |
";
else $check .="session.save_handler | X | session.save_handler = " . get_cfg_var('session.save_handler') . " |
";
# file_uploads
$check .="file_Uploads | ";
if (get_cfg_var('file_uploads')=='1') $check .= "X | On |
";
else $check .= " | Off | ";
# allow_url_fopen
$check .="allow_url_fopen | ";
if (get_cfg_var('allow_url_fopen')=='1') $check .= "X | On |
";
else $check .= " | Off =>allow_url_fopen must be on read this | ";
# short_open_tag
$check .="short_open_tag | ";
if (get_cfg_var('short_open_tag')!='1') $check .= "X | Off |
";
else $check .= " | On => Displaying XML files will not work properly | ";
# json
$check .="JSON support | ";
if (Mapbender_JSON::usesNative()) $check .= "X | Native PHP |
";
else $check .= " | PEAR library, think about uprading to PHP >=5.2 (the library is error prone with huge data sets; some things like WMC load/save might not work properly) | ";
echo $check;
#################################################
#PHP Extensioncheck
#################################################
?>
PHP Extensioncheck |
MySQL check | | MySQL not installed! (You have to include mysql-extension if you want to use MySQL as MB-Database!) | ";
else $check="MySQL check | X | MySQL installed |
";
#PGSQL
if(!extension_loaded('pgsql')) $check.="PostgreSQL check | | PostgreSQL not installed (You have to include pgsql-extension if you want to use Postgres as MB-Database!) |
";
else $check.="PostgreSQL check | X | PostgreSQL installed |
";
#GD
if(extension_loaded('gd')) $check.="GD2 check | X | GD installed |
";
else $check.="GD2 check | | GD not installed (no printing possible) |
";
#mbstring
if(extension_loaded('mbstring')) $check.="mbstring check | X | mbstring installed |
";
else $check.="mbstring check | | PHP extension mbstring is not installed |
";
#gettext
if(extension_loaded('gettext')) $check.="gettext check | X | gettext installed |
";
else $check.="gettext check | | PHP extension gettext is not installed |
";
echo $check;
####################################
# Database check
####################################
?>
Database check |
Administration Database | X | MySQL | ";
$check .= "
Connect to Database | ";
if($con) $check .="X | connected |
";
else $check .=" | not connected | ";
$check .="PostGIS function check |
";
$con_string = "host= " . GEOS_DBSERVER . " port=" . GEOS_PORT . " dbname=" . GEOS_DB . " user=" . GEOS_OWNER . " password=" .GEOS_PW;
if (pg_connect($con_string)){
pg_connect($con_string);
$con_postgis = pg_connect($con_string);
$sql = "Select postgis_full_version();";
$res = pg_query($con_postgis,$sql);
if(!$res) $check .="PostGIS support | | no PostGIS function available |
";
else{
$cnt=0;
while(pg_fetch_row($res)){
$check .="PostGIS support | X | PostGIS function available |
";
$check .="Version | X | " . pg_fetch_result($res,$cnt,0). " |
";
$cnt++;
}
if ($cnt==0) $check .="PostGIS support | | no PostGIS function available |
";
}
}
else $check .="Postgis support | | no PostGIS function available |
";
echo $check;
}
else{
$check = "Administration Database | X | PostgreSQL |
";
$check .= "Connect to Database | ";
if($con) $check .="X | connected |
";
else $check .=" | not connected | ";
# md5 support
$sql = "Select md5('root');";
$res = pg_query($sql);
if(!$res) $check .="MD5 support | | no md5 support |
";
else{
$row = db_fetch_array($res);
if ($row) $check .="MD5 support | X | md5 supported |
";
else $check .="MD5 support | | no md5 support |
";
}
echo $check;
######################################
# PostGIS check
######################################
?>
PostGIS check |
pg_query($con,$sql)";
if(!$res) $check .="PostGIS support | | no PostGIS function available | ";
else{
$cnt=0;
while(pg_fetch_row($res)){
$check .="PostGIS support | X | PostGIS function available | ";
$check .="Version | X | " . pg_fetch_result($res,$cnt,0). " | ";
$cnt++;
}
if ($cnt==0) $check .="PostGIS support | | no PostGIS function available | ";
}
}
else $check .="Postgis support | | no PostGIS function available | ";
echo $check;
}
#################################
# Mapbender configuration check
#################################
?>
|