Problem with max_execution_time

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
magosla2001
Forum Newbie
Posts: 20
Joined: Sat May 20, 2006 8:54 am

Problem with max_execution_time

Post by magosla2001 »

I have an apache server with PHP5 installed on a Windows Xp service pack2. I am having problem with loops that executes above 60sec. I changed max_execution_time in my php.ini file from 60 to off and i still encounter the same problem when I try to loop with while or for, the execution times out with an error that Maximun Execution Time of 60seconds exceeded.
What Can I do to solve this problem
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Check Configuration File (php.ini) Path in your phpinfo() output. Did you change the right file? And did you restart the webserver?
There's also set_time_limit which you can call in each loop iteration (except when in safe mode).
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Code: Select all

set_time_limit(0);  //unlimited
Also maybe you should post your code. We might be able to help you optimize it so it doesn't take so long. :)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
magosla2001
Forum Newbie
Posts: 20
Joined: Sat May 20, 2006 8:54 am

Post by magosla2001 »

I have set it to 0 in my php script and it worked fine
Post Reply