Jump to content


Photo

[Solved] PHP infinite loops timeout setting in cpanel


  • This topic is locked This topic is locked
5 replies to this topic

#1 Zeak

Zeak

    Newbie

  • Members
  • 3 posts

Posted 09 September 2010 - 09:22 PM

What is the default timeout setting? how to set the timeout in the cpanel time?

I have a php script that has a infinite loops(while loop), when does it timeout, how to terminate it(force quit) manually?

#2 Byron

Byron

    Rank X Member

  • Root Admin
  • 9,122 posts
  • Gender:Male
  • Location:USA

Posted 09 September 2010 - 10:12 PM

These are the maximum amount of time that can't be changed:

Maximum execution time of each script (in seconds) 30.

Maximum amount of time each script may spend parsing request data (in seconds) 60.

You can lesson the time inside your script by adding this to top of your code:

set_time_limit(20);



#3 Zeak

Zeak

    Newbie

  • Members
  • 3 posts

Posted 09 September 2010 - 10:25 PM

QUOTE (byron @ Sep 9 2010, 10:12 PM) <{POST_SNAPBACK}>
These are the maximum amount of time that can't be changed:

Maximum execution time of each script (in seconds) 30.

Maximum amount of time each script may spend parsing request data (in seconds) 60.

You can lesson the time inside your script by adding this to top of your code:

set_time_limit(20);


but how come when I run my php script, it's kept loading forever? and dont display timeout.

#4 Byron

Byron

    Rank X Member

  • Root Admin
  • 9,122 posts
  • Gender:Male
  • Location:USA

Posted 09 September 2010 - 10:46 PM

Was this after you added:

set_time_limit(20);

or before?


I'm going to go ahead and escalate this to djbob just incase he needs to check max_execution_time on php scripts.


#5 Zeak

Zeak

    Newbie

  • Members
  • 3 posts

Posted 09 September 2010 - 11:22 PM

QUOTE (byron @ Sep 9 2010, 11:46 PM) <{POST_SNAPBACK}>
Was this after you added:

set_time_limit(20);

or before?


I'm going to go ahead and escalate this to djbob just incase he needs to check max_execution_time on php scripts.


This is before, it doesn't have any timeout set into the script.

Maybe it's the code, because I do see the max_execution_time = 30 , 30 on the phpinfo();.

#6 Ashoat

Ashoat

    The Administrator

  • Root Admin
  • 7,204 posts
  • Gender:Male
  • Location:New York, USA

Posted 10 September 2010 - 10:05 AM

What's the URL to your PHP file?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users