Do you have UAC turned on in Windows? If so try open command prompt as administrator and try again.
[ErrorException] file_get_contents(C:\xampp\php): failed to open stream: Permission denied
Hi everyone, I am here to get some help. I am new to Laravel. I want to learn Laravel. I am using window 10. I have installed the Composer on my system. Now I am trying to install Laravel using the below command composer global require "laravel/installer"
But when I try to run this command in cmd I got this error every time.
[ErrorException] file_get_contents(C:\xampp\php): failed to open stream: Permission denied
It's denied some permissions. I changed the system permissions to everyone. But It never solved my problem. I am not sure why this error appears. I search around the internet and different forums. But I did not find any suitable solution. I tried my ways to solve this problem (As other people suggest me to do). But I am still stuck with this error. I know it may be a very basic error. But I am new and I don't know what to do and how to solve this problem. Here is the screenshot added for your reference.
It looks like this error can be caused by having a Composer environment variable set.
If you run echo %COMPOSER% does it print anything. if so can you try set COMPOSER= and rerun
composer create-project laravel/laravel laravelproject "5.4.*"
If this works you will need to remove the environment variable permanently as the above is only for the current command prompt session
Composer Github Issue - https://github.com/composer/composer/issues/1720
Please or to participate in this conversation.