In symfony2, I'm using the liipImagineBundle to produce thumbnails on the fly. It used to work perfectly on my local server but I've been having trouble after hosting the site of a shared server. I've been experiencing the same problem as described here and here, that is, the source is http://my_domain.com/media/cache/resolve/my_thumb/uploads/images/entry/DSC_04121.jpg
instead of http://out-of-the-nest.com/media/cache/my_thumb/uploads/images/entry/DSC_04121.jpg
.
Thanks to those two questions, I know where the problem stems from but the solutions proposed are no help for me. I don't have accessing to the configuration files, or to php.ini. I've tried changing the permissions of the cache with filezilla but it doesn't change much. Also, as mentioned in the symfony2 documentation, I've tried using umask(0002);
and umask(0000);
in app.php and app_dev.php, to no avail.
I'm really not sure what to do here, can someone help me?
Edit
Turns out it might not be a permission issu after all. Symfony throws a NotLoadableException: Source image not found in "/home/outoftheoo/app/../web/uploads/images/entry/DSC_04121.jpg"
which is to be expected because the web folder doesn't exist, I renamed it www because that's what ovh expects. I did configure liip so that it would know (I think anyway) by putting a
web_path:
web_root: %kernel.root_dir%/../www
cache_prefix: media/cache
in config.yml but it doesn't seem to be enough
P.S: If it happens to be relevant, the shared hosting server in question is provided by OVH.
Edit 2
Found the problem. config.yml
was missing a:
loaders:
default:
filesystem:
data_root: %kernel.root_dir%/../www
The resolve you are seeing is normal for the first time liipimagine needs to create the thumbs url, so it is not an error in the image path(empty your web/media/cache directory on your local and refresh and you will see it there too). The fact that it is failing to create the thumbs is why you keep seeing the resolve.
What does the app_dev say when you use the resolve link? enable it for the remote host and check