phpcomposer-phpphar

Install it or recompile php without --disable-phar (on windows)


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


Solution

  • 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 =