Page MenuHomePhabricator

Special:Allmessages gives errors when PHP is in safe mode.
Closed, ResolvedPublic

Description

Author: erlercw

Description:
Special:Allmessages (in version 1.3.1) line 8 is 'set_time_limit(0);'. This
causes errors because my web host has set PHP to safe mode. I grepped all files
for set_time_limit and that is the only file (aside from maintenance files) that
uses it, so I assume it's not needed. At the least, an if statement could check
whether safe mode was on to solve the errors. Commenting that one line out
removes the errors and no other pages give errors in the first place.


Version: 1.3.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz252

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:47 PM
bzimport set Reference to bz252.
bzimport added a subscriber: Unknown Object (MLST).

This was probably added because the output was insanely slow and frequently timed out in the default 30
seconds.

I've rewritten it in 1.4 to be much faster. Until then, putting a @ in front of the statement to eliminate the error
message should do. I'll test that...

On at least one of my boxen the old code runs too slow to finish in the default
30 second time limit anyway, so I've gone ahead and backported the faster 1.4
code and removed the set_time_limit() call. Will be included in 1.3.2.