I tried to run my Yii2 application on Localhost, XAMPP for PHP 5.6.32 and Windows 8 but I got this error:
How do I resolve this problem.
Thanks
The problem mostly occurs when you don't start the server/Xampp on local with administrative privilege. Try to start Xampp from the control panel if you are on windows.
Alternatively, you can use the option to disable the symlink by adding the assetManager
setting under the components
section in your config file (for yii-advance app it can be the common/config/main.php
or the config/web.php
in the yii-basic app)
'components'=>[
'assetManager' => [
'linkAssets' => false
],
]
UPDATE
There could be a possibility that you get the above error while running any of the commands on the terminal like while contributing into the yii2 repo you have to run the command php build/build dev/app basic <fork>
during which it creates a symlink and throws the above error, and after trying both of the above you still dont get it to work in that case you might have to use the default command prompt for the windows by starting it as an administrator and then run the above command.
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