I am unable to install any composer packages in VS 2022. Here is the error:
Unknown: open_basedir restriction in effect. File(C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar) is not within the allowed path(s): (C:\Users\john\source\repos\PHPConsoleProject1\PHPWebProject1) in Unknown on line 0
PHP Warning: Unknown: open_basedir restriction in effect. File(C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar) is not within the allowed path(s): (C:\Users\john\source\repos\PHPConsoleProject1\PHPWebProject1) in Unknown on line 0
Warning: Phar::mapPhar(): open_basedir restriction in effect. File(C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar) is not within the allowed path(s): (C:\Users\john\source\repos\PHPConsoleProject1\PHPWebProject1) in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 28
PHP Warning: Phar::mapPhar(): open_basedir restriction in effect. File(C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar) is not within the allowed path(s): (C:\Users\john\source\repos\PHPConsoleProject1\PHPWebProject1) in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 28
PHP Warning: require(): open_basedir restriction in effect. File(composer.phar) is not within the allowed path(s): (C:\Users\john\source\repos\PHPConsoleProject1\PHPWebProject1) in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 29
Warning: require(): open_basedir restriction in effect. File(composer.phar) is not within the allowed path(s): (C:\Users\john\source\repos\PHPConsoleProject1\PHPWebProject1) in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 29
Warning: require(phar://composer.phar/bin/composer): Failed to open stream: phar error: invalid url or non-existent phar "phar://composer.phar/bin/composer" in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 29
PHP Warning: require(phar://composer.phar/bin/composer): Failed to open stream: phar error: invalid url or non-existent phar "phar://composer.phar/bin/composer" in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 29
PHP Fatal error: Uncaught Error: Failed opening required 'phar://composer.phar/bin/composer' (include_path='.;C:\php\pear') in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar:29
Fatal error: Uncaught Error: Failed opening required 'phar://composer.phar/bin/composer' (include_path='.;C:\php\pear') in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar:29
Stack trace:
Stack trace:
#0 {main}
#0 {main}
thrown in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 29
thrown in C:\Users\john\AppData\Local\DEVSENSE\Composer\composer.phar on line 29
A search indicated that remming out the open_basedir line in php.ini would resolve the issue, but mine is already remmed out. Any suggestions would be greatly appreciated.
thanks,
John