php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55237 PDO::__construct can generate "warning"
Submitted: 2011-07-19 05:16 UTC Modified: 2020-10-28 15:05 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:3 (60.0%)
From: php at bouchery dot com Assigned: nikic (profile)
Status: Closed Package: PDO MySQL
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at bouchery dot com
New email:
PHP Version: OS:

 

 [2011-07-19 05:16 UTC] php at bouchery dot com
Description:
------------
---
From manual page: http://www.php.net/pdo.construct%23Errors/Exceptions
---

Using MySQL, PDO::__construct can generate "warning php error" (even 
PDO::ERRMODE_EXCEPTION). Is result return "false" ?

Generated error is "Warning: PDO::__construct() [pdo.--construct]: MySQL server 
has gone away in [script name] on line xxx"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 11:29 UTC] cmb@php.net
-Type: Feature/Change Request +Type: Documentation Problem -Package: Documentation problem +Package: PDO MySQL
 [2020-10-28 15:05 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2020-10-28 15:05 UTC] nikic@php.net
At least since PHP 7.4, "MySQL server has gone away" should always follows the PDO error mode (or be an exception for the case of the constructor).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 09:01:27 2024 UTC