- Fixing file upload/download troubles: make sure that magic_quotes_gpc is turned off and that the output is not truncated by AjaxWebPage.

SVN:trunk[229]
This commit is contained in:
Denis Flaven
2010-01-06 20:06:16 +00:00
parent 1c90a1de87
commit 9fc06ff6e4
2 changed files with 17 additions and 1 deletions

View File

@@ -61,6 +61,15 @@ function CheckPHPVersion(setup_web_page $oP)
$bResult = false;
}
// Check some ini settings here
if (function_exists('php_ini_loaded_file')) // PHP >= 5.2.4
{
$sPhpIniFile = php_ini_loaded_file();
$oP->log("Info - php.ini path: '$sPhpIniFile'");
}
else
{
$sPhpIniFile = 'php.ini';
}
if (!ini_get('file_uploads'))
{
$oP->error("Files upload is not allowed on this server (file_uploads = ".ini_get('file_uploads').").");
@@ -107,6 +116,13 @@ function CheckPHPVersion(setup_web_page $oP)
$oP->log("Info - upload_max_filesize: ".ini_get('upload_max_filesize'));
$oP->log("Info - max_file_uploads: ".ini_get('max_file_uploads'));
// Check some more ini settings here, needed for file upload
if (get_magic_quotes_gpc())
{
$oP->error("'magic_quotes_gpc' is set to On in '$sPhpIniFile', please turn if Off before continuing.");
$bResult = false;
}
return $bResult;
}