PMCORE-1323 Remove the possibility of change the memory_limit

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-05-25 17:11:23 -04:00
parent 283794ca23
commit af115eeee4
19 changed files with 5 additions and 62 deletions

View File

@@ -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'];

View File

@@ -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!");
}

View File

@@ -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'));