Compute PHP memory_limit
static public getMemoryLimit ( $ininame = 'memory_limit' ) : memory | ||
$ininame | String name of the ini ooption to retrieve (since 9.1) | |
return | memory | limit |
$it[0] = preg_replace('/^--/', '', $it[0]); $_GET[$it[0]] = $it[1]; } } // Can't run on MySQL replicate $USEDBREPLICATE = 0; $DBCONNECTION_REQUIRED = 1; // MASS IMPORT for OCSNG include '../../../inc/includes.php'; $_SESSION["glpicronuserrunning"] = $_SESSION["glpiname"] = 'ocsinventoryng'; // Check PHP Version - sometime (debian) cli version != module version if (phpversion() < "5") { die("PHP version:" . phpversion() . " - " . "You must install at least PHP5.\n\n"); } // Chech Memory_limit - sometine cli limit (php-cli.ini) != module limit (php.ini) $mem = Toolbox::getMemoryLimit(); if ($mem > 0 && $mem < 64 * 1024 * 1024) { die("PHP memory_limit = " . $mem . " - " . "A minimum of 64Mio is commonly required for GLPI.'\n\n"); } //Check if plugin is installed $plugin = new Plugin(); if (!$plugin->isInstalled("ocsinventoryng")) { echo "Disabled plugin\n"; exit(1); } if (!$plugin->isActivated("ocsinventoryng")) { echo "Disabled plugin\n"; exit(1); } $thread_nbr = ''; $threadid = '';