While I was trying to debug this function:
function resize_image($source_filename, $destination_filename, $height, $width, $keep_ratio = true) {
$opt["image_library"] = 'GD';
$opt["source_image"] = $source_filename;
$opt["new_image"] = $destination_filename;
$opt["maintain_ratio"] = $keep_ratio;
$opt["height"] = $height;
$opt["width"] = $width;
$this->CI->image_lib->clear();
$this->CI->image_lib->initialize($opt);
$this->CI->image_lib->resize();
}
I got the following error messages in the log:
ERROR - 2007-03-05 14:31:42 --> You must specify a source image in your preferences.
ERROR - 2007-03-05 14:31:42 --> Your server does not support the GD function required to process this type of image.
The first message is clearly bogus. The second is also bogus, since according to phpinfo(), GD is enabled on my server. It turned out that the problem was that the destination directories weren’t writable. So, I ended up with no indication of the nature of the problem.
