1
0
Fork 0

Pass more ini directives when executing php

Not only pass the current value for "memory_limit" along when executing
php, but also do the same for "allow_url_fopen" and "disable_functions"
pull/6341/merge
Jasper N. Brouwer 2017-05-11 21:56:42 +02:00 committed by Jordi Boggiano
parent 954300032b
commit 4ce39c75c7
2 changed files with 6 additions and 2 deletions

View File

@ -257,9 +257,11 @@ class EventDispatcher
throw new \RuntimeException('Failed to locate PHP binary to execute '.$scriptName);
}
$memoryFlag = ' -d memory_limit='.ini_get('memory_limit');
$allowUrlFOpenFlag = ' -d allow_url_fopen=' . ini_get('allow_url_fopen');
$disableFunctionsFlag = ' -d disable_functions="' . ini_get('disable_functions') . '"';
$memoryLimitFlag = ' -d memory_limit=' . ini_get('memory_limit');
return ProcessExecutor::escape($phpPath) . $memoryFlag;
return ProcessExecutor::escape($phpPath) . $allowUrlFOpenFlag . $disableFunctionsFlag . $memoryLimitFlag;
}
/**

View File

@ -174,6 +174,8 @@ class XdebugHandler
$content .= $data.PHP_EOL;
}
$content .= 'allow_url_fopen='.ini_get('allow_url_fopen').PHP_EOL;
$content .= 'disable_functions="'.ini_get('disable_functions').'"'.PHP_EOL;
$content .= 'memory_limit='.ini_get('memory_limit').PHP_EOL;
if (defined('PHP_WINDOWS_VERSION_BUILD')) {