Welcome to Geeklog, Anonymous Tuesday, November 12 2024 @ 03:01 pm EST
Geeklog Forums
User Image Resizing Issues
Status: offline
fatnick
Forum User
Junior
Registered: 10/20/02
Posts: 21
I've searched the site for about an hour before posting this but couldn't come up with anything other than "check your paths." I did check them and they are correct. Anyways, here is the problem...
I have both imagemagick and netpbm installed on my windows2000 webserver (using Apache). In the config.php for the photo resizing bit I set it to ImageMagick and the path to mogrify.exe is set. When I try to upload a file that should be resized I get this error.
I noticed that for some reason there is an apostrophe before the last underscore character. Could there be something in the code to get rid of that? I'm not really much of a programmer so if it's a big pain I can get by without fixing it and just posting a notice to all the users to keep their files within the limits. But if anyone has a quick answer I'd appreciate a response.
Oh yeah, the file uploads with no problem but doesn't attach itself to the user profile nor is it resized on the server.
Thanks a bunch.
Nick
I have both imagemagick and netpbm installed on my windows2000 webserver (using Apache). In the config.php for the photo resizing bit I set it to ImageMagick and the path to mogrify.exe is set. When I try to upload a file that should be resized I get this error.
Text Formatted Code
Image, fnhulk1.JPG had trouble being resized: mogrify.exe: unable to open module file `D:\ImageMagick\modules\coders\IM_MOD_RL_JPG'_.dll'.I noticed that for some reason there is an apostrophe before the last underscore character. Could there be something in the code to get rid of that? I'm not really much of a programmer so if it's a big pain I can get by without fixing it and just posting a notice to all the users to keep their files within the limits. But if anyone has a quick answer I'd appreciate a response.
Oh yeah, the file uploads with no problem but doesn't attach itself to the user profile nor is it resized on the server.
Thanks a bunch.
Nick
26
11
Quote
Status: offline
fatnick
Forum User
Junior
Registered: 10/20/02
Posts: 21
I reinstalled ImageMagick with their Windows Executable from their website and now I get this error...
I tried to check to see maybe if it was a rights issue but it's all gravy as far as the rights goes.
Text Formatted Code
Image, fnhulk1.JPG had trouble being resized: mogrify.exe: unable to open file `'d:/webroot/images/userphotos/FN.JPG'': No such file or directory.I tried to check to see maybe if it was a rights issue but it's all gravy as far as the rights goes.
18
26
Quote
Status: offline
JohnVanVliet
Forum User
Full Member
Registered: 10/09/03
Posts: 161
have you checked and set lines 492 to 500 in the config.php file
13
17
Quote
suprsidr
Anonymous
You have to give IUSR_machinename execute priveledges to mogrify.exe
19
14
Quote
Status: offline
fatnick
Forum User
Junior
Registered: 10/20/02
Posts: 21
Double checked permissions....they are set. Checked my config.php file and everything looks good.
That is the output now.
Text Formatted Code
Image, fnhulk1.JPG had trouble being resized: mogrify.exe: unable to open file `'d:/webroot/images/userphotos/FN.JPG'': No such file or directory.That is the output now.
16
13
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by fatnick: unable to open file `'d:/webroot/images/userphotos/FN.JPG'': No such file or directory.
Hmm. The image file names are enclosed in single quotes to avoid problems if they contain spaces. This works fine on Unix, Linux, etc. but apparently Windows thinks they're part of the file name.
Try this:
In system/classes/upload.class.php find this piece of code (search for "pathToMogrify", second occurence):
Text Formatted Code
$cmd = $this->_pathToMogrify . ' -resize '. $newsize . " '" . $this->_fileUploadDirectory . '/' . $this->_getDestinationName() . "' 2>&1";See the single quotes inside the double quotes? Remove them so that it reads
Text Formatted Code
$cmd = $this->_pathToMogrify . ' -resize '. $newsize . " " . $this->_fileUploadDirectory . '/' . $this->_getDestinationName() . " 2>&1";Now that I look at this, I'm wondering about the " 2>&1" bit, too (for Windows at least). Maybe remove that one as well:
Text Formatted Code
$cmd = $this->_pathToMogrify . ' -resize '. $newsize . " " . $this->_fileUploadDirectory . '/' . $this->_getDestinationName();See if that helps. It won't work if you have any spaces in your file or directory names, though.
bye, Dirk
13
13
Quote
suprsidr
Anonymous
try placing a copy of cmd.exe in your imagemagick root you'll find it in system32 make sure it also has IUSR_xxx exec. rights. Sometimes windows cannot find cmd.exe when it needs it.
This works for IIS, hopefully for apache too.
This works for IIS, hopefully for apache too.
17
16
Quote
All times are EST. The time is now 03:01 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content