Page 1 of 1

Connection time out.

Posted: Tue Aug 05, 2003 3:20 am
by Deddog
I run Apache 2 on nt4 server with php and mysql version 4.

My existing system ran fine until Monday morning. Now I get generally get time out’s when my pages try to connect to mysql.

I have reinstalled both Mysql and PHP. I checked the databases and they seem fine. I am using mysql_connect to get data from mysql.

What has caused the system to keep timing out?

I am stuck and running out of time!

Deddog.

Posted: Wed Aug 06, 2003 11:36 pm
by rterrar
Are you using some kind of loop statement to access your records?

I would try first resetting the time out in your code.
set_time_limit(0); means no time limit.
I would use something like set_time_limit(60).
Also if you put the set_time_limit() call in your loop to run like every 10th iteration it will reset the time limit. Of course this could all be spoiled by the max_execution_time setting in the php.ini file if it is set. This times the loop and kills it after the time limit imposed.