Advanced search  

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]

Pages: [1]   Go Down

Author Topic: CPG Upload issue: File can't be added due to Database  (Read 6884 times)

0 Members and 1 Guest are viewing this topic.

Manutjee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 80
CPG Upload issue: File can't be added due to Database
« on: February 25, 2014, 04:29:51 pm »

Hi!

I have been trying to upload this album for a few minutes now.
The album directory (CPG) is empty. Coppermine, or better, my Database registers the photos as already being added; they are duplicates according to my Database.
How can I solve this?

I have tried:
- Deleting the uploaded folder
- Re-creating the folder
- Check if the photos are placed elsewere

Attachments below.
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CPG Upload issue: File can't be added due to Database
« Reply #1 on: February 25, 2014, 08:58:05 pm »

You answered the problem here:
Quote
they are duplicates according to my Database.

If your intention is starting over with an empty gallery - you need to empty the cpg_pictures table as well as the folder...
phpMyAdmin typically has a button to do so under the Operations tab for a given table...
Or the SQL would be TRUNCATE TABLE cpg_pictures; using your appropriate cpg prefix of course...

This cannot be undone - so insure you really want to empty...

All albums and categories will remain - but they will have no pictures.
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Manutjee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 80
Re: Re: CPG Upload issue: File can't be added due to Database
« Reply #2 on: February 26, 2014, 01:33:08 pm »

You answered the problem here:
If your intention is starting over with an empty gallery - you need to empty the cpg_pictures table as well as the folder...
phpMyAdmin typically has a button to do so under the Operations tab for a given table...
Or the SQL would be TRUNCATE TABLE cpg_pictures; using your appropriate cpg prefix of course...

This cannot be undone - so insure you really want to empty...

All albums and categories will remain - but they will have no pictures.

No, I do not want to start over with an empty gallery.
I need/needed those photos that I uploaded to be added to the CPG folder in Coppermine itself, but I ran into that problem.
The files were uploaded in a folder called '3x17_Silverfinger', but CPG recognized the files somehow - even though, in my memory, I cannot remember adding them.
I "solved" the issue by creating a new folder in 'uploads' called '3x17'. I wonder why I could not batch-add them earlier, in the directory '3x17_Silverfinger'.
Hope you understand what I mean. Am I able to fix the issue without deleting stuff or anything? Am I able to upload and batch-add them in the correct FTP folder?
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CPG Upload issue: File can't be added due to Database
« Reply #3 on: February 26, 2014, 05:48:28 pm »

Can you post a link to your gallery so I can see what CPG 'thinks' is in the gallery today??

You say the CPG albums folder is empty, but CPG thinks photos exist...
That would mean files were deleted outside of Coppermine. A quick view of the gallery would confirm.
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Manutjee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 80
Re: CPG Upload issue: File can't be added due to Database
« Reply #4 on: February 27, 2014, 12:52:13 pm »

I also think the files were deleted outside of Coppermine.
Feel free to take a look, 'cause I am kind of lost here, haha!
Link: http://teenwolfonline.org/photos
If you want to have logins, feel free to PM me.
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CPG Upload issue: File can't be added due to Database
« Reply #5 on: February 27, 2014, 02:41:02 pm »

OK... there are 19,000+ pics...
So the issue is with one folder you are trying to add.

Take the folder path you are trying to add from, and using phpMyAdmin or similar - let's see what Coppermine thinks is there...
If your folderpath is:  {cpg_directory}/albums/folder1/folder2/  and your coppermine table prefix is 'cpg_'
Then the SQL would be:
Code: [Select]
SELECT * FROM cpg_pictures WHERE filepath = 'folder1/folder2/'Note I did not include the 'albums/' folder as that is a CONFIG variable and not stored with each picture. Adjust the table prefix and folder names to match your install.

The resulting list will give you what photos Coppermine knows about that it already expects are in that folder... including a timestamp we can see when they were added.
See how that compares to what you are adding.
If that particular folder is actually empty - we can easily delete just those entries from Coppermine...
If some exist and some don't - it gets a little harder...

Post a few of the entries - and what SHOULD be in that folder now (if anything)...

Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Manutjee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 80
Re: Re: CPG Upload issue: File can't be added due to Database
« Reply #6 on: February 27, 2014, 07:21:11 pm »

OK... there are 19,000+ pics...
So the issue is with one folder you are trying to add.

Take the folder path you are trying to add from, and using phpMyAdmin or similar - let's see what Coppermine thinks is there...
If your folderpath is:  {cpg_directory}/albums/folder1/folder2/  and your coppermine table prefix is 'cpg_'
Then the SQL would be:
Code: [Select]
SELECT * FROM cpg_pictures WHERE filepath = 'folder1/folder2/'Note I did not include the 'albums/' folder as that is a CONFIG variable and not stored with each picture. Adjust the table prefix and folder names to match your install.

The resulting list will give you what photos Coppermine knows about that it already expects are in that folder... including a timestamp we can see when they were added.
See how that compares to what you are adding.
If that particular folder is actually empty - we can easily delete just those entries from Coppermine...
If some exist and some don't - it gets a little harder...

Post a few of the entries - and what SHOULD be in that folder now (if anything)...

Greg

Will try tomorrow.
I hope I won't be doing anything wrong... I do know some stuff, but this is something I have never done before, so I hope everything goes well, and that I understood it correctly. Thanks for the help so far! I appreciate it, and will try tomorrow. Just wanted to leave a reply so that you know I've read it.
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CPG Upload issue: File can't be added due to Database
« Reply #7 on: February 27, 2014, 07:48:46 pm »

No problem... Just post when you have the results...
'SELECT' is safe - we aren't changing anything at this point - just looking.
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Manutjee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 80
Re: CPG Upload issue: File can't be added due to Database
« Reply #8 on: February 28, 2014, 11:13:01 am »

Hope I did it right... English isn't my native language... LOL

Quote
SELECT *
FROM cpg15x_pictures
WHERE filepath =  'Teen_Wolf/Season_3/Episode_Stills/3x17_Silverfinger'
LIMIT 0 , 30

I just went to my PHPAdmin, selected the Pictures table, went to SQL and typed in what you quoted above, and clicked on start.

Quote
SELECT * FROM cpg15x_pictures WHERE filepath = 'Teen_Wolf/Season_3/Episode_Stills/3x17_Silverfinger'

I think I'm doing something wrong, or that I don't understand something for some reason....
Logged

Manutjee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 80
Re: CPG Upload issue: File can't be added due to Database
« Reply #9 on: February 28, 2014, 12:53:53 pm »

Since I cannot edit my post:

I solved the issue! The files were stored in the Coppermine folder Screencaps > 3x17 Silverfinger instead of the Episode Stills.
I scrolled through the gallery, and I came across some trashcans, haha!

Thanks for all the help!
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CPG Upload issue: File can't be added due to Database
« Reply #10 on: February 28, 2014, 01:25:24 pm »

Glad you found it,.. And thank you for marking 'solved'
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: CPG Upload issue: File can't be added due to Database
« Reply #11 on: February 28, 2014, 01:55:12 pm »

I think I'm doing something wrong

Just for the record, phpMyAdmin haven't found any rows as you forgot to add the trailing slash.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.