FS#47200 - [php-composer] fails to run (1.0.0.alpha11-1)
Attached to Project:
Arch Linux
Opened by Bosco Witch (boscowitch) - Friday, 27 November 2015, 11:05 GMT
Last edited by Pierre Schmitz (Pierre) - Tuesday, 29 December 2015, 12:08 GMT
Opened by Bosco Witch (boscowitch) - Friday, 27 November 2015, 11:05 GMT
Last edited by Pierre Schmitz (Pierre) - Tuesday, 29 December 2015, 12:08 GMT
|
Details
Description:
php-composer fails in newest version composer PHP Fatal error: Class 'Phar' not found in /usr/bin/composer on line 23 downgrading to 2 versions and it worked again Additional info: * package version(s): not working: php-composer-1.0.0.alpha11-1-any.pkg.tar.xz last working:php-composer-1.0.0.alpha10.465-1-any.pkg.tar.xz Steps to reproduce: update/install php-composer try to run composer command |
This task depends upon
But unfortunately there is more now:
PHP Warning: Phar::mapPhar(): open_basedir restriction in effect. File(/usr/bin/composer) is not within the allowed path(s): (/usr/bin/php:/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/) in /usr/bin/composer on line 23
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 /usr/bin/composer on line 24
PHP Fatal error: require(): Failed opening required 'phar://composer.phar/bin/composer' (include_path='.:/usr/share/pear') in /usr/bin/composer on line 24
seems like one also has to add "/usr/bin/composer" to the open_basedir (had this problem before with php executable ...)
guess it will become a longer notice ...
BTW: now it seems to run testet composer install with one production project
My solution was to copy /etc/php/php.ini to /etc/php/php-cli.ini, and empty the basedir variable.
This way php from command line will use /etc/php/php-cli.ini without restriction, but let me keep my /etc/php/php.ini with basedir for php-fpm or apache.
Is this a solution for you?
create a /etc/php/php.ini with the sane defauls and basedir restrictions, to used as default by apache or php-fpm
and create a /etc/php/php-cli.ini just for the cli tasks, like drush composer etc. this way the drush / composer packaged don't need to change,
because they will use /etc/php/php-cli.ini instead of the default.
How about setting open_basedir to make it work with composer by default?