PHP Classes

Generation error on first load

Recommend this page to a friend!

      Plottable Thumbnail Library  >  All threads  >  Generation error on first load  >  (Un) Subscribe thread alerts  
Subject:Generation error on first load
Summary:On the first load, data displayed
Author:Michael Hulet
Date:2005-02-17 13:38:44
Update:2005-10-02 08:05:58

  1. Generation error on first load   Reply   Report abuse  
Picture of Michael Hulet Michael Hulet - 2005-02-17 13:38:45

I'm using PThumb, wich is the only one I found not requering ImageMagick and using nice caching functions.

I got a problem, as first load of a thumbnail gives picture as data (hundreds of lines of characters). After reloading page, no problem: thumbnail generated.

I use default options and make the call as this:


// setup des options de génération des miniatures
class thumb extends PThumb
function thumb()
$this -> PThumb();
$this -> use_cache = true;
$this -> cache_dir = "cache/";
$this -> error_mode = 1;
$thumbnail = new thumb;

// thumbnail
$thumbnail_location = $thumbnail->fit_thumbnail('photo.jpg', 150, -1);
list($width, $height, $type, $attr) = getimagesize($thumbnail_location);
<img src="<?php echo $thumbnail_location ?>" alt="" />

Please can someone help me finding what's going wrong?

  2. Re: Generation error on first load   Reply   Report abuse  
Picture of Lawliet Lawliet - 2005-10-02 08:05:58 - In reply to message 1 from Michael Hulet
o_o I am really sorry for seeing this only now.

I believe the problem is due to some HTTP headers not being sent. If you still have this problem with the newer version, please email me.

For more information send a message to info at phpclasses dot org.