PMCORE-1323 Remove the possibility of change the memory_limit
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
/*** enable display_error On to caught even fatal errors ***/
|
||||
ini_set('display_errors','On');
|
||||
ini_set('error_reporting', E_ALL );
|
||||
ini_set('memory_limit', '80M');
|
||||
|
||||
$path = Array();
|
||||
$sf = $_SERVER['SCRIPT_FILENAME'];
|
||||
|
||||
@@ -436,7 +436,6 @@ class DataBaseMaintenance
|
||||
*/
|
||||
public function restoreFromSql($sqlFile, $type = 'file')
|
||||
{
|
||||
ini_set('memory_limit', '64M');
|
||||
if ($type == 'file' && !is_file($sqlFile)) {
|
||||
throw new Exception("the $sqlFile doesn't exist!");
|
||||
}
|
||||
|
||||
@@ -2750,11 +2750,6 @@ class G
|
||||
if (!array_key_exists("channels", $imageInfo)) {
|
||||
$imageInfo["channels"] = 3;
|
||||
}
|
||||
$memoryNeeded = Round(($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] + Pow(2, 16)) * 1.95) / (1024 * 1024);
|
||||
if ($memoryNeeded < 80) {
|
||||
$memoryNeeded = 80;
|
||||
}
|
||||
ini_set('memory_limit', intval($memoryNeeded) . 'M');
|
||||
|
||||
$functions = array(IMAGETYPE_GIF => array('imagecreatefromgif', 'imagegif'
|
||||
), IMAGETYPE_JPEG => array('imagecreatefromjpeg', 'imagejpeg'), IMAGETYPE_PNG => array('imagecreatefrompng', 'imagepng'));
|
||||
|
||||
Reference in New Issue
Block a user