https://www.icyphoenix.com/viewtopic.php?f=35&t=3497
-----------------------------------
petra
Thu 24 Jan, 2008 10:21

Couldn't Store Attachment
-----------------------------------
Hi here I am again sorry
When we want to put in a attachment we get this error
Who can help me with this problem?

Couldn't store Attachment.
Your post has been stored.

DEBUG MODE

SQL Error : 1062 Duplicate entry '0' for key 1

INSERT INTO ip__attachments_desc (physical_filename, real_filename, comment, extension, mimetype, filesize, filetime, thumbnail) VALUES ('lessen_340_175.rar', 'lessen_340.rar', '', 'rar', 'application/force-download', 1881506, 1201165406, 0)

Line : 767
File : posting_attachments.php

It have always works fine but now not anymore.
I sears this forum for an answer but could not find it, olso I look in the acp but I couldn't find it there.
The ccmod is 777.

Greetings Petra


-----------------------------------
Mighty Gorgon
Fri 15 Feb, 2008 22:35

Re: Couldn't Store Attachment
-----------------------------------
I think for some reason you lost the AUTOINCREMENT value in the attachment table... try to check it!


-----------------------------------
petra
Mon 17 Mar, 2008 09:51

Re: Couldn't Store Attachment
-----------------------------------
[quote user="Mighty Gorgon" post="24373"]I think for some reason you lost the AUTOINCREMENT value in the attachment table... try to check it![/quote]

Thnx for your answer, but where can I find it?


-----------------------------------
moreteavicar
Mon 17 Mar, 2008 12:49

Re: Couldn't Store Attachment
-----------------------------------
Do you have phpMyAdmin? Go phpMyAdmin>>your database>>attachments_desc

Check that field 'attach_id' has auto-increment (under "Extra").
If not, select edit for that field (pencil icon), go across to the "Extra" drop-down menu and select "auto increment". 

It doesn't make sense that it shouldn't be auto-increment, perhaps some tables got corrupted, or you imported an SQL dump which didn't have full table structure...


