question about restricting image types question about restricting image types
 

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

Main Menu

question about restricting image types

Started by treasurenet, May 19, 2005, 11:37:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

treasurenet

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.


Joachim Müller

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.

treasurenet

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.



kegobeer

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.
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

Quote from: kegobeer 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.

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

kegobeer

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.
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

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

???

kegobeer

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