且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何启用PHP的openssl扩展来安装Composer?

更新时间:2022-10-30 16:35:28

WAMP和Composer可能使用不同的PHP安装。 Composer将使用 PATH 环境变量中的PHP集。



如果您要启用 openssl 扩展程序来安装 组合键,首先需要检查PHP安装。


  1. 打开命令提示符,输入: echo%PATH%检查PHP安装的位置。

  2. 转到该位置并编辑名为 php.ini 的文件。

  3. 通过删除开头的分号,取消注释 extension = php_openssl.dll

现在您可以安装Composer了。


I am trying to install Laravel in WAMP setup. I am getting a warning message for not enabling openssl which I had already done in WAMP.

Here is a screenshot of the message.

It is possible that WAMP and Composer are using different PHP installations. Composer will use the PHP set in the PATH environment variable.

If you want to enable the openssl extension to install Composer, first you need to check the location of the PHP installation.

  1. Open a Command Prompt, type: echo %PATH% then check for the location of your PHP installation.
  2. Go to that location and edit the file named: php.ini.
  3. Uncomment the line extension=php_openssl.dll by removing the semicolon at the beginning.

Now you are good to install Composer.