当我运行
/usr/local/bin/php54-cli -d memory_limit=-1 -d disable_functions="" -d open_basedir="" composer.phar install
I get error:
Fatal error: require_once(): Failed opening required '/home/katalogas/domains/ekatalogas.eu/public_html/admin/app/bootstrap.php.cache' (include_path='.:/usr/share/pear') in /home/katalogas/domains/ekatalogas.eu/public_html/admin/app/console on line 10
Script Sensio'Bundle'DistributionBundle'Composer'ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
很奇怪,因为file:
/home/katalogas/domains/ekatalogas.eu/public_html/admin/app/bootstrap.php.cache
存在我也试着运行:
/usr/local/bin/php54-cli -d memory_limit=-1 -d disable_functions="" composer.phar install
得到:
[ErrorException]
is_file(): open_basedir restriction in effect. File(/usr/local/bin/php54) is not within the allowed path(s): (/home/katalogas/:/tmp:/usr/share/pear54)
我的:open_basedir
配置有什么问题?
我知道这有点晚了,我希望这能帮助到有类似问题的人,谷歌把他们带到这里。
我在arch Linux bug跟踪器上发现了这个bug报告,当时我正在研究几乎相同的问题,这个解决方案对我很有效。
复制/etc/php/php.ini到/etc/php/php-cli.ini
编辑/etc/php/php-cli.ini删除open_basedir中的所有目录,不加注释
使用CLI PHP的程序将使用PHP - CLI .ini, web服务器将使用PHP .ini。请注意,此解决方案是在开发系统上使用的,因此我不确定其安全性含义。