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条回答
仙女界的扛把子
2楼-- · 2020-01-26 03:40

If you're doing this on Windows without one of the WAMP stacks, here's how to get this going

  1. Download an installation of PHP for Windows. Generally you'll want a non-thread safe install. You can use 32-bit or 64-bit builds
  2. Extract the zip file somewhere. I would suggest C:\php. Composer's installer found it there without any additional prompting
  3. The latest versions of PHP for Windows do not come with a php.ini by default. Instead, you'll see two files, as noted below. Rename one to php.ini or copy it into php.ini.
    • php.ini-development
    • php.ini-production
  4. Open your php.ini file and remove the semicolon from this line (you might want to uncomment other things as well but this line is the only one necessary for Composer)

    ;extension=php_openssl.dll
    

That should be all you need to do. The Composer installer should do everything else you need from here.

查看更多
叼着烟拽天下
3楼-- · 2020-01-26 03:44

I am using WAMP server. Actually its files showed that openssl is opened. But manually I went to the folder and edited php.ini. Then I found it has not opened openssl.I uncommented it and it worked after after WAMP restart.

查看更多
\"骚年 ilove
4楼-- · 2020-01-26 03:45

If you still cannot solve your problem have a look at this. This might be the solution you are looking for

There are several php.ini files in C:\wamp\bin\php\php x-y-z folder. You may find production, development and some other php.ini files. No point of editing production and development files. Find the file which is exactly as same as the below image. (You can find it. Just type php.ini in your search bar and do a search). Open the file and remove ; from extension=php_openssl.dll. Save the file and close it. Restart all services in Wampp server. Re-install your composer.

That is it.

enter image description here

查看更多
女痞
5楼-- · 2020-01-26 03:47

I had the same problem and here the solution I found, on your php.ini you need to do some changes:

  1. extension_dir = "ext"
  2. extension = php_openssl.dll

Every one here talks active the openssl extension, but in windows you need to active the extension dir too.

查看更多
戒情不戒烟
6楼-- · 2020-01-26 03:47

There are two php.ini files, one for development and one for production. Leave those, there is another php.ini file for configuration settings just above them with a gear like icon edit that.

查看更多
三岁会撩人
7楼-- · 2020-01-26 03:47

I faced the same problem, but when i was lokking for php.ini and php.exe i found php.exe at C:\UwAmp\bin\php\php-5.4.15 when php.ini at C:\UwAmp\bin\apache. I just copy php.ini at C:\UwAmp\bin\php\php-5.4.15 and Uncomment the line extension=php_openssl.dll and it fixed.

查看更多
登录 后发表回答