How do i set a Connection Timeout for php mysql

Posted on 2009-02-24
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);


Question by:david_88
    LVL 8

    Accepted Solution

    You can set it globally in the php.ini file or do it manually for the script - heres how
    LVL 8

    Assisted Solution

    ini_set('mysql.connect_timeout', ... );

    Open in new window


    Author Closing Comment

    lovely~! thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now