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
-
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?
-
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble
-
Done!
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
-
it seems like you moved servers or restored your database. Make sure that "aid" is set to auto-increment, using a tool like phpMyAdmin.
-
Done! And yes, we did really recently changed servers :)
First Attempt
The selected album/file does not exist !
File: /home/melissa/public_html/displayimage.php - Line: 266
Second Attempt
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
-
You need to reset the table's auto increment number. Use phpMyAdmin to execute this query:
ALTER TABLE cpg135_pictures AUTO_INCREMENT = 1
-
Done!
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
-
Try having the autoincrement be the next number after the largest aid in the db.
-
I did
ALTER TABLE cpg135_pictures AUTO_INCREMENT = 473
472 was the last number on aid
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
-
Autoincrement should be on the pid field, not aid.
-
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. ;)
-
working now :) Thank you all so much!