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: question about restricting image types  (Read 3983 times)

0 Members and 1 Guest are viewing this topic.

treasurenet

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • digitalimagery
question about restricting image types
« on: May 19, 2005, 11:37:15 pm »

sorry to bother you folks again...

I set up cpg, and have it working beautifully... http://www.digitalimagery.com/

but now I want to retrict file types...

so, in the allowed image types, I set it to...  "jpg, jpeg" no quotes.

when I reloaded the gallery all the thumbnails were gone...  so, I went into admin tools, and clicked on "Update Database", and all my thumbnails reappeared....  but then when I went back into config, I noticed that allowed image types was reset to "ALL".  

I even tried it in this sequence...  changed file allowed image types, then updated database, then reloaded gallery - still no luck.

What am I doing wrong?

If the answer to my problem is in the docs, I apologize for asking for help here.

Thx.

« Last Edit: May 20, 2005, 04:36:58 am by treasurenet »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: question about restricting image types
« Reply #1 on: May 20, 2005, 08:41:16 am »

not sure why this happens. To get rid of all other filetypes for good, use a tool like phpMyAdmin that allows you to edit your database directly. Browse coppermine's filetypes table and remove all entries but the jpeg ones. Bakc up your db before you do so.
Logged

treasurenet

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • digitalimagery
Re: question about restricting image types
« Reply #2 on: May 20, 2005, 08:07:05 pm »

ok, well, I used phpmyadmin, and deleted just the file type swc... to test...

then went into config, and noticed that allowed file types, still showed ALL.

then when I went into admin tools, and clicked on update database,

Here what I see after clicking on Update Database ...

[snip]
INSERT INTO cpg133_filetypes VALUES ('swc', 'image/swc', 'image')   OK
INSERT INTO cpg133_filetypes VALUES ('iff', 'image/iff', 'image')   Already Done
UPDATE cpg133_config SET value='ALL' WHERE name='allowed_img_types'   OK
[/snip]

 swc was once again in the allowed file types, in phpmyadmin.


somehow update database is resetting the allowed file types to ALL.

any help would be appreciated.


Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: question about restricting image types
« Reply #3 on: May 21, 2005, 01:05:01 am »

Why did you update the database?  The update.php file is meant to update your database configuration to the latest version, so it will overwrite your changes, so obviously you don't want to do that.  Change the allowed file types, and if your thumbnails disappear for some reason, update thumbs and/or resized pictures in the Admin Tools.
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

treasurenet

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • digitalimagery
Re: question about restricting image types
« Reply #4 on: May 21, 2005, 02:22:50 am »

Why did you update the database?  The update.php file is meant to update your database configuration to the latest version, so it will overwrite your changes, so obviously you don't want to do that.  Change the allowed file types, and if your thumbnails disappear for some reason, update thumbs and/or resized pictures in the Admin Tools.

I was clicking on update database because - yes -  I was losing my thumbnails.

Now OH NO - I tried what you suggested - to my "animals" album only - (do I have to do one album at a time???)

and got this result...

albums/userpics/10001/thumb_tess.jpg updated succesfully!
albums/userpics/10001/normal_tess.jpgupdated succesfully!
albums/userpics/10004/thumb_MOOSE 11.JPG updated succesfully!
albums/userpics/10004/normal_MOOSE 11.JPGupdated succesfully!
albums/userpics/10003/thumb_DSCN2647.jpg updated succesfully!
albums/userpics/10003/normal_DSCN2647.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN2055.jpg updated succesfully!
albums/userpics/10003/normal_DSCN2055.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN1906.jpg updated succesfully!
albums/userpics/10003/normal_DSCN1906.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN1493.jpg updated succesfully!
albums/userpics/10003/normal_DSCN1493.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN2054.jpg updated succesfully!
albums/userpics/10003/normal_DSCN2054.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN1250.jpg updated succesfully!
albums/userpics/10003/normal_DSCN1250.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN1321.jpg updated succesfully!
albums/userpics/10003/normal_DSCN1321.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN1397_1.jpg updated succesfully!
albums/userpics/10003/normal_DSCN1397_1.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN2260.jpg updated succesfully!
albums/userpics/10003/normal_DSCN2260.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN2224.jpg updated succesfully!
albums/userpics/10003/normal_DSCN2224.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN2163.jpg updated succesfully!
albums/userpics/10003/normal_DSCN2163.jpgupdated succesfully!
albums/userpics/10003/thumb_DSCN2202.jpg updated succesfully!


and after that, I had NO thumbnails again.

http://www.digitalimagery.com/

sssoooo....  I clicked on update database again and got everything back.

sigh.

Are the file type suffixes in the allowed file types case sensitive?  or, do I need to use ".jpg" instead of "jpg"?

Any other suggestions?

Thx
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: question about restricting image types
« Reply #5 on: May 21, 2005, 03:29:40 am »

I duplicated your issue on my devel version.  Instead of jpg,jpe try jpg/jpe

Also, you don't have to use phpMyAdmin to mess with your database, just change the allowed img types in your config page.  If you lose thumbnails, just put ALL back in there.  You don't have to use update.php to restore the database.  If you have other changes on your config page, they will get reset every time you use update.php.
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

treasurenet

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • digitalimagery
Re: question about restricting image types
« Reply #6 on: May 21, 2005, 03:56:15 am »

Voila!  That worked fine.  Thanks!

so - are allowed image types separated by forward slashes then, or do I need to list them like this....

jpg/jpe, gif, tif

???
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: question about restricting image types
« Reply #7 on: May 21, 2005, 01:17:43 pm »

Use slashes: jpg/jpe/gif
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
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.