| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
tulsais Newbie


Offline Joined: Jan 05, 2005 Posts: 11
|
Posted: Wed Jan 05, 2005 4:10 am Post subject: 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!
tulsais's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) FreeBSD4.10/Apache2/MySQL4.0/PHP4.3/CPG9
|
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Wed Jan 05, 2005 4:15 am Post subject: Re: Dragonfly PR1 - Image upload fix |
|
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.
Phoenix's 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 |
|
| Back to top |
|
 |
mrrizal Newbie


Offline Joined: Sep 11, 2004 Posts: 8
|
Posted: Wed Jan 05, 2005 4:25 am Post subject: Re: PR1 - coppermine image upload fix |
|
can you describe the full code since i amnot a programmer
mrrizal's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Freebsd/Apache 2.0.49/MySQL 4.17/PHP 4.3.9/CPGNuke 9.0 (cvs)
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Wed Jan 05, 2005 7:57 am Post subject: Re: PR1 - coppermine image upload fix |
|
What did you use (IM, GD or netPBM) ?
Is the system you had the problem FreeBSD or something else ?
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
mrrizal Newbie


Offline Joined: Sep 11, 2004 Posts: 8
|
Posted: Wed Jan 05, 2005 8:04 am Post subject: Re: PR1 - coppermine image upload fix |
|
ok i try everything.
i got this error whe using IM and netpbm
| Quote:: |
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
| Quote:: |
| 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.
mrrizal's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Freebsd/Apache 2.0.49/MySQL 4.17/PHP 4.3.9/CPGNuke 9.0 (cvs)
|
|
| Back to top |
|
 |
tulsais Newbie


Offline Joined: Jan 05, 2005 Posts: 11
|
Posted: Wed Jan 05, 2005 3:50 pm Post subject: Re: PR1 - coppermine image upload fix |
|
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.
tulsais's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) FreeBSD4.10/Apache2/MySQL4.0/PHP4.3/CPG9
|
|
| Back to top |
|
 |
Śyama_Dāsa Developer


Offline Joined: Apr 19, 2004 Posts: 2048 Location: Dragonfly CMS Tribe
|
Posted: Wed Jan 05, 2005 6:30 pm Post subject: Re: PR1 - coppermine image upload fix |
|
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
Śyama_Dāsa's 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)
|
|
| Back to top |
|
 |
rusty_blade Nice poster


Offline Joined: May 16, 2004 Posts: 136 Location: Toronto, Canada
|
Posted: Thu Jan 06, 2005 5:08 am Post subject: Re: PR1 - coppermine image upload fix |
|
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?
rusty_blade's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) WinXP Pro; Apache 2; mysql-3.23.38; PHP 4.3.6
|
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Thu Jan 06, 2005 5:12 am Post subject: Re: PR1 - coppermine image upload fix |
|
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.
_________________ • DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin •
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
Andreas 500+ Posts Club


Offline Joined: Sep 03, 2004 Posts: 852 Location: Gävle, Sweden
|
Posted: Thu Jan 06, 2005 11:07 am Post subject: Re: PR1 - coppermine image upload fix |
|
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
Andreas's 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
|
|
| Back to top |
|
 |
PerM Dragonfly addicted


Offline Joined: Aug 07, 2004 Posts: 390 Location: Sweden
|
Posted: Thu Jan 06, 2005 12:10 pm Post subject: Re: PR1 - coppermine image upload fix |
|
Well...logically thinking, if the PR1 package was continously updated it woudn't be PR1 anymore, would it?  i.e use CVS.
PerM's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
Spawn Newbie


Offline Joined: Jan 28, 2005 Posts: 13
|
Posted: Sun Jan 30, 2005 12:25 am Post subject: Re: PR1 - coppermine image upload fix |
|
| 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
| Code:: |
"Unable to create thumbnail or reduced size image.
File: /home/spawnge/public_html/modules/coppermine/db_input.php - Line: 446 " |
and the footer says
| Code:: |
"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
Spawn's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) linux/1.3.33 (Unix)/4.0.18-standard/4.3.10/9.0
|
|
| Back to top |
|
 |
Spawn Newbie


Offline Joined: Jan 28, 2005 Posts: 13
|
Posted: Sun Jan 30, 2005 12:37 am Post subject: Re: PR1 - coppermine image upload fix |
|
im sorry i found it, im a freaking moron.
Spawn's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) linux/1.3.33 (Unix)/4.0.18-standard/4.3.10/9.0
|
|
| Back to top |
|
 |
Spawn Newbie


Offline Joined: Jan 28, 2005 Posts: 13
|
Posted: Sun Jan 30, 2005 12:45 am Post subject: Re: PR1 - coppermine image upload fix |
|
actually i still get the exact same error after i updated the files
Spawn's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) linux/1.3.33 (Unix)/4.0.18-standard/4.3.10/9.0
|
|
| Back to top |
|
 |
Śyama_Dāsa Developer


Offline Joined: Apr 19, 2004 Posts: 2048 Location: Dragonfly CMS Tribe
|
Posted: Sun Jan 30, 2005 1:06 am Post subject: Re: PR1 - coppermine image upload fix |
|
_________________ AKA Akamu / Read these and your life will be successful | Find a Repair
--
Mods and Professional Support via YIM
Śyama_Dāsa's 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)
|
|
| Back to top |
|
 |
|
|