I'm having trouble with setting up my Symfony2 production environment. The dev environment through app_dev.php works fine, but production through app.php leades to a 500 Internal Server Error, and this message in the Symfony error log:
[2011-08-28 10:09:11] request.CRITICAL: Symfony\Component\Config\Exception\FileLoaderLoadException: Cannot load resource ".". (uncaught exception) at /var/www/Symfony/vendor/symfony/src/Symfony/Component/Config/Loader/Loader.php line 75 [] []
Don't know how to solve this, or even stack trace it...
Happened to me when I updated the Liip/ImagineBundle
.
In older versions of this bundle it required this in your routing:
_imagine:
resource: .
type: imagine
In the new versions this is to be replaced by:
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"
So in my case the problem was I updated the bundle via composer, but did not update the routing.yml
.
I had the same problem. Try to add:
assetic: use_controller: true
in /app/config/config_prod.yml and clean cache after that (rm -fr /app/cache/*)
if you have these problems in production environment and you use assetic, then check if you don't have this:
_assetic:
resource: .
type: assetic
in your config file (normally this is in config_dev.yml only, not in production)... in other case try to check other routes with resource: .
I had faced a similar issue while hosting symfony2 project to a godaddy windows shared hosting with php5.3 support and fixed it by providing write permission to the symfony2 directories and creating an iis virtual directory for the symfony project directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With