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 %}
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
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