RE: [PHP] PHP's MySQL Query Length Limit? (Long SQL failing!)

From: Date: Thu, 11 Dec 2003 10:36:43 +0000
Subject: RE: [PHP] PHP's MySQL Query Length Limit? (Long SQL failing!)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-172451@lists.php.net to get a copy of this message
> 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 (#172451) next »