php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50300 PHP Warning: Error while sending QUERY packet
Submitted: 2009-11-25 21:17 UTC Modified: 2009-12-11 22:36 UTC
From: tejas dot net+php at gmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.3.1 OS: CentOS v5
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tejas dot net+php at gmail dot com
New email:
PHP Version: OS:

 

 [2009-11-25 21:17 UTC] tejas dot net+php at gmail dot com
Description:
------------
When using the mysql_* functions (mysqlnd), I sometimes get a warning 
like:

PHP Warning:  Error while sending QUERY packet. PID=16717 in [FILE] on 
line [LINE]

The query seems to work just fine however.

Probably related to this bug here: http://bugs.php.net/bug.php?id=49761
but I'm not using Mysqli or persistent connections.

FILE:LINE contains: return mysql_query( $sql, $this->_connection );

Is this a bug?



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-26 10:08 UTC] kalle@php.net
Any chance you can log a possible query that might generate this warning? Along with the MySQL server version.

When replying, then change the status back to Open
 [2009-12-11 14:41 UTC] tejas dot net+php at gmail dot com
I guess this is a legitimate warning thrown by PHP.

After some debugging, I found that this happens if the connection is lost (my DB layer class normally does a mysql_ping to restore it, which is why I dont see any side-effects)
 [2009-12-11 22:36 UTC] jani@php.net
Yep.
 [2012-02-25 17:25 UTC] noostroi at gmail dot com
I got this error when trying to store a file as a BLOB that was 
larger than the SQL query limit within MySQL.

It was set to 1Mb (the default, afaik), and I was uploading a 
2Mb file. 
Uploading a smaller sized file was working for me, which prompted 
me to investigate size limits.

Upping the limit to a suitable value (e.g. 10Mb) fixed the issue.

Exact setting that I changed was max_allowed_packet in /etc/my.cnf 
in the [mysqld] section. (MySQL version: 5.5.21, php version: 5.2.3
 (whatever came as default in Mac Snow Leopard) )

(Adding this info here, now, as I was linked to this page from 
the first page on a google search for the error text.)
 [2012-11-15 20:39 UTC] sokolukasz2 at gmail dot com
I have this warning when im starting new transaction after when i loast connection and reconnect to server again on error 2006(gone)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC