Extending time

I’m getting:

Fatal error: Maximum execution time of 60 seconds exceeded in \mybcode14.php on line 276

How can I extend the time?

in your php.ini you can set max_execution_time = 0 or in your code


ini_set('max_execution_time', 0);

That would work, but unless you’re 110% certain the code doesn’t have any “endless loops” or somesuch IMHO it would be better to increase to a time limit you can live with in case the code is hanging somewhere. Though I suppose “infinity” would eventually cause an “out of memory” error, why not try 5-10 minutes?

What does mybcode14.php line 276 look like?

alos one caveat to add to Mitt’s loops - if you are on a shared host then take inot account the other users! Setting your scripts to never time out or time out after 5-10 minutes would make you seriously unpopular!

I find myself in a dilemma because I have a huge array which if it loads at once slows down the browser. Or if I send it to the url then the URL can’t handle it. I want to make the time a little longer so that I can see what’s going on.
But I use Apache. Is php.ini the only way? What about something in the page?

What are you loading into the arrays?
Could they be split and sent in parts or via a different method?

Flux capacitor :smiley:

I set a limit of 200 letter-skip and under. It works fine now.
http://www.gbgrafix.com/thewheelofgod/bible-code-search/examples/mybcode14.php?skiprow=50&limit=200&word=תורה&find=5,55,105,155,5,138,271,404,37,94,151,208,275,415,555,695,659,675,691,707,689,791,893,995,727,916,1105,1294,780,959,1138,1317,788,895,1002,1109,798,932,1066,1200,970,1048,1126,1204,1847,2037,2227,2417,1939,2043,2147,2251,2289,2438,2587,2736,2468,2472,2476,2480,2705,2726,2747,2768&frombook=1&fromchapter=1&tobook=1&tochapter=2