Ask Your Question
1

What is the solution for resolving the error "The openssl extension is necessary for SSL/TLS protection but is not present" in Composer on the Windows operating system?

asked 2023-05-21 11:13:44 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2023-05-21 11:16:02 +0000

ladyg gravatar image

The solution for resolving the error "The openssl extension is necessary for SSL/TLS protection but is not present" in Composer on the Windows operating system is as follows:

  1. Check if the OpenSSL extension is already enabled in PHP. To do this, open the php.ini file in your PHP installation directory and search for the following line:

extension=php_openssl.dll

If the line is commented out (with a semicolon (;) at the beginning), remove the semicolon to enable the extension. If the line is missing, add it.

  1. Restart your web server (Apache or Nginx) and try running Composer again.

  2. If the above steps do not work, you may need to download and enable the OpenSSL extension manually. To do this, follow these steps:

a. Download the OpenSSL DLL files from the official website: https://slproweb.com/products/Win32Open…

b. Choose the appropriate version that matches your PHP installation (32-bit or 64-bit).

c. Extract the downloaded files to a suitable location on your computer (such as C:\OpenSSL).

d. Add the following lines to your PHP.ini file:

extensiondir = "path/to/your/php/ext" extension=phpopenssl.dll

Make sure to replace "path/to/your/php" with the actual path to your PHP installation directory.

e. Restart your web server and try running Composer again.

If the above steps still do not work, you may need to reinstall PHP or consult a professional for further assistance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-21 11:13:44 +0000

Seen: 10 times

Last updated: May 21 '23