liip / LiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library
http://liip.ch
MIT License
1.66k stars 378 forks source link

Images and folder not generated #427

Closed AxelBriche closed 10 years ago

ama3ing commented 10 years ago

I am sure that it is problem with your config.

Also when submitting an issue please provide meaningful description, we are not supernatural here.

makasim commented 10 years ago

@Kynareth62 you could also look at closed issues. I am completely sure you can find the answer there

AxelBriche commented 10 years ago

Hello, on windows I have no worries, but once on my server (nginx), images are not generated.

The path of image is ok: site.com/media/cache/page_video/uploads/Images/Youtube/Thumbnail/ydGcJ_GJjjs/0.jpg

But the image and folder is not created.

My config is ok no ?

liip_imagine:

cache_mkdir_mode: 0777

cache_prefix: /cache/Images

filter_sets:
    cache: ~

    formNewMod_video:
        quality: 50
        filters:
            crop: { start: [0, 45], size: [480, 270] }
            thumbnail: { size: [252, 142], mode: outbound }

    slideshow:
        quality: 75

    pageMods_ModsRandom_Images:
        quality: 50
        filters:
            thumbnail: { size: [120, 74], mode: outbound }
    # ...

Thanks for your help :)

AxelBriche commented 10 years ago

@makasim, thanks, I look that.

makasim commented 10 years ago

@Kynareth62 you have to manually create a folder for the first time.

AxelBriche commented 10 years ago

I have created the folder and chmod 777, but this doesn't work for me.

ama3ing commented 10 years ago

@Kynareth62, doesn't work means nothing, I am sure if you will open an image in separate tab you will see explaining exception. Please be more concrete when you asking questions

AxelBriche commented 10 years ago

@me1ifaro, If I load this link at the end of my site url : ****.com/media/cache/page_video/uploads/Images/Youtube/Thumbnail/ydGcJ_GJjjs/0.jpg I have a 404 error.

Sorry, I am french and I have a bad english.

makasim commented 10 years ago

@Kynareth62 do you stack trace? Could you post it?

AxelBriche commented 10 years ago

I don't have, just that: http://i.imgur.com/vZJWZX6.jpg

And my app/dev.logs file is ok (0 error)

ama3ing commented 10 years ago

@Kynareth62 I use nginx, php-fpm and have no troubles. I can assume that you have configured your rewrite rules in incorrect way.

AxelBriche commented 10 years ago

Hello, I use this config for url rewrite : http://wiki.nginx.org/Symfony It's good for that please ?

ama3ing commented 10 years ago

@Kynareth62, try to use app_dev.php

AxelBriche commented 10 years ago

I already use app_dev.php, you can watch here (debug mod is activated, it's a version for test) : http://axel-dev.tk/StarCitizen/videos/

AxelBriche commented 10 years ago

If I apply a exho inside the filterAction() methode inside the ImagineController, The echo is not displayed, but if I place the echo before the class declaration, it's displayed, the filters is present inside my view, but filterAction() is not started, why please ?

ama3ing commented 10 years ago

@Kynareth62, in all of standard usecases(specially in dev environment) Symfony will handle all errors (including http errors) with Symfony Debug component. In your case you receive 404 thrown by nginx, which is very strange and the only reason I can assume is incorrect server configuration.

ama3ing commented 10 years ago

@Kynareth62, did you include imagine routes in routing.yml?

ama3ing commented 10 years ago
# app/config/routing.yml

_liip_imagine:
    resource: "@LiipImagineBundle/Resources/config/routing.xml"
AxelBriche commented 10 years ago

Yes I have. I have follow the bundle documentation.

AxelBriche commented 10 years ago

The image path is: http://axel-dev.tk/media/cache/page_video/uploads/Images/Youtube/Thumbnail/ydGcJ_GJjjs/0.jpg

But if I load: http://axel-dev.tk/media/cache/page_video/uploads/Images/Youtube/Thumbnail/ydGcJ_GJjjs/

I have this error: The file "/var/www/clients/client5/web20/web/app/../web/uploads/Images/Youtube/Thumbnail/ydGcJ_GJjjs/" does not exist

The error it's for the original Image, does it behave correctly ?

ama3ing commented 10 years ago

@Kynareth62, I just tried to execute command in console on your server:

liip:imagine:cache:resolve uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg

this worked fine, and image appeared on the page, so the problem is, as I said, with your server configuration.

AxelBriche commented 10 years ago

Your command work, the folders and path are generated, but it's the same image inside all folders.

http://axel-dev.tk/media/cache/page_video/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg this image is duplicated inside all folders but with various size : http://i.imgur.com/IRrcMT7.jpg

AxelBriche commented 10 years ago

Exemple, images generated:

http://axel-dev.tk/media/cache/cache/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/formNewMod_video/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/slideshow/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageMods_ModsRandom_Images/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/slideshow_jcrop/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageMods_ModPromoted_Video/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageMods_ModPromoted_Image/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/miniatures_video_accueil/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageImages_ImagesRecentes/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageImages_ImagesRecentes_large/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageMod_ModsRecents_Images/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageMod_ModsRecents_Videos/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageMod_ModPopular_Videos/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/pageMod_ongletVideos_Videos/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/slider_page_mod/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/vue_mod_miniatures_images/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/page_images_defilantes/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/page_images_recentes/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/page_video/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/page_video_mod/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg http://axel-dev.tk/media/cache/galerie_images/uploads/Images/Youtube/Thumbnail/F9g_sG1re3Y/0.jpg

It's all time the same image but with different filters oO

ama3ing commented 10 years ago

@Kynareth62, yes, it is the same image for all of the filters. Can you please stop spamming here, because I am sure that your problem is not related to the bundle.

AxelBriche commented 10 years ago

Ok thanks, but the problem is the url rewrite or it is possible that it is something else please ?

ama3ing commented 10 years ago

No problem. Try to debug step by step... From app(_dev).php to ImagineController, your problem is somewhere there.

AxelBriche commented 10 years ago

I have found a solution, thanks for your help, the solution is present here: https://github.com/liip/LiipImagineBundle/issues/249#issuecomment-25608328

saliih commented 9 years ago

you must activate this extension in php.in 'php_fileinfo.dll'

thanh-vothien commented 9 years ago

Good answer, saiih. Tks