Reputation: 2091
I am trying to install composer on windows (symfony 2 project). The problem is that I always get some strage errors - that a couple of files are not in the allowed path.
I've tried a couple of methods to install compsoer:
What's wrong?
Upvotes: 5
Views: 4043
Reputation: 1349
First, you should make sure that the path of php.exe
is in your ENV
(Environment variable);
Second, if composer's windows installer can't install, just try to use "Run With Administrator Permission", and if it also does not work, just comment me your error.
Upvotes: 1
Reputation: 52513
Adjust open_basedir
in your php.ini to include the path to your project and the other paths that composer tries to load from/write to. The variable accepts multiple paths separated by :
(unix) or ;
(windows).
open_basedir = "/home/sites/yoursites/:/tmp/:/"
... or remove the restriction completely from php.ini.
; remove open_basedir completely ...
; <nothing here>
; ... comment it out like this ...
; open_basedir = "..."
; ... or set it to an empty value like this ...
open_basedir =
You can find the location of the correct php.ini for the CLI sapi with:
php --ini
Upvotes: 9