PDA

View Full Version : forum not uploading pics properly


skh
04-02-2009, 03:50 PM
here is the error that some of my members are getting:

Invalid SQL:
INSERT INTO attachment
(dateline, thumbnail_dateline, visible, userid, extension, filename, posthash, thumbnail_filesize, filehash, filesize, filedata, thumbnail)
VALUES
(1238626216, 1238626216, 1, 37, 'jpg',

any ideas on how to fix?

snakes1100
04-02-2009, 03:56 PM
Post the entire output from the failure page, i assume you got that either from a email or viewing the page source.

Lynne
04-02-2009, 04:10 PM
We need to see the bottom part of the error page. The part that looks like this:
MySQL Error : some sort of something here
Error Number : another something here
Date : Sunday, April 13th 2008 @ 11:16:43 AM
Script : http://address.path.path/page.php
Referrer :
IP Address : **.***.**.***
Username : username
Classname : database

skh
04-02-2009, 08:07 PM
Hi, thanks for the help... my email was only displaying part of the message. viewing the source helped me get to the bottom.

here's the error:

MySQL Error : Got a packet bigger than 'max_allowed_packet' bytes

Error Number : 1153

Request Date : Wednesday, April 1st 2009 @ 01:35:24 AM

Error Date : Wednesday, April 1st 2009 @ 01:35:25 AM

Now that i see this... is it simply a user permissions thing?

Lynne
04-02-2009, 08:14 PM
That's a mysql thing. You will have to ask your host to increase the value.

Dismounted
04-03-2009, 04:59 AM
You could try storing attachments as files instead of the database.

skh
04-03-2009, 06:34 AM
That's a mysql thing. You will have to ask your host to increase the value.

I'm on a dedicated server... i own a few sites, and have previously raised the limit to 5mb per pic and 32mb per post.

ah, i need to do that for each database... ok, i think i've got it now. thanks much :)

snakes1100
04-03-2009, 11:53 AM
max_allowed_packet = 32M or higher until the error goes away.

Change it in my.cnf and restart sql

skh
04-03-2009, 01:43 PM
max_allowed_packet = 32M or higher until the error goes away.

Change it in my.cnf and restart sql


hey thanks...


i think this must be it... as i said i'd already increased the php limits in the .ini file and it seems to have changed them for the whole server, so it couldn't have been that.

so yes, this must be it... thanks a lot!

--------------- Added 1238774515 at 1238774515 ---------------

max_allowed_packet = 32M or higher until the error goes away.

Change it in my.cnf and restart sql

Hi... i went into the my.cnf file using vi and i could not find the max_allowed_packet setting. it is not in that file. am i missing something?

snakes1100
04-03-2009, 06:54 PM
If its not there simply add it and hup sql

skh
04-03-2009, 10:52 PM
If its not there simply add it and hup sql

yes, that is what i did. hopefully it's done the trick. thanks for your time :)