Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Composer OpenSSL Issue

I am trying to install composer however when I go to install it I get this error:

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

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

I currently have php 5.4.31 and I am running WAMP2.2 I've checked my php.ini file in the bin/php/php5.4.31/ and ensured that the following line is uncommented:

extension=php_openssl.dll

The error still resolves and I'm at a loss as to how I can fix it. As I thought by uncommenting the line it would be enabled.

Also when I run this command in the terminal window php --ini I get the following message:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\php_openssl.dll' - The specified module could not be found

like image 293
Javacadabra Avatar asked Aug 11 '14 10:08

Javacadabra


People also ask

How do you solve a Composer error?

Make sure you have no problems with your setup by running the installer's checks via curl -sS https://getcomposer.org/installer | php -- --check . Try clearing Composer's cache by running composer clear-cache . Ensure you're installing vendors straight from your composer.

How do I manually install Composer?

Step 1: Navigate to the official composer website. Step 2: Then click on the Download button. Step 3: Then click on the Composer-Setup.exe & download the file. Step 4: Then click on “Install for all users”.


2 Answers

If you are a windows user, make sure to uncomment this line in your php.ini file:

 extension_dir = "ext"

It makes sure that PHP is taking the extension from its own ext library.

like image 59
DaveM Avatar answered Sep 20 '22 20:09

DaveM


@Javacadabra, extensions like php_openssl.dll will be under php/ext/ directory, you could fix this path in the config file or you could copy that specific file from php/ext directory to php directory.

in your case it will be c:\php\ext

like image 29
Arjun Vs Avatar answered Sep 21 '22 20:09

Arjun Vs