Re: PHP's MySQL Query Length Limit? (Long SQL failing!)

From: Date: Thu, 11 Dec 2003 20:35:15 +0000
Subject: Re: PHP's MySQL Query Length Limit? (Long SQL failing!)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-172520@lists.php.net to get a copy of this message
Yes, it's the max_allowed_packet size! I already saw that variable and assumed it was related to packet length - as in TCP/IP packet length - not query length. It's all working now. Thanks! -Galen On Dec 11, 2003, at 2:36 AM, Rich Gray wrote:
I have a script that accepts large files (images) and inserts them into a MySQL table. The images are manipulated and whatnot, no problems at all getting the image into a string and running addslashes() on it. Then I go and use it with a mysql query. This is something I've coded dozens of times, but now there's a twist. The files are bigger than I've ever worked with. In theory, I didn't think there would be a problem, but there is. When I try in insert a file of about 800K or larger (9-10 MB is as large as I ever try to insert) the insert fails. The query is written correctly AKAIK, but no data reaches the table I'm writing to.
[chop] Hi Galen I'd hazard a guess that it is probably your MySQL server settings that are cause of the problem - in particular check the max_allowed_packet_size (?? - you'll probably need to check this name as I haven't any docs to hand at the moment) setting in your my.ini file... HTH Cheers Rich


« previous php.general (#172520) next »