2 ini_set('include_path', '.' . PATH_SEPARATOR
. '..' . DIRECTORY_SEPARATOR
. 'packages' . PATH_SEPARATOR
. '..');
3 // make sure the memory_limit is at least 512 MB
4 $memLimitString = trim(ini_get('memory_limit'));
5 $memLimitUnit = strtolower(substr($memLimitString, -1));
6 $memLimit = (int) $memLimitString;
7 switch ($memLimitUnit) {
16 if ($memLimit >= 0 and $memLimit < 536870912) {
17 ini_set('memory_limit', '512M');
19 date_default_timezone_set('UTC'); // avoid php warnings if timezone is not set - CRM-10844
21 define('CIVICRM_UF', 'Drupal');
23 require_once 'CRM/Core/ClassLoader.php';
24 CRM_Core_ClassLoader
::singleton()->register();
26 # TODO: pull these settings from configuration
27 $genCode = new CRM_Core_CodeGen_Main(
28 '../CRM/Core/DAO/', // $CoreDAOCodePath
29 '../sql/', // $sqlCodePath
30 '../', // $phpCodePath
31 '../templates/', // $tplCodePath
32 array('../packages/Smarty/plugins', '../CRM/Core/Smarty/plugins'), // smarty plugin dirs
34 empty($argv[2]) ?
NULL : $argv[2], // db version
35 empty($argv[1]) ?
'schema/Schema.xml' : $argv[1], // schema file
36 getenv('CIVICRM_GENCODE_DIGEST') ?
getenv('CIVICRM_GENCODE_DIGEST') : NULL // path to digest file