forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: Flaunt on May 21, 2006, 01:03:54 pm

Title: Can't batch add
Post by: Flaunt on May 21, 2006, 01:03:54 pm
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 (http://smell.nu/pictures/polok0003.jpg)

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

What should I do?
Title: Re: Can't batch add
Post by: Joachim Müller on May 21, 2006, 03:52:53 pm
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble
Title: Re: Can't batch add
Post by: Flaunt on May 22, 2006, 06:24:36 am
Done!

Quote
While 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
Title: Re: Can't batch add
Post by: Joachim Müller on May 22, 2006, 06:58:05 pm
it seems like you moved servers or restored your database. Make sure that "aid" is set to auto-increment, using a tool like phpMyAdmin.
Title: Re: Can't batch add
Post by: Flaunt on May 23, 2006, 01:33:30 am
Done!  And yes, we did really recently changed servers :)

First Attempt
Quote
The selected album/file does not exist !

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

Second Attempt

Quote
While 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


Title: Re: Can't batch add
Post by: kegobeer on May 23, 2006, 03:37:15 am
You need to reset the table's auto increment number.  Use phpMyAdmin to execute this query:

ALTER TABLE cpg135_pictures AUTO_INCREMENT = 1
Title: Re: Can't batch add
Post by: Flaunt on May 23, 2006, 03:52:32 am
Done!

Quote
While 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
Title: Re: Can't batch add
Post by: Tranz on May 23, 2006, 04:13:02 am
Try having the autoincrement be the next number after the largest aid in the db.
Title: Re: Can't batch add
Post by: Flaunt on May 23, 2006, 04:55:31 am
I did

Quote
ALTER TABLE cpg135_pictures AUTO_INCREMENT = 473

472 was the last number on aid

Quote
While 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
Title: Re: Can't batch add
Post by: Nibbler on May 23, 2006, 01:00:42 pm
Autoincrement should be on the pid field, not aid.
Title: Re: Can't batch add
Post by: kegobeer on May 23, 2006, 01:03:38 pm
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.  ;)
Title: Re: Can't batch add
Post by: Flaunt on May 23, 2006, 02:25:45 pm
working now :)   Thank you all so much!