Merge pull request #13088 from nupplaphil/feat/settings
Introduce settings for overriding php.ini values
This commit is contained in:
commit
148f12580b
2 changed files with 15 additions and 4 deletions
11
src/App.php
11
src/App.php
|
@ -335,7 +335,13 @@ class App
|
||||||
*/
|
*/
|
||||||
protected function load(DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition)
|
protected function load(DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition)
|
||||||
{
|
{
|
||||||
set_time_limit(0);
|
if ($this->config->get('system', 'ini_max_execution_time') !== false) {
|
||||||
|
set_time_limit((int)$this->config->get('system', 'ini_max_execution_time'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->config->get('system', 'ini_pcre_backtrack_limit') !== false) {
|
||||||
|
ini_set('pcre.backtrack_limit', (int)$this->config->get('system', 'ini_pcre_backtrack_limit'));
|
||||||
|
}
|
||||||
|
|
||||||
// Normally this constant is defined - but not if "pcntl" isn't installed
|
// Normally this constant is defined - but not if "pcntl" isn't installed
|
||||||
if (!defined('SIGTERM')) {
|
if (!defined('SIGTERM')) {
|
||||||
|
@ -345,9 +351,6 @@ class App
|
||||||
// Ensure that all "strtotime" operations do run timezone independent
|
// Ensure that all "strtotime" operations do run timezone independent
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
|
|
||||||
// This has to be quite large to deal with embedded private photos
|
|
||||||
ini_set('pcre.backtrack_limit', 500000);
|
|
||||||
|
|
||||||
set_include_path(
|
set_include_path(
|
||||||
get_include_path() . PATH_SEPARATOR
|
get_include_path() . PATH_SEPARATOR
|
||||||
. $this->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
|
. $this->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
|
||||||
|
|
|
@ -341,6 +341,14 @@ return [
|
||||||
// Resolve IPV4 addresses only. Don't resolve to IPV6.
|
// Resolve IPV4 addresses only. Don't resolve to IPV6.
|
||||||
'ipv4_resolve' => false,
|
'ipv4_resolve' => false,
|
||||||
|
|
||||||
|
// ini_max_execution_time (False|Integer)
|
||||||
|
// Set the number of seconds a script is allowed to run. Default unlimited for Friendica, false to use the system value.
|
||||||
|
'ini_max_execution_time' => 0,
|
||||||
|
|
||||||
|
// ini_pcre_backtrack_limit (False|Integer)
|
||||||
|
// This has to be quite large to deal with embedded private photos. False to use the system value.
|
||||||
|
'ini_pcre_backtrack_limit' => 500000,
|
||||||
|
|
||||||
// invitation_only (Boolean)
|
// invitation_only (Boolean)
|
||||||
// If set true registration is only possible after a current member of the node has sent an invitation.
|
// If set true registration is only possible after a current member of the node has sent an invitation.
|
||||||
'invitation_only' => false,
|
'invitation_only' => false,
|
||||||
|
|
Loading…
Reference in a new issue