Đức Trần
Đức Trần

Reputation: 89

Symfony 2- it looks like your system doesn't support relative symbolic links

I'm new in symfony 2. I just started install symfony 2.7 on windows 7. I downloaded Composer and run as in http://symfony.com/doc/current/book/installation.html

But when I run command,

$ composer create-project symfony/framework-standard-edition my_project_name

and set all parametters like database_host, database_name,.... as default and hit enter some error happened:

    Trying to install assets as symbolic links.
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
It looks like your system doesn't support relative symbolic links, so the assets
 were installed by using absolute symbolic links.
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodi
stribution
It looks like your system doesn't support relative symbolic links, so the assets
 were installed by using absolute symbolic links.

My Symfony is still running but there are many errors. there are many file is missing in my 'my_project_name\src\AppBundle' folder than folder in tutorial. And many error 'No route found for "GET /" 'when run '127.0.0.1:8000/app_dev.php/'; in browser Can anyone help me fix this My php version is 5.5.12

Upvotes: 1

Views: 7239

Answers (2)

Michael Sivolobov
Michael Sivolobov

Reputation: 13265

You need to run composer as administrator (of Windows). Then it will create symbolic links.

Also you can change method for default assets management after any composer update or composer install by changing in composer.json next line:

"symfony-assets-install": "relative",

to this:

"symfony-assets-install": "symlink",

or this:

"symfony-assets-install": "hard-copy",

Upvotes: 9

Krishna Ghodke
Krishna Ghodke

Reputation: 589

If you're using an OS which supports symlinks (linux, OS X, and I guess all OS but Windows), you can install the assets calling (I don't exactly remember the call, the important thing here is the symlink option):

php app/console assets:install web --symlink

This way, instead of having a copy of each bundle's resources, you'll have a symlink, so there should be no need to update. If you have an OS which doesn't support symlinks, I think you'll have to keep updating or reinstalling assets (in fact, I always used assets:install, I didn't knew there was an update option :P).

Upvotes: -1

Related Questions