PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Bug Reports (http://www.photopost.com/forum/classifieds-bug-reports/)
-   -   Problems uploading large files (http://www.photopost.com/forum/classifieds-bug-reports/127453-problems-uploading-large-files.html)

CavySpirit September 24th, 2006 06:51 PM

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

Chuck S September 24th, 2006 07:11 PM

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.

CavySpirit September 24th, 2006 07:25 PM

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.

CavySpirit September 24th, 2006 07:34 PM

http://www.guineapighome.com/ads/sho...hp/product/109

Chuck S September 24th, 2006 07:39 PM

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?

CavySpirit September 24th, 2006 07:42 PM

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.

Chuck S September 24th, 2006 08:08 PM

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.

CavySpirit September 24th, 2006 08:30 PM

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.

CavySpirit September 24th, 2006 08:40 PM

I'll work through it. Somehow the files are not getting renamed from the mgk version.

CavySpirit September 24th, 2006 09:06 PM

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.

CavySpirit September 24th, 2006 09:56 PM

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

CavySpirit September 25th, 2006 01:58 AM

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.

Chuck S September 25th, 2006 08:57 AM

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97