How to enable PHP's openssl extension to install Composer?

后端 未结 18 1018
臣服心动
臣服心动 2020-11-27 12: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 sc

相关标签:
18条回答
  • 2020-11-27 13:20

    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

    0 讨论(0)
  • 2020-11-27 13:22

    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

    0 讨论(0)
  • 2020-11-27 13:27

    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.

    0 讨论(0)
  • 2020-11-27 13:27

    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.

    0 讨论(0)
  • 2020-11-27 13:31

    This is an old question but I just had the same issue (with PHP7) and the solution was, in the end, pretty simple. Uncommenting the line in php.ini as per the other answers wasn't quite enough though. I needed to change it from:

    ;extension=php_openssl.dll
    

    to:

    extension=ext/php_openssl.dll
    

    Note the ext prefix. The dll already existed but was in a subfolder. After changing the config the composer installer was happy.

    0 讨论(0)
  • 2020-11-27 13:31

    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.

    0 讨论(0)
提交回复
热议问题