Advanced search  

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

Pages: [1]   Go Down

Author Topic: Can't batch add  (Read 6126 times)

0 Members and 1 Guest are viewing this topic.

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Can't batch add
« 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

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

What should I do?
« Last Edit: May 23, 2006, 04:45:55 pm by TranzNDance »
Logged

Joachim Müller

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

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Can't batch add
« Reply #2 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
« Last Edit: May 22, 2006, 05:51:16 pm by wacky_lokpo »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Can't batch add
« Reply #3 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.
Logged

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Can't batch add
« Reply #4 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


kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Can't batch add
« Reply #5 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
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Can't batch add
« Reply #6 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

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Can't batch add
« Reply #7 on: May 23, 2006, 04:13:02 am »

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

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Can't batch add
« Reply #8 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

Nibbler

  • Guest
Re: Can't batch add
« Reply #9 on: May 23, 2006, 01:00:42 pm »

Autoincrement should be on the pid field, not aid.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Can't batch add
« Reply #10 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.  ;)
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Can't batch add
« Reply #11 on: May 23, 2006, 02:25:45 pm »

working now :)   Thank you all so much!
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 19 queries.