PDA

View Full Version : Problem with SMF forum image posting


othersi
12-18-2006, 06:00 PM
I'm posting this with an assumption that it probably is a question that doesn't have an answer... but ya never know... I might get lucky.

I've got a new SMF forum installed on a ulmb host.

I've got a few bits of weird behaviour... but the one which is most pressing right now is with linked image resizing.

SMF has an admin setting to set the max height/width of images posted as linked images (as opposed to attachments). However, this feature fails on my forum... the image ends up posting full sized, even though it is over the set size limit.

Thinking this was a problem with the coding in my forum, I copied my forum over to another host server to test this theory... no coding was changed for my forum, other than the necessary directory references, to point to the correct, new host directories... everything was transferred intact, forum files, and database/tables.

Lo and behold, the image posting works as intended on the new host... images are resized as they are supposed to be.

A further bit of strangeness..... even on forums where the image resize works properly... any image actually hosted on my ulmb account does NOT resize.

So...

...on my ulmb-hosted forum, NO image automatically resizes, regardless of where the image is hosted.

On OTHER forums (non-ulmb forums), images automatically resize properly, BUT, any image hosted on my ulmb site does NOT resize.

(There are other problems that occur when hosted on ULMB but not on a different host, but let's see if we can figure this one out first)

Any ideas?

lomarb
12-18-2006, 11:32 PM
I am assuming this is because ULMB does not have imagemagik(or however its spelt) installed. It also does not have GD so theres no security image verification.

UnlimitedMB
12-19-2006, 01:49 PM
We do have GD installed.

With linked images the server has to download the image from the remote link which probably requires CURL.

I very much doubt that it is a free account you have on the other host you are testing, or its a "free cpanel" host which are pretty much scams that only last a few weeks.

othersi
12-19-2006, 04:06 PM
You're correct, the test server is not a free host, it is a paid hosting service that kindly offered me some temporary space, for free, to test this.

So, Eric, you're saying this is a limitation of the free hosting, this "CURL" feature is needed, and not available? I'm not complaining (it's free afterall! :) ), just clarifying.

lomarb
12-19-2006, 10:18 PM
We do have GD installed.

With linked images the server has to download the image from the remote link which probably requires CURL.

I very much doubt that it is a free account you have on the other host you are testing, or its a "free cpanel" host which are pretty much scams that only last a few weeks.

yea I found out when i was installing another script.

othersi
12-21-2006, 12:23 AM
I still don't fully understand this...

The linked images aren't actually being resized... they are merely *checked* for size, and if the dimensions are greater than the set maximums, then the img tags are automatically adjusted to set height and width attributes.

So, the images aren't downloaded by the server, they are just 'shrunk down' for the purpose of posting... the full sized image still exists as normal in the hosting location.

Basically what the forum script does it check the width and height of the linked image... if the width > max width, it knows to scale the width... it checks the height of the linked iamge... if the height > max height, it knows to scale the height (this might be the 2nd scaling)... then it automatically inserts the appropriate ("scaled") height and width tags into the img tag.

And more strange is that in other forums... not associated with ulmb at all... where the resize function works... if they try to link an image HOSTED on my ulmb account, the resize fails.

That makes no sense to me.

UnlimitedMB
12-21-2006, 12:46 AM
They would have to be downloaded.

Otherwise how is the php script on our server supposed to know the size of an image on some other server.

And the reason other forums cant size images hosted here is because of hotlink protection, which is completely unrelated.

othersi
12-22-2006, 04:52 PM
Hmm. OK... well, I'm a self confessed newb with this kind of stuff so I'll just accept that it can't work and move on. :p

Thanks for the responses.