PMCORE-1323 Remove the possibility of change the memory_limit
This commit is contained in:
@@ -50,11 +50,10 @@ Internet Explorer 7 or later
|
|||||||
|* PHP Configuration *|
|
|* PHP Configuration *|
|
||||||
-----------------------
|
-----------------------
|
||||||
In the PHP configuration file (php.ini), set the following settings:
|
In the PHP configuration file (php.ini), set the following settings:
|
||||||
memory_limit = 120M
|
memory_limit = 256M
|
||||||
file_uploads = On
|
file_uploads = On
|
||||||
short_open_tag = On
|
short_open_tag = On
|
||||||
The memory_limit may be a minimum of 80MB, but it is recommended to set it to
|
If planning on uploading large Input Documents and attached files, then
|
||||||
120MB. If planning on uploading large Input Documents and attached files, then
|
|
||||||
increase the max_post_size and upload_max_filesize to larger than the default
|
increase the max_post_size and upload_max_filesize to larger than the default
|
||||||
2MB:
|
2MB:
|
||||||
max_post_size = 2M
|
max_post_size = 2M
|
||||||
|
|||||||
@@ -536,7 +536,6 @@ class WebApplication
|
|||||||
ini_set('error_reporting', $arraySystemConfiguration['error_reporting']);
|
ini_set('error_reporting', $arraySystemConfiguration['error_reporting']);
|
||||||
ini_set('short_open_tag', 'On'); //??
|
ini_set('short_open_tag', 'On'); //??
|
||||||
ini_set('default_charset', 'UTF-8'); //??
|
ini_set('default_charset', 'UTF-8'); //??
|
||||||
ini_set('memory_limit', $arraySystemConfiguration['memory_limit']);
|
|
||||||
ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']);
|
ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']);
|
||||||
ini_set('date.timezone', TIME_ZONE); //Set Time Zone
|
ini_set('date.timezone', TIME_ZONE); //Set Time Zone
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
/*** enable display_error On to caught even fatal errors ***/
|
/*** enable display_error On to caught even fatal errors ***/
|
||||||
ini_set('display_errors','On');
|
ini_set('display_errors','On');
|
||||||
ini_set('error_reporting', E_ALL );
|
ini_set('error_reporting', E_ALL );
|
||||||
ini_set('memory_limit', '80M');
|
|
||||||
|
|
||||||
$path = Array();
|
$path = Array();
|
||||||
$sf = $_SERVER['SCRIPT_FILENAME'];
|
$sf = $_SERVER['SCRIPT_FILENAME'];
|
||||||
|
|||||||
@@ -436,7 +436,6 @@ class DataBaseMaintenance
|
|||||||
*/
|
*/
|
||||||
public function restoreFromSql($sqlFile, $type = 'file')
|
public function restoreFromSql($sqlFile, $type = 'file')
|
||||||
{
|
{
|
||||||
ini_set('memory_limit', '64M');
|
|
||||||
if ($type == 'file' && !is_file($sqlFile)) {
|
if ($type == 'file' && !is_file($sqlFile)) {
|
||||||
throw new Exception("the $sqlFile doesn't exist!");
|
throw new Exception("the $sqlFile doesn't exist!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2750,11 +2750,6 @@ class G
|
|||||||
if (!array_key_exists("channels", $imageInfo)) {
|
if (!array_key_exists("channels", $imageInfo)) {
|
||||||
$imageInfo["channels"] = 3;
|
$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'
|
$functions = array(IMAGETYPE_GIF => array('imagecreatefromgif', 'imagegif'
|
||||||
), IMAGETYPE_JPEG => array('imagecreatefromjpeg', 'imagejpeg'), IMAGETYPE_PNG => array('imagecreatefrompng', 'imagepng'));
|
), IMAGETYPE_JPEG => array('imagecreatefromjpeg', 'imagejpeg'), IMAGETYPE_PNG => array('imagecreatefrompng', 'imagepng'));
|
||||||
|
|||||||
6
thirdparty/phing/Phing.php
vendored
6
thirdparty/phing/Phing.php
vendored
@@ -1111,12 +1111,6 @@ class Phing {
|
|||||||
ini_set('default_charset', 'iso-8859-1');
|
ini_set('default_charset', 'iso-8859-1');
|
||||||
ini_set('register_globals', 'off');
|
ini_set('register_globals', 'off');
|
||||||
ini_set('allow_call_time_pass_reference', 'on');
|
ini_set('allow_call_time_pass_reference', 'on');
|
||||||
|
|
||||||
// should return memory limit in MB
|
|
||||||
$mem_limit = (int) ini_get('memory_limit');
|
|
||||||
if ($mem_limit < 32) {
|
|
||||||
ini_set('memory_limit', '32M'); // nore: this may need to be higher for many projects
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ class PmBootstrap extends Bootstrap
|
|||||||
ini_set('error_reporting', $e_all);
|
ini_set('error_reporting', $e_all);
|
||||||
ini_set('short_open_tag', 'On');
|
ini_set('short_open_tag', 'On');
|
||||||
ini_set('default_charset', "UTF-8");
|
ini_set('default_charset', "UTF-8");
|
||||||
ini_set('memory_limit', $this->pmConfig['memory_limit']);
|
|
||||||
ini_set('soap.wsdl_cache_enabled', $this->pmConfig['wsdl_cache']);
|
ini_set('soap.wsdl_cache_enabled', $this->pmConfig['wsdl_cache']);
|
||||||
ini_set('date.timezone', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 'UTC' : $this->pmConfig['time_zone']); //Set Time Zone
|
ini_set('date.timezone', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 'UTC' : $this->pmConfig['time_zone']); //Set Time Zone
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ try {
|
|||||||
ini_set('error_reporting', $e_all);
|
ini_set('error_reporting', $e_all);
|
||||||
ini_set('short_open_tag', 'On');
|
ini_set('short_open_tag', 'On');
|
||||||
ini_set('default_charset', 'UTF-8');
|
ini_set('default_charset', 'UTF-8');
|
||||||
ini_set('memory_limit', $arraySystemConfiguration['memory_limit']);
|
|
||||||
ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']);
|
ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']);
|
||||||
ini_set('date.timezone', $systemUtcTimeZone ? 'UTC' : $arraySystemConfiguration['time_zone']);
|
ini_set('date.timezone', $systemUtcTimeZone ? 'UTC' : $arraySystemConfiguration['time_zone']);
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ try {
|
|||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
|
|
||||||
// Do not change any of these settings directly, use env.ini instead
|
// Do not change any of these settings directly, use env.ini instead
|
||||||
ini_set('memory_limit', $arraySystemConfiguration['memory_limit']);
|
|
||||||
ini_set('display_errors', $arraySystemConfiguration['debug']);
|
ini_set('display_errors', $arraySystemConfiguration['debug']);
|
||||||
ini_set('error_reporting', $e_all);
|
ini_set('error_reporting', $e_all);
|
||||||
ini_set('short_open_tag', 'On');
|
ini_set('short_open_tag', 'On');
|
||||||
|
|||||||
@@ -87,8 +87,6 @@ if(count ($argv) > 3) {
|
|||||||
$debug = 1;
|
$debug = 1;
|
||||||
|
|
||||||
ini_set ('display_errors', 1);
|
ini_set ('display_errors', 1);
|
||||||
//error_reporting (E_ALL);
|
|
||||||
ini_set ('memory_limit', '256M'); // set enough memory for the script
|
|
||||||
|
|
||||||
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
||||||
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ $debug = 1;//enable o disable notice, this mechanism is inherited from '/process
|
|||||||
|
|
||||||
ini_set ('display_errors', 1);
|
ini_set ('display_errors', 1);
|
||||||
|
|
||||||
ini_set ('memory_limit', '256M'); // set enough memory for the script
|
|
||||||
|
|
||||||
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
||||||
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
||||||
$e_all = $debug ? $e_all : $e_all & ~ E_NOTICE;
|
$e_all = $debug ? $e_all : $e_all & ~ E_NOTICE;
|
||||||
|
|||||||
@@ -948,7 +948,6 @@ function PMFSendMessage(
|
|||||||
$config = []
|
$config = []
|
||||||
) {
|
) {
|
||||||
ini_set("pcre.backtrack_limit", 1000000);
|
ini_set("pcre.backtrack_limit", 1000000);
|
||||||
ini_set ( 'memory_limit', '-1' );
|
|
||||||
@set_time_limit(100000);
|
@set_time_limit(100000);
|
||||||
|
|
||||||
global $oPMScript;
|
global $oPMScript;
|
||||||
|
|||||||
@@ -1181,7 +1181,6 @@ class InstallerModule extends Controller
|
|||||||
{
|
{
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
ini_set('max_execution_time', '0');
|
ini_set('max_execution_time', '0');
|
||||||
ini_set('memory_limit', '256M');
|
|
||||||
|
|
||||||
$serv = 'http://';
|
$serv = 'http://';
|
||||||
if (isset($_SERVER['HTTPS']) && !empty(trim($_SERVER['HTTPS']))) {
|
if (isset($_SERVER['HTTPS']) && !empty(trim($_SERVER['HTTPS']))) {
|
||||||
|
|||||||
@@ -65,11 +65,6 @@ class adminProxy extends HttpProxyController
|
|||||||
$updatedConf['expiration_year'] = $httpData->expiration_year;
|
$updatedConf['expiration_year'] = $httpData->expiration_year;
|
||||||
}
|
}
|
||||||
|
|
||||||
$httpData->memory_limit .= 'M';
|
|
||||||
if ($sysConf['memory_limit'] != $httpData->memory_limit) {
|
|
||||||
$updatedConf['memory_limit'] = $httpData->memory_limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($sysConf['proxy_host'] != $httpData->proxy_host) {
|
if ($sysConf['proxy_host'] != $httpData->proxy_host) {
|
||||||
$updatedConf['proxy_host'] = $httpData->proxy_host;
|
$updatedConf['proxy_host'] = $httpData->proxy_host;
|
||||||
}
|
}
|
||||||
@@ -126,7 +121,7 @@ class adminProxy extends HttpProxyController
|
|||||||
$msg = ", Host -> " . $httpData->proxy_host . ", Port -> " . $httpData->proxy_port . ", User -> " . $httpData->proxy_user;
|
$msg = ", Host -> " . $httpData->proxy_host . ", Port -> " . $httpData->proxy_port . ", User -> " . $httpData->proxy_user;
|
||||||
}
|
}
|
||||||
|
|
||||||
G::auditLog("UploadSystemSettings", "Time Zone -> " . $httpData->time_zone . ", Memory Limit -> " . $httpData->memory_limit . ", Cookie lifetime -> " . $httpData->max_life_time . ", Default Skin -> " . $httpData->default_skin . ", Default Language -> " . $httpData->default_lang . $msg);
|
G::auditLog("UploadSystemSettings", "Time Zone -> " . $httpData->time_zone . ", Cookie lifetime -> " . $httpData->max_life_time . ", Default Skin -> " . $httpData->default_skin . ", Default Language -> " . $httpData->default_lang . $msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function uxUserUpdate($httpData)
|
public function uxUserUpdate($httpData)
|
||||||
@@ -1584,12 +1579,6 @@ class adminProxy extends HttpProxyController
|
|||||||
*/
|
*/
|
||||||
public static function validateDataSystemConf($httpData, $envFile)
|
public static function validateDataSystemConf($httpData, $envFile)
|
||||||
{
|
{
|
||||||
if (!((is_numeric($httpData->memory_limit)) && ((int)$httpData->memory_limit == $httpData->memory_limit) &&
|
|
||||||
((int)$httpData->memory_limit >= -1))
|
|
||||||
) {
|
|
||||||
throw new Exception(G::LoadTranslation('ID_MEMORY_LIMIT_VALIDATE'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((is_numeric($httpData->max_life_time)) && ((int)$httpData->max_life_time == $httpData->max_life_time) &&
|
if (!((is_numeric($httpData->max_life_time)) && ((int)$httpData->max_life_time == $httpData->max_life_time) &&
|
||||||
((int)$httpData->max_life_time > 0))
|
((int)$httpData->max_life_time > 0))
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -376,9 +376,7 @@ class Installer
|
|||||||
}
|
}
|
||||||
|
|
||||||
//ACTIVE ENTERPRISE
|
//ACTIVE ENTERPRISE
|
||||||
|
|
||||||
ini_set('max_execution_time', '0');
|
ini_set('max_execution_time', '0');
|
||||||
ini_set('memory_limit', '256M');
|
|
||||||
|
|
||||||
$serv = 'http://';
|
$serv = 'http://';
|
||||||
if (isset($_SERVER['HTTPS']) && trim($_SERVER['HTTPS']) != '') {
|
if (isset($_SERVER['HTTPS']) && trim($_SERVER['HTTPS']) != '') {
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ class System
|
|||||||
'debug_time' => 0,
|
'debug_time' => 0,
|
||||||
'debug_calendar' => 0,
|
'debug_calendar' => 0,
|
||||||
'wsdl_cache' => 1,
|
'wsdl_cache' => 1,
|
||||||
'memory_limit' => "256M",
|
|
||||||
'time_zone' => 'America/New_York',
|
'time_zone' => 'America/New_York',
|
||||||
'expiration_year' => '1',
|
'expiration_year' => '1',
|
||||||
'memcached' => 0,
|
'memcached' => 0,
|
||||||
|
|||||||
@@ -96,21 +96,6 @@ Ext.onReady(function(){
|
|||||||
items: [
|
items: [
|
||||||
cmbTimeZone,
|
cmbTimeZone,
|
||||||
{
|
{
|
||||||
xtype: 'numberfield',
|
|
||||||
id: 'memory_limit',
|
|
||||||
name: 'memory_limit',
|
|
||||||
fieldLabel: _('ID_MEMORY_LIMIT'),
|
|
||||||
allowBlank: false,
|
|
||||||
allowDecimals: false,
|
|
||||||
minValue: -1,
|
|
||||||
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15},
|
|
||||||
value: sysConf.memory_limit,
|
|
||||||
listeners: {
|
|
||||||
change: function () {
|
|
||||||
changeSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
xtype: 'numberfield',
|
xtype: 'numberfield',
|
||||||
id: 'max_life_time',
|
id: 'max_life_time',
|
||||||
name: 'max_life_time',
|
name: 'max_life_time',
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ $config = PmSystem::getSystemConfiguration();
|
|||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$config['display_errors'] = $filter->validateInput($config['display_errors']);
|
$config['display_errors'] = $filter->validateInput($config['display_errors']);
|
||||||
$config['error_reporting'] = $filter->validateInput($config['error_reporting']);
|
$config['error_reporting'] = $filter->validateInput($config['error_reporting']);
|
||||||
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
|
|
||||||
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'], 'int');
|
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'], 'int');
|
||||||
$config['time_zone'] = $filter->validateInput($config['time_zone']);
|
$config['time_zone'] = $filter->validateInput($config['time_zone']);
|
||||||
// Do not change any of these settings directly, use env.ini instead
|
// Do not change any of these settings directly, use env.ini instead
|
||||||
@@ -60,7 +59,6 @@ ini_set('display_errors', $filter->validateInput($config['display_errors']));
|
|||||||
ini_set('error_reporting', $filter->validateInput($config['error_reporting']));
|
ini_set('error_reporting', $filter->validateInput($config['error_reporting']));
|
||||||
ini_set('short_open_tag', 'On');
|
ini_set('short_open_tag', 'On');
|
||||||
ini_set('default_charset', "UTF-8");
|
ini_set('default_charset', "UTF-8");
|
||||||
ini_set('memory_limit', $filter->validateInput($config['memory_limit']));
|
|
||||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||||
ini_set('date.timezone',
|
ini_set('date.timezone',
|
||||||
(isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $config['time_zone']); //Set Time Zone
|
(isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $config['time_zone']); //Set Time Zone
|
||||||
|
|||||||
@@ -315,7 +315,6 @@ ini_set('display_errors', $config['display_errors']);
|
|||||||
ini_set('error_reporting', $config['error_reporting']);
|
ini_set('error_reporting', $config['error_reporting']);
|
||||||
ini_set('short_open_tag', 'On');
|
ini_set('short_open_tag', 'On');
|
||||||
ini_set('default_charset', "UTF-8");
|
ini_set('default_charset', "UTF-8");
|
||||||
ini_set('memory_limit', $config['memory_limit']);
|
|
||||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||||
ini_set('date.timezone',
|
ini_set('date.timezone',
|
||||||
(isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $config['time_zone']); //Set Time Zone
|
(isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) ? 'UTC' : $config['time_zone']); //Set Time Zone
|
||||||
@@ -572,7 +571,6 @@ ini_set('display_errors', $config['display_errors']);
|
|||||||
ini_set('error_reporting', $config['error_reporting']);
|
ini_set('error_reporting', $config['error_reporting']);
|
||||||
ini_set('short_open_tag', 'On');
|
ini_set('short_open_tag', 'On');
|
||||||
ini_set('default_charset', "UTF-8");
|
ini_set('default_charset', "UTF-8");
|
||||||
ini_set('memory_limit', $config['memory_limit']);
|
|
||||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||||
ini_set('date.timezone', TIME_ZONE); //Set Time Zone
|
ini_set('date.timezone', TIME_ZONE); //Set Time Zone
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user