class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Hi! All of a sudden I got the following error message when using class.upload.php.
ini_get_all() has been disabled for security reasons...
It seems my host has disabled that function and now that configuration change causes an error in your class. I suggest changing the following lines (from line 1788)
// display some system information
if (empty($this->log)) {
$this->log .= 'system information';
$inis = ini_get_all();
$open_basedir = (array_key_exists('open_basedir', $inis) && array_key_exists('local_value', $inis['open_basedir']) && !empty($inis['open_basedir']['local_value'])) ? $inis['open_basedir']['local_value'] : false;
to
// display some system information
if (empty($this->log)) {
$this->log .= 'system information';
if (function_exists('ini_get_all')) {
$inis = ini_get_all();
$open_basedir = (array_key_exists('open_basedir', $inis) && array_key_exists('local_value', $inis['open_basedir']) && !empty($inis['open_basedir']['local_value'])) ? $inis['open_basedir']['local_value'] : false;
} else {
$open_basedir = false;
}
Since ini_get_all is considered a dangerous function it probably isn't unusual to have it disabled on the server. The above change makes your class imune.Reply
All of a sudden I got the following error message when using class.upload.php.
ini_get_all() has been disabled for security reasons...
It seems my host has disabled that function and now that configuration change causes an error in your class. I suggest changing the following lines (from line 1788)
to
Since ini_get_all is considered a dangerous function it probably isn't unusual to have it disabled on the server. The above change makes your class imune.