Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

symfony assetic gives 500 error when requesting files

EDITED: I am using assetic with symfony2. Each time I try to load a page, on requesting for the JS and CSS files, my browser gets a 500 error. If I type the address of that resource in address bar, I can load its file successfully! Even weirder, the CPU load increases like 30% whenever Symfony boots up!

I tried assets:install and assetic:dump --no-debug, guess what, none of the symfony pages load anymore. They all end in 500 error.

I don't think it is caused by apache. I can load any other static of PHP pages, and I also tried nginx and got a 500 error. I have to cache:clear in order to get them back.

Any idea? I have already updated and reinstalled my web server, CGI, PHP and used a fresh copy of symfony and copied the sources, none of them helped.

dump: This is how I used Assetic with JS. There is a similar block for css:

{% javascripts
            '@SharifCalendarBundle/Resources/public/js/kendoui/jquery.min.js'
            '@SharifCalendarBundle/Resources/public/js/JQueryUi/jquery-ui-1.10.3.custom.min.js'
            '@SharifCalendarBundle/Resources/public/js/noty/jquery.noty.js'
            '@SharifCalendarBundle/Resources/public/js/noty/layouts/top.js'
            '@SharifCalendarBundle/Resources/public/js/noty/layouts/topLeft.js'
            '@SharifCalendarBundle/Resources/public/js/noty/layouts/topRight.js'
            '@SharifCalendarBundle/Resources/public/js/noty/themes/default.js'
            '@SharifCalendarBundle/Resources/public/js/kendoui/kendo.web.min.js'
        %}
    <script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
like image 294
Untitled Avatar asked Oct 21 '22 05:10

Untitled


1 Answers

In order to have a better understanding of what is going in, perhaps you could execute the commands related to assets in verbose mode (from your project root directory when using a standard Symfony2 edition) ?

php app/console assets:install --symlink -v 
php app/console assetic:dump -v
like image 51
Thierry Marianne Avatar answered Oct 29 '22 14:10

Thierry Marianne