how to force the Web server to not limit PHP process

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jasongr
Forum Contributor
Posts: 206
Joined: Tue Jul 27, 2004 6:19 am

how to force the Web server to not limit PHP process

Post by jasongr »

Hello

I have a PHP code that performs some very intense calculations which may take a long time
however, after a while, I get the following error in my browser:

Code: Select all

Server Error
The following error occurred:

[code=SERVER_RESPONSE_RESET] The server response could not be read because of an error. Contact your system administrator.
Is there a way for me to inform the Web server to not limit the duration of the script?
maybe using ini_set ?

Maybe this error has nothing to do with timeouts... any suggestion would be appreciated
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I use..

Code: Select all

set_time_limit(0);
ini_set("max_execution_time",1800);
ignore_user_abort(true);
error_reporting(0);
But some of those settings might not work if your server is running PHP in safe mode.
Post Reply