I said I'll quit writing.. Well, I was lying then.

PHP error

Tuesday, July 1, 2008

EDIT: Am doing a lot of cURL calls inside a PHP file, around 20-40, causing  the timeout. The PHP file is waiting for the cURLs and all that.

I got this error while doing some stuff:

Fatal error:  Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\kapow\includes\funcs.php in line 53

general form:

Fatal error: Maximum execution time of <max_execution_time> seconds excedeed in C:\<apache server folder>\htdocs\<project folder>\..\<php file> in line <line from php file>

 

So in any case you’d encounter the same (and usual) “maximum execution time” server load error, here’s what you have to do:

Open php.ini and locate variable max_execution_time. Setting it to 5minutes will do the trick. It’s safest to allot more time.

max_execution_time = 300              ; Maximum execution time of each script, in seconds

max_input_time = 300                         ; Maximum amount of time each script may spend parsing request data

If you are using XAMPP, change the following php.ini files:

 C:\xampp\apache\bin\php.ini

 C:\xampp\php\php4\php4.ini

C:\xampp\php\php4\php.ini

C:\xampp\php\php.ini

And of course, don’t forget to restart your Apache server. 

Hope that helps.  :)

Posted by caiabbass at 3:31 pm | permalink | comments[11]

     

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

iDisclose

    

Subscribe

Technorati
Bloglines

MyBlogLog

Sponsored Links

Analytics

Recommendations