BT宝塔环境下composer问题
公司项目用的BT搭建的集成环境:但是新项目composer安装包出现了问题
Warning: Unknown: open_basedir restriction in effect. File(C:\ProgramData\ComposerSetup\bin\composer.phar) is not within the allowed path(s): (D:\wwwroot) in Unknown on line 0
Warning: Phar::mapPhar(): open_basedir restriction in effect. File(C:\ProgramData\ComposerSetup\bin\composer.phar) is not within the allowed path(s): (D:\wwwroot) in C:\ProgramData\ComposerSetup\bin\composer.phar on line 28
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:\ProgramData\ComposerSetup\bin\composer.phar on line 29
Fatal error: require(): Failed opening required 'phar://composer.phar/bin/composer' (include_path='.;C:\php\pear') in C:\ProgramData\ComposerSetup\bin\composer.phar on line 29
通过查询发现:
去掉 open_basedir =D:\wwwroot 改成open_basedir =
切记用powershell进入项目目录下执行,宝塔站点下的composer执行一直报错
切记composer 运行成功后一定记得改回来D:\wwwroot
不然项目运行会报错
更多推荐
所有评论(0)