Home » , , » Solved - Composer Class 'Phar' not found

Solved - Composer Class 'Phar' not found

Posted by E-Learning on Sunday, December 13, 2015

I running composer on terminal, and i get error this :

PHP Fatal error: Class 'Phar' not found in /usr/bin/composer on line 23


i try to add extension=phar.so in php.ini (located /etc/php/php.ini).
you can modification file, uncomment ;extension=phar.so to extension=phar.so.

i get error again

PHP Warning: Phar::mapPhar(): open_basedir restriction in effect. File(/usr/bin/composer) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/:/usr/share/nginx/html) 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



i open php.ini, than add source of composer file. my composer in /etc/bin.
find open_basedir = /srv/http/:/home/:/tmp/: ... on file php.ini, than add source of file composer.

my configuration :

open_basedir = /srv/http/:/home/:/tmp/:/usr/bin


success,
Composer


Hosting Unlimited Indonesia

0 comments:

Donate Bitcoin :
19QsXRcfUEKW9AVbGkJFB6WJPvn6uRboNr