Run the following error occurs composer
-
Run the following error occurs composer
fatal error: class 'phar' not found in c:\laragon\bin\composer\composer.phar on line 23
where is the problem from???
-
re-download the composer.phar Composer and replace the file.
-
@sajjadkazemi10 : What is your PHP's version? What steps did you do?
-
@leokhoa php 7.1.5
-
@kaxias Failed. Again the same error
-
@sajjadkazemi10 : You did not answer me
what steps did you do?
- I believe you installed other PHP on your PC.By default phar is enabled on Laragon. To make sure - open Terminal and type:
php -i | grep phar
what's your result?
Here are mine:
If you use browser:
http://localhost/?q=info
-
@leokhoa
My Php version is 7.1.5
But you got the recipe Php-version of version 5 was shown
Command php -i | grep phar do not show
-
@sajjadkazemi10 : As I said
I believe you installed other PHP on your PC
- Therefore, you must delete your PHP 5 version from Path.
To find out where it is installed, typephp --ini
-
@leokhoa thank you
-
@leokhoa Composer command or by entering the following message shows phpartisan

-
@sajjadkazemi10 : There is nothing wrong with composer. You installed Imagick wrongly and it corrupted your PHP.
Re-install PHP (tutorial: https://forum.laragon.org/topic/166/tutorial-how-to-add-another-php-version) - and check my tutorial about how to install Imagick here:
https://forum.laragon.org/topic/339/tutorial-how-to-install-imagick
-
@leokhoa THANK YOU