Using new ini_get_bool function to work around a bug with ini_get where

the result is different for items set in htaccess
This commit is contained in:
moodler 2003-05-17 02:05:10 +00:00
parent 785ae439eb
commit c39c66a5e8
3 changed files with 32 additions and 14 deletions

View file

@ -22,29 +22,32 @@
$documentationlink = "please read the <A HREF=\"../doc/?frame=install.html&sub=webserver\">install documentation</A>";
if (!(bool)ini_get('short_open_tag')) {
error("The PHP server variable 'short_open_tag' is not turned on - $documentationlink");
if (ini_get_bool('session.auto_start')) {
error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
}
if (!(bool)ini_get('magic_quotes_gpc')) {
error("The PHP server variable 'magic_quotes_gpc' is not turned on - $documentationlink");
}
if ((bool)ini_get('magic_quotes_runtime')) {
if (ini_get_bool('magic_quotes_runtime')) {
error("The PHP server variable 'magic_quotes_runtime' should be Off - $documentationlink");
}
if (!(bool)ini_get('file_uploads')) {
error("The PHP server variable 'file_uploads' is not turned on - $documentationlink");
if (!ini_get_bool('magic_quotes_gpc')) {
error("The PHP server variable 'magic_quotes_gpc' is not turned On - $documentationlink");
}
if ((bool)ini_get('session.auto_start')) {
error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
if (!ini_get_bool('file_uploads')) {
error("The PHP server variable 'file_uploads' is not turned On - $documentationlink");
}
if (!ini_get_bool('short_open_tag')) {
error("The PHP server variable 'short_open_tag' is not turned On - $documentationlink");
}
/// Check that sessions are supported
if (!is_readable(ini_get('session.save_path')) and !(bool)ini_get('safe_mode')) {
if (!is_readable(ini_get('session.save_path')) and !ini_get_bool('safe_mode')) {
$sessionpath = ini_get('session.save_path');
notify("Warning: It appears your server does not support sessions (session.save_path = '$sessionpath')");
}