Req #71290 [Asn->Ver]: PDO::query() throws both an error and an exception if server has gone away

From: Date: Tue, 24 Oct 2017 03:30:40 +0000
Subject: Req #71290 [Asn->Ver]: PDO::query() throws both an error and an exception if server has gone away
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211899@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71290&edit=1

 ID:                 71290
 Updated by:         kalle@php.net
 Reported by:        jurchiks101 at gmail dot com
 Summary:            PDO::query() throws both an error and an exception
                     if server has gone away
-Status:             Assigned
+Status:             Verified
 Type:               Feature/Change Request
 Package:            PDO MySQL
-Operating System:   Windows 7 x64
+Operating System:   *
-PHP Version:        5.6Git-2016-01-05 (Git)
+PHP Version:        *
-Assigned To:        willfitch
+Assigned To:        
 Block user comment: N
 Private report:     N

 New Comment:

Given no activity, I'm gonna unassign this one so its open for grabs.


Previous Comments:
------------------------------------------------------------------------
[2016-04-05 09:51:20] jurchiks101 at gmail dot com

Any news on this?

------------------------------------------------------------------------
[2016-02-01 19:02:20] jurchiks101 at gmail dot com

Much appreciated!

------------------------------------------------------------------------
[2016-02-01 17:38:23] willfitch@php.net

I'm actually going to reopen this.  I'll submit a change that will internally
disable/enable warnings from mysqlnd based on the attributes set in PDO.

------------------------------------------------------------------------
[2016-02-01 15:58:33] jurchiks101 at gmail dot com

Yeeeah, I'm not going to compile PHP on Windows, that is waaay too much hassle; not nearly as
easy as on Linux.
So I guess it's mysqlnd that should be fixed then.

------------------------------------------------------------------------
[2016-02-01 15:37:20] willfitch@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

This is a result of the pdo_mysql driver using mysqlnd (MySQL native driver).  pdo_mysql
doesn't have control over the warnings thrown by mysqlnd.  

If want to get around this, you'll need to compile pdo_mysql against a different MySQL library.
 Your OS indicates Windows, so you'll want to compile against the mysql_config like so:

configure --enable-pdo --with-pdo-mysql=C:\path\to\mysql\bin\mysql_config
--with-mysqli=C:\path\to\mysql\bin\mysql_config

I am not very familiar with compiling PHP on Windows, so have a look at the documentation starting
here: https://wiki.php.net/internals/windows/stepbystepbuild.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=71290


--
Edit this bug report at https://bugs.php.net/bug.php?id=71290&edit=1


Thread (8 messages)

« previous php.bugs (#211899) next »