Open In App

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

Improve
Improve
Like Article
Like
Save
Share
Report

To perform the secure HTTPS transfers you will need to enable the openssl extension then you have to install the composer. In this article, we will cover the enabling openssl for XAMPP as well as WAMP one by one then we will install the composer.

  • Enable openssl extension on XAMPP
  • Enable openssl extension on WAMP
  • Installation of Composer

Enable PHP’s openssl extension on XAMPP:

  • Step 1: Open XAMPP control panel and click on the Config button for the Apache module.
  • Step 2: Then from the given options, select PHP (php.ini) option. This will open the php.ini file in the default text editor (example: notepad).
  • Step 3: Now we have to search for extension=openssl line in that file.
  • Step 4: After you find it, see if there is any semicolon ‘;’ at the beginning of the line. If there is then that means it is disabled. So remove the semicolon to enable the extension.
  • Step 5: Save and Close the file. And there you have openssl extension enabled.

Enable PHP’s openssl extension on WAMP:

  • Step 1: Run the WAMP Server installed on the system.
  • Step 2: Now Left Click on the Green WAMP icon on the bottom right corner in windows and go in PHP option.
  • Step 3: Then go to the PHP extensions option and there you will find the openssl option. If there is a green tick mark at the beginning of it then it means it is enabled. If not then you can enable it by clicking it.
  • Step 4: Now restart all the services and you have enabled openssl extension.

Note: You can also enable openssl on WAMP by going in the php.ini file.

Install Composer: After following the above steps for enabling the openssl, you can follow the following steps to install Composer

  • Step 1: Download the Composer-Setup.exe file and run it.
  • Step 2: After running, you will see a popup box asking for the install mode. Here select Install for all users, which is also a recommended option, and hit Yes.
  • Step 3: In Installation Options window, we don’t want the Developer mode, so we will let it be unpicked and click on Next.
  • Step 4: Now, you will have to choose the PHP command-line. For XAMPP, the path will be C:\xampp\php\php.exe and for WAMP, the path will be C:\wamp64\bin\php\php7.3.12\php.exe and click Next. If you don’t find the path in the drop down then you will have to browse it. The version of PHP can be different for you.

    If don’t have installed Visual C++ Redistributable for Visual Studio then it will show you below error. So to proceed you have to install that first.

  • Step 5: Now in the Proxy Setting, leave every thing as it is and click on Next.
  • Step 6: Now, verify the settings and click on Install.
  • Step 7: Now you will see the following windows which means that the Composer is installed. Click on Next and hit Finish.
  • Step 8: Now, to check if composer installed properly, open cmd, and type composer and hit Enter. If you see the output as below then it is successfully installed. If not then you will have to restart your PC and try again.

Last Updated : 29 Jan, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads