Changeset View
Changeset View
Standalone View
Standalone View
support/PhabricatorStartup.php
| Show First 20 Lines • Show All 389 Lines • ▼ Show 20 Lines | private static function setupPHP() { | ||||
| error_reporting(E_ALL | E_STRICT); | error_reporting(E_ALL | E_STRICT); | ||||
| self::$oldMemoryLimit = ini_get('memory_limit'); | self::$oldMemoryLimit = ini_get('memory_limit'); | ||||
| ini_set('memory_limit', -1); | ini_set('memory_limit', -1); | ||||
| // If we have libxml, disable the incredibly dangerous entity loader. | // If we have libxml, disable the incredibly dangerous entity loader. | ||||
| if (function_exists('libxml_disable_entity_loader')) { | if (function_exists('libxml_disable_entity_loader')) { | ||||
| libxml_disable_entity_loader(true); | libxml_disable_entity_loader(true); | ||||
| } | } | ||||
| // Enable automatic compression here. Webservers sometimes do this for | |||||
| // us, but we now detect the absence of compression and warn users about | |||||
| // it so try to cover our bases more thoroughly. | |||||
| ini_set('zlib.output_compression', 1); | |||||
| } | } | ||||
| /** | /** | ||||
| * @task validation | * @task validation | ||||
| */ | */ | ||||
| public static function getOldMemoryLimit() { | public static function getOldMemoryLimit() { | ||||
| return self::$oldMemoryLimit; | return self::$oldMemoryLimit; | ||||
| ▲ Show 20 Lines • Show All 537 Lines • Show Last 20 Lines | |||||