How to enable PHP's openssl extension to insta

2020-01-26 03:29发布

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.

enter image description here

18条回答
Anthone
2楼-- · 2020-01-26 03:48

Wamp works with another php.ini that is in C:\wamp\bin\apache\Apache2.4.4\bin\php.ini. So you need to manualy find the correct file, that is in C:\wamp\bin\php\php5.4.12\php.ini. Uncomment the extension=php_openssl.dll line and just try to install Composer again.

查看更多
放荡不羁爱自由
3楼-- · 2020-01-26 03:49

You need to enable "extension=php_openssl.dll" in both files (php and apache). my pc files path are these :

  1. C:\wamp\bin\php\php5.3.13\php.ini
  2. C:\wamp\bin\apache\apache2.2.22\bin\php.ini
查看更多
够拽才男人
4楼-- · 2020-01-26 03:51

I solved my problem a different way. The problem is that wamp's GUI was misleading: it claimed that I had php_openssl enabled.. and if I clicked on php.ini on the same GUI.. it actually showed that extension=php_openssl.dll was uncommented..

I'm not sure if i'm using the same installer version of composer of the OP, but it actually asks you at the beginning to specify the php.exe that you like to apply composer on (which basically ensures that no one tries to apply composer to the wrong php executable as what happened with the OP)..

The way I solved this was by going myself into the installation of php within the wamp package: C:\wamp\bin\php\php5.4.12 and looking php.in there.. when I opened it I was shocked that the line extension=php_openssl.dll was actually commented! I uncommented it and it worked just fine.

enter image description here

查看更多
小情绪 Triste *
5楼-- · 2020-01-26 03:54

If you are using xampp .Go back to where you choose which command-line php you want to use at the beginning of your installation and select the path where your xampp folder is included.After that if your installer says youve got duplicate 'extension=php_openssl.dll' comment one ssl file in your php ini with a ';'and your installation should run smoothly.

查看更多
我命由我不由天
6楼-- · 2020-01-26 03:55

For those who're having the same problem as I was. After doing all the solutions above, still didn't work for me. I found out that, uWamp was creating the PHP.INI file in bin/apache directory. So I had to copy the PHP.INI file into php installation directory, that is, bin/php/phpXXXX directory. This should also be where the php.exe is that you selected from the composer setup.

Hope this helps.

查看更多
别忘想泡老子
7楼-- · 2020-01-26 03:57

If you compiled from source, then adding extension=php_openssl.dll to the php.ini file may not work.

To troubleshoot this, open a command prompt and type php -i. Scroll up to the first line, it will tell you the most recent error regarding your php.ini file.

To solve the issue, find the php_openssl.dll file, for me it was in the very same directory of the compilation output: C:\php-sdk\bin\phpdev\vc14\x64\php-7.0.13-src\x64\Release_TS So just add the directory where the extension is, to the php.ini:

extension_dir = "C:\php-sdk\bin\phpdev\vc14\x64\php-7.0.13-src\x64\Release_TS"

Hopefully the error will be gone

查看更多
登录 后发表回答