Can't batch add Can't batch add
 

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]

Main Menu

Can't batch add

Started by Flaunt, May 21, 2006, 01:03:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Flaunt

I can't seem to add pictures to the gallery.  It keeps telling me that there was no album selected but there was.  The permissions are correct. (777)  Here's a screenshot:

http://smell.nu/pictures/polok0003.jpg

The same problem applies to browser upload.  "Album not selected"

What should I do?

Joachim Müller


Flaunt

#2
Done!

QuoteWhile executing query "INSERT INTO cpg135_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 ('0', 'userpics/10001/', 'farley~2.jpg', '45166', '52483', '807', '681', '1148271843', '1', 'admin','', '', '', 'YES', '', '', '', '', '58.69.76.112', '58.69.76.112', '0')" on 0

mySQL error: Duplicate entry '0' for key 1

File: /home/melissa/public_html/include/functions.inc.php - Line: 249

test account:

username: test
password: 123456

Gallery: http://avril-images.net

Joachim Müller

it seems like you moved servers or restored your database. Make sure that "aid" is set to auto-increment, using a tool like phpMyAdmin.

Flaunt

Done!  And yes, we did really recently changed servers :)

First Attempt
QuoteThe selected album/file does not exist !

File: /home/melissa/public_html/displayimage.php - Line: 266

Second Attempt

QuoteWhile executing query "INSERT INTO cpg135_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 ('0', 'userpics/10001/', 'polok0002~0.jpg', '38848', '39938', '1134', '599', '1148340964', '1', 'admin','', '', '', 'YES', '', '', '', '', '58.69.51.100', '58.69.51.100', '0')" on 0

mySQL error: Duplicate entry '0' for key 1

File: /home/melissa/public_html/include/functions.inc.php - Line: 249



kegobeer

You need to reset the table's auto increment number.  Use phpMyAdmin to execute this query:

ALTER TABLE cpg135_pictures AUTO_INCREMENT = 1
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Flaunt

Done!

QuoteWhile executing query "INSERT INTO cpg135_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 ('0', 'userpics/10001/', 'polok0002~3.jpg', '38848', '39938', '1134', '599', '1148349238', '1', 'admin','', '', '', 'YES', '', '', '', '', '58.69.51.100', '58.69.51.100', '0')" on 0

mySQL error: Duplicate entry '0' for key 1

File: /home/melissa/public_html/include/functions.inc.php - Line: 249

Tranz

Try having the autoincrement be the next number after the largest aid in the db.

Flaunt

I did

QuoteALTER TABLE cpg135_pictures AUTO_INCREMENT = 473

472 was the last number on aid

QuoteWhile executing query "INSERT INTO cpg135_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 ('455', 'userpics/10001/', 'haha.jpg', '7388', '10305', '233', '237', '1148352908', '1', 'admin','', '', '', 'YES', '', '', '', '', '58.69.76.44', '58.69.76.44', '0')" on 0

mySQL error: Duplicate entry '0' for key 1

File: /home/melissa/public_html/include/functions.inc.php - Line: 249

Nibbler

Autoincrement should be on the pid field, not aid.

kegobeer

Once you set the PID field as auto increment, execute my previous statement.  If you set the auto_increment to 1, MySQL automatically resets the field to the highest number in that column.  You don't have to count the numbers and add one.  ;)
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Flaunt

working now :)   Thank you all so much!