@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Removing memory limit sanity check

Summary:
Turns out that 12 characters is not enough for folks that have
memory_limit set to INT64_MAX (9223372036854775807).

Since this only seems to have affected a single installation,
epriestley says let's get rid of it. If it comes up again, we can
restore the check but use a bigger number.

Test Plan: Just make a call to the phabricator webroot.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1641

Differential Revision: https://secure.phabricator.com/D3246

-30
-30
webroot/index.php
··· 36 36 "'{$required_version}'."); 37 37 } 38 38 39 - phabricator_detect_insane_memory_limit(); 40 - 41 39 ini_set('memory_limit', -1); 42 40 43 41 $env = getenv('PHABRICATOR_ENV'); // Apache ··· 324 322 "'127.0.0.1 example.com', and access the localhost with ". 325 323 "'http://example.com/'."); 326 324 } 327 - } 328 - 329 - function phabricator_detect_insane_memory_limit() { 330 - $memory_limit = ini_get('memory_limit'); 331 - $char_limit = 12; 332 - if (strlen($memory_limit) <= $char_limit) { 333 - return; 334 - } 335 - 336 - // colmdoyle ran into an issue on an Ubuntu box with Suhosin where his 337 - // 'memory_limit' was set to: 338 - // 339 - // 3232323232323232323232323232323232323232323232323232323232323232M 340 - // 341 - // Not a typo. A wizard did it. 342 - // 343 - // Anyway, with this 'memory_limit', the machine would immediately fatal 344 - // when executing the ini_set() later. I wasn't able to reproduce this on my 345 - // EC2 Ubuntu + Suhosin box, but verified that it caused the problem on his 346 - // machine and that setting it to a more sensible value fixed it. Since I 347 - // have no idea how to actually trigger the issue, we look for a coarse 348 - // approximation of it (a memory_limit setting more than 12 characters in 349 - // length). 350 - 351 - phabricator_fatal_config_error( 352 - "Your PHP 'memory_limit' is set to something ridiculous ". 353 - "(\"{$memory_limit}\"). Set it to a more reasonable value (it must be no ". 354 - "more than {$char_limit} characters long)."); 355 325 } 356 326 357 327 function phabricator_shutdown() {