Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Critical error ... "While executing query "INSERT INTO cpg140_pictures..."  (Read 4168 times)

0 Members and 1 Guest are viewing this topic.

xluke

  • Coppermine newbie
  • Offline Offline
  • Posts: 6

Hello,
When trying to finalize the uploading of an image (i.e., placing it in an album and clicking continue) I get the following error:

"
There was an error while processing a database query.

While executing query "INSERT INTO cpg140_pictures (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('5', 'userpics/10001/', 'JBL_amp~1.jpg', '43914', '74135', '472', '360', '1142958802', '1', 'xluke','', '', '', 'YES', '', '', '', '', '67.108.100.21', '192.168.4.88', '0')" on 0
"

This just started all of a sudden.  I have upgraded from 140 to 144 in an attempt to fix it, and also used my cpanel to rebuild the mysql database (it did not report any errors). 

Any ideas?

Thanks!

Debug info:  <A HREF="http://www.lucarelli.ca/cpg140/debug1.txt">Please find offsite, maximum allowed message length was reached</A>



Logged

Nibbler

  • Guest

Please post the complete error message.
Logged

xluke

  • Coppermine newbie
  • Offline Offline
  • Posts: 6

Hello,

I think I did post the entire error message.  Please re-read my message or direct me to what else you need.  The debug info is linked above (http://www.lucarelli.ca/cpg140/debug1.txt) because it was too large to paste into the forum. 

Thank you very much for your help.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

The error message should be
Quote
While executing query XXX,
YYY happened.
You have only posted the first line
Quote
While executing query XXX

As Nibbler suggested: post the entire error message.
Logged

xluke

  • Coppermine newbie
  • Offline Offline
  • Posts: 6

Thanks,
This should be everything:

"
Critical error
There was an error while processing a database query.

While executing query "INSERT INTO cpg140_pictures (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('8', 'userpics/10001/', 'JBL_amp~2.jpg', '43914', '74135', '472', '360', '1143208347', '1', 'xluke','', '', '', 'YES', '', '', '', '', '67.108.100.21', '192.168.4.88', '0')" on 0

mySQL error: Duplicate entry '0' for key 1

 File: /home/lucarell/public_html/cpg140/include/functions.inc.php - Line: 248
"

Then, the debug info:  http://www.lucarelli.ca/cpg140/debug1.txt


Thanks again!
Logged

Nibbler

  • Guest

Ensure that the pid field is set to auto_increment on your cpg140_pictures table in phpmyadmin.
Logged

xluke

  • Coppermine newbie
  • Offline Offline
  • Posts: 6

Can you tell me how to do that?  I've been playing around in phpmyadmin but haven't been able to find that option. 

I do think you are right thought that its not auto incrementing the pid because when i delete a picture, i can then upload one, but not a second. 

Perhaps when my administrator moved my table to a new server, he failed to preserve the autoincrement option.

Thanks a lot,
Rick
Logged

Nibbler

  • Guest

Go to the 'structure' page, edit the table, and check that auto_increment is set in the 'extra' column. Some other tables need this set too, refer to the sql/schema.sql file.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.