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

 ID:                 50300
 Comment by:         noostroi at gmail dot com
 Reported by:        tejas dot net+php at gmail dot com
 Summary:            PHP Warning:  Error while sending QUERY packet
 Status:             Not a bug
 Type:               Bug
 Package:            MySQL related
 Operating System:   CentOS v5
 PHP Version:        5.3.1
 Block user comment: N
 Private report:     N

 New Comment:

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.)


Previous Comments:
------------------------------------------------------------------------
[2009-12-11 22:36:17] j...@php.net

Yep.

------------------------------------------------------------------------
[2009-12-11 14:41:59] 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-11-26 10:08:53] ka...@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-11-25 21:17:56] 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?




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



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

Reply via email to