Critical error ... "While executing query "INSERT INTO cpg140_pictures..." Critical error ... "While executing query "INSERT INTO cpg140_pictures..."
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Critical error ... "While executing query "INSERT INTO cpg140_pictures..."

Started by xluke, March 21, 2006, 05:36:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xluke

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>





xluke

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.

Joachim Müller

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

As Nibbler suggested: post the entire error message.

xluke

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!

Nibbler

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

xluke

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

Nibbler

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.