 | |  | | | Classifieds Bug Reports Post any problems you may be having with Classifieds here. |
September 24th, 2006, 06:51 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
| 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! |
| |
September 24th, 2006, 07:11 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,666
|
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.
|
| |
September 24th, 2006, 07:25 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
|
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.
Last edited by CavySpirit; September 24th, 2006 at 07:30 PM.
|
| |
September 24th, 2006, 07:34 PM
|
#4 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
| |
| |
September 24th, 2006, 07:39 PM
|
#5 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,666
|
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?
|
| |
September 24th, 2006, 07:42 PM
|
#6 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
|
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.
|
| |
September 24th, 2006, 08:08 PM
|
#7 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,666
|
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.
|
| |
September 24th, 2006, 08:30 PM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
|
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.
|
| |
September 24th, 2006, 08:40 PM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
|
I'll work through it. Somehow the files are not getting renamed from the mgk version.
|
| |
September 24th, 2006, 09:06 PM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
|
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.
|
| |
September 24th, 2006, 09:56 PM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
|
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
|
| |
September 25th, 2006, 01:58 AM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Sep 2002
Posts: 225
|
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.
|
| |
September 25th, 2006, 08:57 AM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,666
|
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
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 10:24 PM. | |