JIT with External images
This is an open discussion with 7 replies, filed under Extensions.
Search
[edited] ops, duplicated post. sry =/
Hi by, you will need to set the other params, like:
http://klenby.net/image/2/220/180/2/1/static.klenby.net/media/works/komissariat-vit-obl/2010-03-05-stand-territorialniy-otdel/maket-stand-territorialnaya-oborona.jpg
as said in Notice log, in this case:
mode: 2, width: 220, height: 180, position: 2
this is just an exemple. use JIT mode that fits with your needs.
Ok. I use your example, but any way have error:
2010/11/10 20:27:15 > ERROR: 256 - Error loading image . Check it exists and is readable. in file /var/www/klenbynet/data/www/klenby.net/extensions/jit_image_manipulation/lib/image.php on line 220 2010/11/10 20:27:15 > NOTICE: Image class param dump - mode: 2, width: 220, height: 180, position: 2, background: 0, file: static.klenby.net/media/works/komissariat-vit-obl/2010-03-05-stand-territorialniy-otdel/maket-stand-territorialnaya-oborona.jpg, external: 1, raw input: 2/220/180/2/1/static.klenby.net/media/works/komissariat-vit-obl/2010-03-05-stand-territorialniy-otdel/maket-stand-territorialnaya-oborona.jpg
Why JIT get “Error loading image”?
class.image.php
52. $dest = @tempnam(@sys_get_temp_dir(), 'IMAGE');
@sysgettemp_dir() - return “/tmp”
but tempnam(…) return empty string. And $dest - empty.
Wrong options in my OS?
I see, my example dont make any diference. Did you check folder permissions in /tmp?
Try setting all of your folders and files to 755 on your install and make sure the owner is equal to the php user that the scripts run under.
Also, although this doesn’t seem to be the problem, has the domain containing the image got any htaccess rules blocking external loading of images?
Lets try these and go from there…
Problem with OS security:
WARNING: 2 - is_file(): open_basedir restriction in effect. File(/tmp/IMAGESkKF6c) is not within the allowed path(s): (...)
Solution: I change line 52 in class.image.php to
52. $dest = @tempnam(DOCROOT . '/manifest/tmp', 'IMAGE');
Create an account or sign in to comment.
I have an image on exterman domain (ex. http://static.klenby.net/media/works/komissariat-vit-obl/2010-03-05-stand-territorialniy-otdel/maket-stand-territorialnaya-oborona.jpg)
When I try it load directly in browser - it loading and visible. But when I try this image over JIT I get 404 error and ‘manifest/logs/main’:
Domain static.klenby.net* - in “Trusted Sites”
Other I try: 1) http://klenby.net/extensions/jitimagemanipulation/lib/image.php?param=1/static.klenby.net/media/works/komissariat-vit-obl/2010-03-05-stand-territorialniy-otdel/maket-stand-territorialnaya-oborona.jpg - 404 error 2) http://klenby.net/image/1/static.klenby.net/media/works/komissariat-vit-obl/2010-03-05-stand-territorialniy-otdel/maket-stand-territorialnaya-oborona.jpg - 404 error
In attachments headers from my browser.
What I do wrong?
P. S. Sorry for my English - I’m from Belarus.