Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2007-12-12 15:25:30

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: lam_dynamic_image (on-the-fly article image resizing and display)

helsinkifrostbites

but this gives nothing:

When you say ‘nothing’ do you mean your expected image is missing — or the whole page is totally blank?


Steve

Offline

#17 2007-12-12 15:59:39

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Shows up as a broken image on the page. red x.

The url I posted is a direct link to the image.php, so that shows a blank page.

Offline

#18 2007-12-12 16:19:40

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Harri

over in this thread you said…

Now I’m trying to use your lam_dynamic_image instead, but that’s not working either, I get internal server error…

Please could you post your textpattern diagnostics (go to the admin > diagnostics tab to see them) for the site that’s giving that error.

Thank you.


Steve

Offline

#19 2007-12-12 16:54:10

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Ok, here we go:

Textpattern version: 4.0.5 (r2466)
Last Update: 2007-12-02 11:23:50/2007-12-02 11:19:14
Document root: /customers/culinaria.se/culinaria.se/httpd.www
$path_to_site: /customers/culinaria.se/culinaria.se/httpd.www
Textpattern path: /customers/culinaria.se/culinaria.se/httpd.www/textpattern
Permanent link mode: messy
Temporary directory path: /customers/culinaria.se/culinaria.se/httpd.www/textpattern/tmp
Site URL: www.culinaria.se
PHP version: 5.2.5
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server Local Time: 2007-12-12 17:52:31
MySQL: 5.0.32-Debian_7etch3-log
Locale: en_GB.UTF-8
Server: Apache
PHP Server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: Linux 2.6.18-5-vserver-amd64
Active plugins: chh_if_data-0.10, etz_striptags-0.2, rss_author_info-0.2m, sab_substr-0.1, smd_lib-0.3, smd_random_banner-0.3a, zem_contact_lang-4.0.3.6m, zem_contact_reborn-4.0.3.20, rss_google_map-0.5, lam_dynamic_image-0.1

Pre-flight check:
————————————
The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: disk_total_space, diskfreespace

Offline

#20 2007-12-12 17:12:45

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Harri

thank you for posting that. Further requests…

  1. at the time the site was giving the 500 Internal Server errors, was it setup as live, testing or debugging in the admin > preferences > basic tab?
  2. If it happened to be set to debugging, could you set it to testing and try again — please let me know if this cures your 500 internal server error problem .

Steve

Offline

#21 2007-12-12 17:42:47

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

No, it was set to testing all the time. There was no error message on the page, it only showed in my Activity window in Safari.
If I set to debugging, all hell breaks loose because of other plugins.

Offline

#22 2007-12-12 18:18:45

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

thats odd. i just tested it using that giant 24.jpg on my test server using 490 as width and it worked fine. my first guess would be a memory issue since resizing images via php takes a bit of horsepower (especially when you reach larger images). i’ll try to see what happens on my other hosts i can toy around with.

Last edited by iblastoff (2007-12-12 18:55:46)

Offline

#23 2007-12-12 18:35:51

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

just tried another test http://iblastoffmedia.com/articles/test-resize-again

and it worked fine. with same attributes using that 24.jpg and width of 490. hmm this doesn’t help you or me. i’ll keep digging.

Last edited by iblastoff (2007-12-12 18:52:24)

Offline

#24 2007-12-12 18:55:12

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

well i finally got it to not work and thats when i reset the memory_limit in php.ini to 8M (i typically use 32M as i remember some other php apps required higher than 8). if you have such control over your host try changing your memory_limit and see if that makes a difference. to see what you currently have alloted just use a simple phpinfo check to see what memory_limit is currently set to. not sure if this is the issue applicable to you but might as well start crossing things off the list.

i’ll see if i can add some sort of memory check in the plugin.

Last edited by iblastoff (2007-12-12 18:59:04)

Offline

#25 2007-12-12 19:28:05

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Thanks, I really appreciate your taking the time to look into this. I’ve been trying lots of different images and it does seem to be the really big ones that fail to appear. But the filesize is only 940 KB for the pic of the house, 546 KB for another…

I’ll look into the memory_limit tomorrow, it’s getting late and I’ve got kids to put to bed…

Thank you so much for the help!

Offline

#26 2007-12-12 20:07:53

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

It’s not file-size that matters, but the dimensions of the image that is being re-sized: take height x width x 4 bytes and that’s reasonably close to how much memory is needed.

Offline

#27 2007-12-12 21:07:22

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

ok, I suspected it might be something like that. According to that formula, resizing one of these images would take about 38 MB of memory… Looks like I’ll be doing some repetitive photoshopping in the near future…

Offline

#28 2007-12-12 21:21:55

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

helsinkifrostbites wrote:

ok, I suspected it might be something like that. According to that formula, resizing one of these images would take about 38 MB of memory… Looks like I’ll be doing some repetitive photoshopping in the near future…

that calculation seems a bit odd. your 24.jpg (which is i believe 2048px by 1536px) would take about 12M. are you really uploading images 3 times that size?

either way sorry if the plugin can’t help you out. as far as i can tell theres no way the plugin can get around your servers PHP/GD’s memory limitations. i can upload and resize images that size (2048px by 1536px) with no issues on my two different hosts so its up to your host to up your memory limit if they can.

if it helps any, you can just set up a simple batch resize script in photoshop that should whip through a directory of images and resize them automatically for you.

Last edited by iblastoff (2007-12-12 21:23:41)

Offline

#29 2007-12-12 21:36:06

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

yeah, the 24.jpg is that, but 21.jpg is 3872×2592px. Which is mad.

I am going to have a word with all the contributors at some point, but I’m expecting a fair deal of blank stares when I start talking about pixels and image manipulation software.

This is the problem you see, it’s a multi-user site with profile pages and blogs, and about 25 authors contributing material. And a lot of them are middle-aged farmers and that sort of thing. Just using email is a bit of a challenge.

I have no problems resizing images, I’m a graphic designer by trade after all, but this means I have to keep checking the site regularly for oversized images that the users keep popping in every now and then. I can see that becoming tedious rather quickly.

Offline

#30 2007-12-12 21:51:07

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

i completely understand what you mean. one reason i slapped this plugin together was to get around the same issue you’re having with ‘laymen’ not having any idea how to resize images (or are just too lazy to).

another was to get over the hurdle of textpatterns single “image” -> “thumbnail” relationship. on one site with product images (where one image would require a small thumbnail, a large version and then another medium sized thumbnail) i basically had to upload the image twice to get the two different thumbnails. the client had no idea why they had to do this :( now with this plugin i can just use different forms to output the same image in different dimensions and voila.

places like flickr have no issue resizing because they’re probably running on dedicated servers with tons of memory available. for the rest of us typically using shared hosted services we just have to live with their limitations :(

just for fun im gonna see how much php/gd can be pushed to pull off resizing 3872 × 2592 images

Last edited by iblastoff (2007-12-12 21:54:12)

Offline

Board footer

Powered by FluxBB