By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,948 Members | 1,587 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,948 IT Pros & Developers. It's quick & easy.

Timeout Error

P: n/a
Hi.
I have a PHP script which queries much of a large database.
Usually, it takes a minute (depending on the extent of the query).
However, it seems like sometimes the data is chopped off.

Is there a setting is PHP or Apache or MySQL where I can set the
timeout interval?

Thanks

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
There's a setting in php.ini to control timeout of PHP Scripts:
max_execution_time value is defined in the php.ini. You can change this
value to allow PHP scripts to run for a longer time.
max_execution_time is the amount of time in seconds that a PHP script
will be allowed to run.

Jul 17 '05 #2

P: n/a
bi*******@gmail.com wrote in news:1113004845.916258.99490
@g14g2000cwa.googlegroups.com:
Hi.
I have a PHP script which queries much of a large database.
Usually, it takes a minute (depending on the extent of the query).
However, it seems like sometimes the data is chopped off.

Is there a setting is PHP or Apache or MySQL where I can set the
timeout interval?


Depending on how PHP is setup on your server, you may be able to get
around this problem by putting one line of code at the top of your
script:

set_time_limit(0);

hth
--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.