...

View Full Version : max_execution_time



jonw118
07-03-2005, 05:06 AM
Hello,

I dowloaded an open-source PHP script that I am trying to implement.

But when trying to upload MP3s, it always comes back with error. After reading the known bugs this seems to be one.

However, from what I've been told there should be an easy fix.

This is what the developer of the script posted about it:

...there is somewhat of
a bug with MP3 uploads. I'm trying to narrow it down, but so
far the closest I've come is with the limitations imposed by
the "max_execution_time" setting in most php setups.

The reason I say this is because users on broadband
connections are least likely to encounter this problem, but
even that is not consistent.

I will be working on this issue and post back.

My question, is there anything that can be added to a script to prevent this time out error? I don't have access to the php.ini file...

Thanks so much in advance for the help!

SeeIT Solutions
07-03-2005, 09:43 AM
I don't think that is the problem, I think it is the fact you have to change the maximum file upload size from 2MB to be larger. (I don't know how to do this)

the execution time of a script doesn't depend on connection at all, as it is server side it should be about the same every time.

delinear
07-04-2005, 03:16 AM
SeeIT is right, the connection speed shouldn't make one iota of difference to the script execution time. Uploads and downloads shouldn't be counted in the execution time either, since such actions happen outside the execution of the script.

It sounds like the developer is just clutching at straws to cover some dodgy coding, it's more likely he's got some weird loop happening at some point which takes up a lot of server resources and causes his script to timeout. That's obviously far from an ideal situation. If a script is taking longer to execute than the default (usually about 30 seconds) then either the server is very poor or the coding is (unless it's doing some major tasks, which I'm assuming a simple MP3 upload script wouldn't be doing).

Personally I'd say if that's the case, look for a different script that doesn't encounter such problems. IF you still want to try making this one work and the guy is convinced the execution time is the problem, you can try the following to remove or increase the set execution time:


set_time_limit(0); // unlimited execution time
set_time_limit(60); // 60 seconds execution time



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum