公司项目用的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 

不然项目运行会报错

GitHub 加速计划 / compose / compose
39
5
下载
compose - Docker Compose是一个用于定义和运行多容器Docker应用程序的工具,通过Compose文件格式简化应用部署过程。
最近提交(Master分支:4 个月前 )
8f644eea Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> 2 天前
56e92e34 Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> 3 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐