安装它或重新编译 php 而不使用 --disable-phar(在 windows 上)

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

我正在尝试在我的计算机上安装 composer windows10、php 7.3.2,我收到命令行安装和 windows 安装程序的错误消息:

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

我在 php 文件中启用了 Phar,如下所示,但问题仍然存在:

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

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

phar.cache_list =

当我 运行 php -m 我没有看到扩展被激活

如果 php.ini 文件如下所示并且使用命令 PHP -m 没有显示 Phar,那么您必须重新安装/重新配置 PHP 作为Phar extension is bundled. After that , running again the php -m command to see if is enabled. Then follow the composer 安装指南。

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