[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do i set a Connection Timeout for php mysql

Posted on 2009-02-24
3
Medium Priority
?
559 Views
Last Modified: 2012-05-06
Just need to increase the connection timeout for php / myssql

Code im using which is not working

ini_set('mysql.connect_timeout', 60);

Thanks

Dave
0
Comment
Question by:david_88
3 Comments
 
LVL 8

Accepted Solution

by:
Dirtpatch-Jenkins earned 1000 total points
ID: 23723148
You can set it globally in the php.ini file or do it manually for the script - heres how

http://www.php.net/manual/en/function.set-time-limit.php
0
 
LVL 8

Assisted Solution

by:agamal
agamal earned 1000 total points
ID: 23723427
simply
ini_set('mysql.connect_timeout', ... );

Open in new window

0
 

Author Closing Comment

by:david_88
ID: 31550629
lovely~! thanks
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to count occurrences of each item in an array.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month17 days, 17 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question