I'm trying to create thumbnails with Avalanche-imagine bundle. I'm using OS X 10.7 Lion and MAMP PRO as Apache server.
When I call the filter in the twig file, I get a 500 error.
Here I put the path manually to check it:
<img src='{{'store/images/Pictures/P1000665.JPG' | apply_filter('my_thumb')}}'>
And I get this message: GET
http://taller:8888/web/app_dev.php/media/cache/my_thumb/store/images/Pictures/P1000665.JPG 500
(Internal Server Error)
line 35, it's strange because my thumbnails are used far behind
I installed the bundle following this instructions: https://github.com/avalanche123/AvalancheImagineBundle
I have to say that I had several problems installing it because composer.phar gave me an error message:
"Problem 1 - symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it. - symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it. - Installation request for symfony/icu 1.2.* -> satisfiable by symfony/icu[v1.2.0]."
I solved it adding this line in the composer.json requirements:
"symfony/icu": "1.0.*",
Once installed, I could install the AvalancheImageBundle with the composer.
Then I changed AppKernel as they said in the instruction with this line:
new Avalanche\Bundle\ImagineBundle\AvalancheImagineBundle(),
but I didn't change the autoload file, as I had to do when I installed FOSUserBundle. Do I have to add anything there?
I tried with this, but it didn't solved my problem:
$loader->add('imagine', __DIR__.'/../vendor/imagine/imagine/lib');
$loader->add('Avalanche123', __DIR__.'/../vendor'):
Additional info:
My proyect is in: Symfony2/proyecto/taller/here_are_web_app_vendor_and_src My apache server aim to: Symfony2/proyecto/taller using the sortcut taller instead of localhost my url is like this:
http://taller:8888/web/app_dev.php/
My pictures are in the url: Symfony2/proyecto/taller/web/store/images/Pictures/test.jpg witch url should I give to the filter? I think it is store/images/Pictures/test.jpg
The problem could be in the dependences of the bundle, because I put that line the composer.json?
Maybe should I write something in the autoload file? Any reference to vendor/imagine miss?
Also I tried to install liipImagine bundle, but I couldn't because it said that I had installed imagine 0.3.0 and I needed imagine 0.4.0. How can I uninstall imagine and install the new version to run liipimaginebudle?
As you can see, no references to imagine (I guess its integer in Avalanchebundle)
autoload: (no references to avalanche?)
Here is where my pictures are located and you can see how Avalanche created the media folder:
I don't know where is the problem, this is why I put so many information.
I solved the problem using LiipImagineBundle.
To install it first I deleted Avalanche reference in composer.json and everything else I wrote in appKernel.php, etc.
Then I did composer.phar update and it deleted also imagine/imagine 0.3.0 vendor library. Finally I installed LiipImagine via composer normally that installed a newer version of imagine/imagine, 0.4.0.