php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69405 PDO method to reconnect
Submitted: 2015-04-09 07:04 UTC Modified: 2017-10-24 08:31 UTC
Votes:6
Avg. Score:4.0 ± 1.4
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:2 (40.0%)
From: cweiske@php.net Assigned:
Status: Open Package: PDO related
PHP Version: 5.6.7 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
17 + 14 = ?
Subscribe to this entry?

 
 [2015-04-09 07:04 UTC] cweiske@php.net
Description:
------------
When a PDO connection times out, there is currently no way to re-establish the connection without instantiating a new PDO object.

If a connection timeout is detected, the PDO object (which might already be passed to dozens of objects) will have to be set again on all objects which need it.

Thus it would be helpful if PDO had a reconnect() method I could call in the case of a timeout error.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 08:31 UTC] kalle@php.net
-Package: PDO Core +Package: PDO related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC