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

后端 未结 18 1024
臣服心动
臣服心动 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:12

    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
    0 讨论(0)
  • 2020-11-27 13:14

    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.

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

    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.

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

    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.

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

    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

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

    After editting the "right" files (all php.ini's). i had still the issue. My solution was:

    1. Adding a System variable: OPENSSL_CONF

      the value of OPENSSL_CONF should be the openssl.cnf file of your current php version.

    for me it was:

    • C:\wamp\bin\php\php5.6.12\extras\ssl\openssl.cnf

    -> Restart WAMP -> should work now

    Source: http://php.net/manual/en/openssl.installation.php

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