Database Connection Time

This sections will contains code regarding different PHP & MySQL features and contains help about php/mysql issues.

Database Connection Time

Postby MT Shahzad on March 20th, 2008, 10:00 am

Sometimes you need to increase the database connection time in order to avoid the "Connection Time-out Error" if you are doing a lot of database interaction/processing in your script.

To overcome this issue, simply add the following line in your php file at the top:

Code: Select all
@ini_set("mysql.connect_timeout", -1);


This php code will make the database connection time unlimited and will allow you to process heavy data on your page.
MT Shahzad
Web/Software Developer
http://mts.sw3solutions.com
User avatar
MT Shahzad
Site Admin
 
Posts: 300
Joined: February 29th, 2008, 8:11 am
Location: Muridke, Pakistan

Return to PHP / MySQL / XML

Who is online

Users browsing this forum: No registered users and 0 guests