0

I'm trying to install composer on my computer windows10, php 7.3.2, i have this message error for Command-line installation and windows installer :

The phar extension is missing.
Install it or recompile php without --disable-phar

I enabled Phar in my php file as below but the problem stay:

[Phar]
;http://php.net/phar.readonly
phar.readonly = On

;http://php.net/phar.require-hash
phar.require_hash = On

phar.cache_list =

when i running php -m i don't see that the extension is activated

Ermenegildo
  • 1,286
  • 1
  • 12
  • 19
iss yaz
  • 21
  • 1
  • 8
  • FYI https://stackoverflow.com/questions/22047487/how-do-i-install-enable-the-php-phar-extension – marekful Mar 30 '21 at 09:48
  • 1
    Does this answer your question? [How do I install / enable the PHP phar extension?](https://stackoverflow.com/questions/22047487/how-do-i-install-enable-the-php-phar-extension) – marekful Mar 30 '21 at 09:49

1 Answers1

1

If the php.ini files looks like below and with the command PHP -m doesn't show Phar, then you must re-install/ re-configure PHP as the Phar extension is bundled. After that , running again the php -m command to see if is enabled. Then follow the composer installation guide.

[Phar]
; http://php.net/phar.readonly
;phar.readonly = On
; http://php.net/phar.require-hash
;phar.require_hash = On   
;phar.cache_list =
mixaslfc
  • 49
  • 6