Search

I’m trying to resize some images and I’m running into some rather interesting problems… Basically, the image does not get processed.

My XSLT is:

<img src="{$root}/image/3/284/0/uploads/{file/filename}" width="284" height="{round(file/meta/@height * (284 div file/meta/@width))}" alt="{title}" />

Which results in the URL:

http://alanbetts.com/image/3/284/0/uploads/co2_data_mlo-1277751177.jpg

So far so good. Correct XSLT to correctly generated URL. So, I should see my image now, right? Nope. No errors were popping up so I checked the main log in the Manifest folder and look what I found:

2010/06/30 14:56:51 > WARNING: 2 - filemtime() [function.filemtime]: stat failed for /home/akbetts/alanbetts.com/workspace/3/284/0/uploads/co2_data_mlo-1277751177.jpg in file /home/akbetts/alanbetts.com/extensions/jit_image_manipulation/lib/image.php on line 127
2010/06/30 14:56:51 > NOTICE: Image class param dump - mode: 0, width: 0, height: 0, position: 0, background: 0, file: 3/284/0/uploads/co2_data_mlo-1277751177.jpg, external: 0, raw input: 3/284/0/uploads/co2_data_mlo-1277751177.jpg

I have the latest version of the JIT extension and I’m running Symphony 2.0.8RC3. A little later I might try replacing all the Symphony files to see if that has any effect (though I don’t expect it to) and I’m hoping you guys will have some better ideas because I’m way out of my depth.

I’ve had issues with filemtime() also, in another extension. The only way I got round it was to comment out any line that used it, it wasn’t completely necessary in the other extension, but I’m not sure about JIT…

Hope this helps?!

Tried it but doing so doesn’t seem to solve the problem and I get this in the log instead:

2010/06/30 18:35:58 > NOTICE: Session: Taking out the trash!
2010/06/30 15:35:58 > ERROR: 256 - Image /home/akbetts/alanbetts.com/workspace/3/284/0/uploads/co2_data_mlo-1277751177.jpg could not be found. in file /home/akbetts/alanbetts.com/extensions/jit_image_manipulation/lib/image.php on line 204
2010/06/30 15:35:58 > NOTICE: Image class param dump - mode: 0, width: 0, height: 0, position: 0, background: 0, file: 3/284/0/uploads/co2_data_mlo-1277751177.jpg, external: 0, raw input: 3/284/0/uploads/co2_data_mlo-1277751177.jpg
2010/06/30 15:35:58 > WARNING: 2 - readfile(/home/akbetts/alanbetts.com/workspace/3/284/0/uploads/co2_data_mlo-1277751177.jpg) [function.readfile]: failed to open stream: No such file or directory in file /home/akbetts/alanbetts.com/extensions/jit_image_manipulation/lib/image.php on line 209
2010/06/30 15:35:58 > NOTICE: Image class param dump - mode: 0, width: 0, height: 0, position: 0, background: 0, file: 3/284/0/uploads/co2_data_mlo-1277751177.jpg, external: 0, raw input: 3/284/0/uploads/co2_data_mlo-1277751177.jpg

Ugh… I figured it out. Basically? I wanted image/1... instead of image/3... for what I was doing. I was missing the position parameter from the URL I was generating and that’s what was throwing the error.

It’s always something simple… Though, this might be an argument for adding some better error handling for this extension so that if someone forgets a parameter in the future it simply says, “Missing [x] parameters” so I know where to start.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details