Dragonfly CMS v9 ⇒ Modules & Blocks :: Archives ⇒ PR1 - coppermine image upload fix :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

Archived ⇒ PR1 - coppermine image upload fix


I have a fix that I thought I would share with everyone. I was having problems upload images, batch and single. I kept getting the "Unable to create thumbnail or reduced size image."

My problem was I had been trying to upload an image DSC000.JPG which, after being manipulated, turned to dsc000.JPG. Notice the different case.... The batch upload was also affected. The fix is simple. I added 1 simple word to 2 lines.

In modules/coppermine/include/picmgmt.inc line 29 & 30:
added strtolower() around $filename variable. Be sure you are only adding it to the definition of $normal and $thumb. If you add it to $image, it will break the page.

Let me know if this causes any problems I don't know about!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD4.10/Apache2/MySQL4.0/PHP4.3/CPG9


hmm, I can see the dilemma people are having - Dragonfly, so I have moved it to 9.x

Would be best to report this in cpgnuke.com/Projects/p=1.html
That way it can be verified, or an alternative provided.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by Phoenix on Wed Jan 05, 2005 4:27 am; edited 1 time in total


can you describe the full code since i amnot a programmer

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Freebsd/Apache 2.0.49/MySQL 4.17/PHP 4.3.9/CPGNuke 9.0 (cvs)


What did you use (IM, GD or netPBM) ?
Is the system you had the problem FreeBSD or something else ?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


ok i try everything.

i got this error whe using IM and netpbm
The picture 'modules/coppermine/albums/userpics/dsc00942~6.JPG' can't be inserted in the album

Unable to create thumbnail or reduced size image.


i think tulsais isright because my original filename is DSC00000942.JPG and the error display namein small cap.

I got this error when using GD
Fatal error: Call to undefined function: image_file_to_extension() in /usr/home/mrrizal/data/www/semesti/html/includes/imaging/gd2.inc on line 68


i just update gd2.inc using cvs since last time i got corrupted image when i upload a image.

and i just try another cms using coppermine as plugin. it running well. i make a conclusion my freebsd's IM,netpbm or GD is ok.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Freebsd/Apache 2.0.49/MySQL 4.17/PHP 4.3.9/CPGNuke 9.0 (cvs)


Sorry, let me give some more info...

I'm running FreeBSD4.10 with Imagemagick. The only problem I had was the original filename was in CAPS, but the new filename was lower case with a CAPS extension. What I've stated above just converts all name to lowercase after the normal and thumb. Now, while writing this response, I believe I've thought of a problem. The original name will still be CAPS, so when it tries to display it, it will probably error because the file is being stored in MySQL all lowercase.

I'm not sure how to post the bug in the reporting tool, so if someone could help me with that, I definately appreciate it. Feel free to ask me any questions about what I've done. I am new to CPGNuke, so I'm not sure if I can be of any help. Big grin

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD4.10/Apache2/MySQL4.0/PHP4.3/CPG9


This was fixed in the latest CVS version.
Files changed are:
html/includes/imaging imaging.inc 1.5
html/modules/coppermine db_input.php 8.11
html/modules/coppermine/include picmgmt.inc 8.8
Thanks tulsais and mrrizal

AKA Akamu / Read these and your life will be successful | Find a Repair
--
Mods and Professional Support via YIM

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
win32 / Apache 1.3.33 / MySQL 4.1.16/PHP 4.4/CPG-CVS ( browsers: Mozilla 1.7.x / IE6 / Opera 8.0)


Am I missing something? I have a server with Dragonfly and CPG 8.2. The 8.2 works fine and is set-up to GD version 2.x.
However, the Dragonfly only has 2 options: Image Magick and Netpdm, but no GD.

So I downloaded ImageMagick and installed it and I gave the path and it still doesn't work. I tried adding the strtolower($filename); but without any success.

What should be done?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
WinXP Pro; Apache 2; mysql-3.23.38; PHP 4.3.6


You would be best updating with the latest snapshot as there have been extensive changes to many files since PR1 was released - all 3 options show up on mine.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Is the PR1 package continously updated as well with the new changes or should the rest of us return to downloading the latest CVS-tarballs?

Andreas Rönnqvist
www.omegaproject.se
[OmegaProject] Founder

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 2.0.52(Unix)/4.0.23/4.3.10-2/Dragonfly 9.0.6.1


Well...logically thinking, if the PR1 package was continously updated it woudn't be PR1 anymore, would it? Smile i.e use CVS.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>


akamu wrote
This was fixed in the latest CVS version.
Files changed are:
html/includes/imaging imaging.inc 1.5
html/modules/coppermine db_input.php 8.11
html/modules/coppermine/include picmgmt.inc 8.8
Thanks tulsais and mrrizal


html/modules/coppermine/include picmgmt.inc 8.8 wasnt in the CVS tree. im still getting"Unable to create thumbnail or reduced size image. File: /home/spawnge/public_html/modules/coppermine/db_input.php - Line: 446 "
and the footer says
"includes/coppermine/picmgmt.inc Warning line 125: chmod(): SAFE MODE Restriction in effect. The script whose uid is 32388 is not allowed to access modules/coppermine/albums/userpics/10002/vorlondd_outline.jpg owned by uid 99 Warning line 127: getimagesize(): SAFE MODE Restriction in effect. The script whose uid is 32388 is not allowed to access modules/coppermine/albums/userpics/10002/vorlondd_outline.jpg owned by uid 99 Warning line 127: getimagesize(modules/coppermine/albums/userpics/10002/vorlondd_outline.jpg): failed to open stream: Success Warning line 130: unlink(): SAFE MODE Restriction in effect. The script whose uid is 32388 is not allowed to access modules/coppermine/albums/userpics/10002/vorlondd_outline.jpg owned by uid 99

ill put the info i klnow about my server in my profile, as i was too alzy to before

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/1.3.33 (Unix)/4.0.18-standard/4.3.10/9.0


im sorry i found it, im a freaking moron.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/1.3.33 (Unix)/4.0.18-standard/4.3.10/9.0


actually i still get the exact same error after i updated the files

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/1.3.33 (Unix)/4.0.18-standard/4.3.10/9.0


Spawn Link to your site?

AKA Akamu / Read these and your life will be successful | Find a Repair
--
Mods and Professional Support via YIM

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
win32 / Apache 1.3.33 / MySQL 4.1.16/PHP 4.4/CPG-CVS ( browsers: Mozilla 1.7.x / IE6 / Opera 8.0)

All times are UTC