symfony2 - Symfony, Liip Imagine bundle not working on server in prod environment -
symfony2 - Symfony, Liip Imagine bundle not working on server in prod environment -
i have project maintain uploaded images in src/my/bundle/resources/uploads/images/full , utilize twig filter imagine_filter
dynamically create thumbnails.
on local machine works flawlessly , on server, there under dev environment. when delete created thumbnails (leaving full directory), clear prod cache , load web page, images not created, url remains under media/cache, , logger gives me request.error
:
"no route found "get /uploads/images/avatar/354026c94b773b77ca945b4a6323e15c84102f6b.jpg"" @ /<path>/app/cache/prod/classes.php line 1964 {"exception":"[object] (symfony\\component\\httpkernel\\exception\\notfoundhttpexception: no route found \"get /uploads/images/avatar/354026c94b773b77ca945b4a6323e15c84102f6b.jpg\" @ /<path>/app/cache/prod/classes.php:1964, symfony\\component\\routing\\exception\\resourcenotfoundexception: @ /<path>/app/cache/prod/appprodurlmatcher.php:1816
some additional infos:
i have symlinked src/my/bundle/resources/uploads web/uploads my config (thumbnail_min
custom filter): liip_imagine: loaders: default: filesystem: data_root: %kernel.root_dir%/../web/uploads/images/full resolvers: default: web_path: web_root: %kernel.root_dir%/../web cache_prefix: /uploads/images cache: default filter_sets: avatar: quality: 90 filters: thumbnail_min: { size: 50, mode: inset } .... full: quality: 100
permissions @ to the lowest degree grouping rw (that's needed on server)
just experienced similar problem on local machine, still in dev environment.
for me, missing grouping writable permission on default media/cache folder, stayed empty after liip:imagine:cache:remove , page reload. images linking empty folder.
to fix, first made sure grouping set apache's _www (mac) / www-data (linux), e.g.
sudo chgrp -r www-data web/media/cachethen made sure folder set readable, writable , executable, e.g.
sudo chmod -r g+rwx web/media/cachehope helps...
symfony2 production-environment liipimaginebundle
Comments
Post a Comment