While installing Composer for PHP, I get the following message:

The openssl extension is missing, which means that secure HTTPS transfers are impossible. If possible you should enable it or recompile php with --with-openssl

How to fix this problem?

  • You can fix this by recompiling php with the --with-opensll option. – Hennes Dec 7 '15 at 8:40
  • As to what it is. OpenSSL is the part responsive for TLS (think httpS). It is commonly used for secure communications. Originally thi sused something called SSL but those cypers have long since been cracked and these days we use TLS, but the name of the library is unchanged. – Hennes Dec 7 '15 at 8:42
  • will try then i will tell you the result ! – user3660160 Dec 7 '15 at 8:44
  • didn't worked for me ! – user3660160 Dec 7 '15 at 10:15

@RiggsFolly has the right idea.

Additionally I had to:

  1. Copy php.ini-development to php.ini
  2. Uncomment the extension=php_openssl.dll line as described
  3. Uncomment this line: extension_dir = "ext"
  4. Make sure you find php_openssl.dll within that extension directory of course
  • 1
    I was missing Step 1. Thank you for pointing out something so obvious and simple – dmeehan May 24 '17 at 17:06

All you need to do is activate the openssl extension in your php.ini by removing the ; comment from the line




Warning, there are usually 2 php.ini files, one in the apache\bin folder and one in the \php folder, edit the one in the \php\php.ini folder as this is the one that controls PHP CLI.

  • THE SAME ERROR !! :( – user3660160 Dec 8 '15 at 11:28
  • Are you sure you edited the correct php.ini? There are ususlly 2 you need the one in the php folder and not the one in the apache folder – RiggsFolly Dec 8 '15 at 11:43

If you've installed directly from php.net's executable files for windows, the installation has no active php.ini file! You can confirm this using php -ini command in your console, it says C:\Windows which actually has no ini file.

You should first rename one of php.ini-development or php.ini-production to php.ini and then uncomment the extension. (i.e. removeing semicolon before the extension=php_openssl.dll in that file.)


I tried setting the environment variable, without luck.. I did however try installing the Windows Binary from https://slproweb.com/products/Win32OpenSSL.html and it started working immediately (using Xampp, if that makes a difference..)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.