![]() |
Problems uploading large files I've been trying to figure out how I can allow users to upload large files and have the system resize them automatically. I seem to be going circles. On the large files, GD2 and memory tweaks, just weren't cutting it. So, it sounded like switching to ImageMagik would resolve it. I did that. Config is: /usr/bin/mogrify (seems right, as I get .mgk files in the data directory) Options: Maximium width of preview image on showpoduct page = 400 Maximium height of preview image on showpoduct page = 300 Max supersize = 600 If product upload width or height exceeds maximums, resize upload down to max dimensions? YES Maximum PHP file upload size? 7000000 If I try to upload a 515KB file, at 2048x1536 (a relatively small file) It does NOT resize the image! I get the full image uploaded. I've always used GD2 before and am not used to using ImageMagik. Please help! :o |
what do you mean you always get the full size image? Link to install? If I upload a file bigger than my supersize etc my supersize is resized to supersize max the preview image is the correct size and my thumb also. |
Okay. I put in a bunch of echo statements to try to narrow down the problem. Of course, you'll probably come back and tell me I've got some real obvious problem. But here are the pretty self-explanatory results. This is all from image-inc.php in the create_thumb function: in create_thumb: type=2, w=2048, h=1536 in create_thumb: resizeorig=1, supermax=600 in create_thumb: maxh=300, maxw=400, new-wid=400, new-h=300, filepath=/home/gphome/public_html/ads/data/2/cage2.jpg in create_thumb: syscmd="/usr/bin/mogrify" -quality 70 -geometry 400x300 /home/gphome/public_html/ads/data/2/cage2.jpg retval for fs_exec to resize original: 0 in create_thumb: syscmd="/usr/bin/mogrify" -quality 70 -geometry 600x450 '/home/gphome/public_html/ads/data/2/large/cage2.jpg', retval for fs_exec to resize original =0 in create_thumb: syscmd="/usr/bin/mogrify" -size 90x68 -quality 70 -geometry 90x68 /home/gphome/public_html/ads/data/2/thumbs/cage2.jpg and retval=0 for fs_exec to create thumb So while it SEEMS like it is passing all the right info and I know it is calling mogrify, it is not executing successfully. Why, I have no clue. I hope this helps narrow down the problem. Also, files are being added to directories, so it is not a permissions problem. In fact, in each directory, I get cage2.jpg and cage2.mgk, with the mgk files being about 14K in size. However, I do see that if I rename the mgk files to jpgs, they are the properly sized files. |
|
You can PM me an admin login and if you want PHP info Is safe mode on? Is your directory permissions all 777 within data? |
I can't remember where you look for safe mode, but I'm pretty sure not. Permissions on Data directories are all 777. Will PM you login. |
well yes your install is all hacked up but your issue is easy Your missing this query from your database Code: Content visible to verified customers only. |
I know I've made a lot of modifications. I've talked about them elsewhere. But, I'm careful about what I ask for support on. I'm not sure how you came to the conclusion that that record is missing in the table. That's from the install, right? When I look at that file, the record is there exactly as it's supposed to be in the cp_settings table. Perhaps you just added it for me? If so, I'm still having the same problem. |
I'll work through it. Somehow the files are not getting renamed from the mgk version. |
Okay, I've gone into more detail on everything. The cp_settings are actually fine. That code is executing. The issue seems to be that ImageMagik is naming the newly sized files with extensions of .mgk and I really don't quite understand when, where or how those files are supposed to replace the originals. As I said, my data directories all contain two versions of each file name. The .jpg version and the .mgk version. For example, after create_thumb executes, I have: The variables are $realname=cage2.jpg, $dst_file=/home/gphome/public_html/ads/data/2/cage2.jpg $category=2 Which I believe is fine. So at that point, somehow those mgk extensions still need to be renamed somewhere. |
Hey Chuck, If you can just tell me whether or not the the call to imagemagick (ie, mogrify) is supposed to return the same file name or if it's supposed to get renamed elsewhere in the classifieds script, that would be helpful. If it's supposed to change the original file, then I'll pursue debugging my command with ImageMagick. Thanks much, Teresa |
Well after a TON of research on the net, reading all about ImageMagick and Mogrify, making damn sure it wasn't my problem in the script, I came across this little page which is my EXACT problem: http://studio.imagemagick.org/piperm...ay/001273.html Turns out my host has Version 5.4.7 of ImageMagick installed. I've put in a support ticket for them to upgrade to 6.2. I'm hoping that will solve the problem. |
You where missing the available image types as noted since in your admin upload options it was not located there that is why I told you that was missing and is exactly why GD2 did not work for you |
| All times are GMT -5. The time now is 08:03 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0