Installing Composer OpenSSL Issue

16,189

Solution 1

@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

Solution 2

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.

Share:
16,189
Javacadabra
Author by

Javacadabra

Updated on July 02, 2022

Comments

  • Javacadabra
    Javacadabra almost 2 years

    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

  • Javacadabra
    Javacadabra almost 10 years
    I will accept this answer, composer installed but for some reason it's commands are not being recognized on the command line, im guessing this is also a path issue.
  • jww
    jww almost 10 years
  • elb98rm
    elb98rm about 6 years
    This is a great gotcha for windows users.