phpsymfonyliipimaginebundle

Symfony2 LiipImagineBundle path cache probleme


I've setup a LiipImagineBundle configuration on a linux computer (xubuntu 14.10) :

routing.yml

_liip_imagine:
    resource: "@LiipImagineBundle/Resources/config/routing.xml"

config.yml

liip_imagine:
    resolvers:
       default:
          web_path: ~

    filter_sets:
        cache: ~
        dashboard_thumb:
            quality: 75
            filters:
                thumbnail: { size: [60, 60], mode: outbound }

and in my twig template :

<img src="{{ asset(company.logo.getPath) | imagine_filter('dashboard_thumb') }}">

All sources images are under web/uploads path This was working fine, image thumbnails are generated under web/media/cache/dashboard_thumb/uploads/

My source files are stored under an USB stick, and i lanch server with server:run commande (so under 127.0.0.1:8000)

But recently, i lanched the server under another computer (linux mint 17) and then, image cache are not generated anymore.

when i look at the generated html source, file path for images are :

http://127.0.0.1:8000/media/cache/resolve/dashboard_thumb/uploads/myimage.png

so i dont know why there is a 'resolve' in the path

Other thing, if i launch the command :

liip:imagine:cache:resolve uploads/myimage.png

the path and image web/media/cache/dashboard_thumb/uploads/myimage.png are well created

why this doesnt work automatically?

Thanks.


Solution

  • Seem a problem about Setting up Permissions. Basically the System operating users for the CLI(and deploy) and the web server must be on the same group.

    Check the doc for Symfony Application Configuration and Setup

    PS: the command you are looking for is chown but is only a workaround an i suggest you to fix to operating user layer.

    Hope this help