forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Fredda66 on September 01, 2005, 05:08:10 pm

Title: Can't delete an image.
Post by: Fredda66 on September 01, 2005, 05:08:10 pm
I get the following messages when trying to delete a picture through coppermine

"While executing query "DELETE FROM cpg11d_exif WHERE filename='albums/test/139.jpg' LIMIT 1" on 0
mySQL error: Table 'fredda_se.cpg11d_exif' doesn't exist"

I've ran the update.php file again and it says,

"CREATE TABLE cpg11d_exif ( `filename` text NOT NULL default '', `exifData` text NOT NULL, UNIQUE KEY `filename` (`filename`) ) TYPE=MyISAM Already Done "

But hell no, it's not done. It doesnt exist in my database.
When turning on "Read EXIF data in JPEG files" I can't even view my pictures!

Solution?

//F
Title: Re: Can't delete an image.
Post by: kegobeer on September 01, 2005, 08:02:33 pm
What does this have to do with the 1.4 beta?
Title: Re: Can't delete an image.
Post by: Fredda66 on September 01, 2005, 10:53:59 pm
I didn't have the problem on my previous version 1.2.1.
It has occured since the update...
But if you so wish, then move it to some sort of official support page?

//F
Title: Re: Can't delete an image.
Post by: kegobeer on September 02, 2005, 12:59:55 am
You upgraded to the beta version, 1.4.1?
Title: Re: Can't delete an image.
Post by: Fredda66 on September 05, 2005, 05:23:32 pm
Yes I did.
Title: Re: Can't delete an image.
Post by: Nibbler on September 05, 2005, 08:35:01 pm
Does your db user have the CREATE privilege ?
Title: Re: Can't delete an image.
Post by: artistsinhawaii on September 06, 2005, 10:19:45 am
I don't know if this will help, but I had something similar happen to me. Using Admin Tools and
rebuilding the thumbnails and intermediate pictures in the suspect album sorted out the problem for me.


Dennis
Title: Re: Can't delete an image.
Post by: Fredda66 on September 28, 2005, 12:15:08 pm
There is no suspect album. Can't delete any picture in any album without alot of huzzle.
Tried to rebuild all the thumbs but that didn't help.
The DB user must have CREATE privilege, otherwise I shouldn't been able to install the script from the begining?

More suggestions please! This must be fixed!

//F
Title: Re: Can't delete an image.
Post by: Joachim Müller on September 29, 2005, 08:30:03 am
your webhost might have changed permissions, so the initial install will have succeeded (while the db user had the create privilege), but when upgrading, the privileges might have been different then. Try this for yourself - use a tool like phpMyAdmin and run this query:
Code: [Select]
CREATE TABLE cpg11d_exif ( `filename` text NOT NULL default '', `exifData` text NOT NULL, UNIQUE KEY `filename` (`filename`) ) TYPE=MyISAMIf it fails, contact your webhost. Post feedback here.
Title: Re: Can't delete an image.
Post by: Nibbler on October 14, 2005, 04:13:41 am
This does need looking at though, we can't assume 'already done' just because the query fails.

Code: [Select]
        if (@mysql_query($q)) {
            echo "<td class='updatesOK'>OK</td>";
        } else {
            echo "<td class='updatesFail'>Already Done</td>";
        }
Title: Re: Can't delete an image.
Post by: Fredda66 on October 15, 2005, 09:43:53 am
your webhost might have changed permissions, so the initial install will have succeeded (while the db user had the create privilege), but when upgrading, the privileges might have been different then. Try this for yourself - use a tool like phpMyAdmin and run this query:
Code: [Select]
CREATE TABLE cpg11d_exif ( `filename` text NOT NULL default '', `exifData` text NOT NULL, UNIQUE KEY `filename` (`filename`) ) TYPE=MyISAMIf it fails, contact your webhost. Post feedback here.

Okey, sorry for the slow feedback here. It's been other things on the "to do list".
I've tried the proposed suggestion, with the following result:

SQL-frċga : 

CREATE TABLE cpg11d_exif(

`filename` text NOT NULL default '',
`exifData` text NOT NULL ,
UNIQUE KEY `filename` ( `filename` )
) TYPE = MYISAM

MySQL sa:

#1170 - BLOB column 'filename' used in key specification without a key length


There is no doubt that the user has create privileges. There's something else that's just not playing out right.
Title: Re: Can't delete an image.
Post by: Nibbler on October 15, 2005, 02:16:56 pm
Ah, that query is indeed wrong - it should be this

Code: [Select]
CREATE TABLE CPG_exif (
  `filename` varchar(255) NOT NULL default '',
  `exifData` text NOT NULL,
  UNIQUE KEY `filename` (`filename`)
) TYPE=MyISAM;