Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony2.7.1 fresh installation. Failed to load resource

Symfony2 developers:

Recently, I am planning to get familiar with Symfony2, using it as api project. Current version is v2.7.1.

I already have apache installed as my local environment. So the installation root directory is:

//localhost/symfony

So I followed official guide to install it. Everything looks fine after installation. But when I view the page in development environment (app_dev.php).

//localhost/symfony/web/app_dev.php

Page content display as expected, but not styled. Then I open console and find some 404 response as follows:

Failed to load resource

//localhost/symfony/web/bundles/framework/css/structure.css

//localhost/symfony/web/bundles/framework/css/body.css

//localhost/symfony/web/bundles/framework/css/exception.css

//localhost/symfony/web/app_dev.php

//localhost/symfony/web/bundles/framework/css/structure.css

//localhost/symfony/web/bundles/framework/css/body.css

//localhost/symfony/web/bundles/framework/css/exception.css

I looked into project/web/bundles directory, found nothing inside but two empty file.

framework and sensiodistribution.

Fresh installation without any config change. I got this problem. Could you guys give some explanation why it occurs. Otherwise I didn't get the full package?

Do I miss those files inside project/web/bundles?

If the case in which i missed those file. So could you send me an archive file on current version 2.7.1?

like image 929
Jack Zheng Avatar asked Mar 15 '23 11:03

Jack Zheng


1 Answers

You must run the command app/console assets:install to generate symlinks (or files) in /web/bundles

like image 81
mykiwi Avatar answered Mar 24 '23 19:03

mykiwi