• Register
0 votes

Problem :

I am trying to install Composer but I am getting following 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 have also went into my php.ini-production and uncommented following code: "extension=php_openssl.dll"

But still it is not working for me, Am I missing something?

6 5 3
7,540 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

I had also faced the same issue in the past, please follow below approach to resolve your issue:

I doubt the "php.ini-production" is the dummy configuration file suitable for live environments. I will suggest you to do a php -i at the console and also try to find the 'php.ini' path, to understand where it is expecting the ini file to be kept. It may be the case that normally it is expecting "php.ini", and it may not actually exist. If that is the case then, copy the php.ini-development (or equivalent) to the location required.

This is very near the top of actually a very long output, so you may find it redirecting it to a file helpful (php -i > C:\phpinfo.txt).

9 7 4
38,600 points
0 votes


I conceived "php.ini-production" is a dummy configuration file suitable for live environments. Do a php -i at the console and trace the 'php.ini' path, to view where it is expecting the ini file to be kept. This is generally expecting "php.ini", and may not really exist - in case it does not, copy php.ini-development (or same) to the location requisite.

This is near the top of (a very long) output, hence you may trace redirecting it to a file useful

php -i > C:\phpinfo.txt).

You will further require to uncomment the extension dir. For example, trace this line in your php.ini file:

;extension_dir = "ext"

Remove the semi-colon in front and save the file. I am certain this will perform.

Remember to open your php.ini Administrator mode

After altering anything in php.ini you have to restart your server, ensure that you did so first of all.

in WAMPserver edit this files:



D:\wamp\bin\php\php5.4.12\php.ini (based on version)

Do not employ the php.ini in the WAMP server menu. It will not perform. Go to the origin of your wamp and as definited above with D as root.

Create a php.ini (for example from php.ini-production), open it in an editor as admin (!), remove the commenting semicolon ; in front of extension=php_openssl.dll, set the extension_dir accurately, and save the file. After that it must be performing. However once again: open and edit the php.ini as admin.

In case you are employing MAMP on Windows, you require to alter the extension for php.ini-development to php.ini . After that, paste this line ;extension_dir = "ext" into the php.ini file, prior the first extension appear, and uncomment this other line ;extension=php_openssl.dll removing the prefixed semicolon. Remember to restart apache

The similar error happened to me. I solved it by turning off TLS for Composer, it's not safe however I considered the risk on my develop machine.

Attempt this:

composer config -g -- disable-tls true

and re-run your Composer. It performs to me.

However it's not secure and not recommended for your Server. The official website says:

In case set to true all HTTPS URLs will be attempted with HTTP instead and no network-level encryption is worked. Enabling this is a security risk and is NOT recommended. The better method is to enable the php_openssl extension in php.ini.

In case you don't want to enable unsecure layer in your machine/server, so setup your php to enable openssl and it also performed. Ensure that the PHP Openssl extension has been installed and enable it on php.ini file.

To enable OpenSSL, add or trace and uncomment this line on your php.ini file:





And reload your php-fpm / web-server in case reqired

For the composer reference there are two relevant options: disable-tls and secure-http.

nano ~/.composer/config.json ...
    "config": {
        "disable-tls": true,
        "secure-http": false

Thereafter it complains much:

You are running Composer with SSL/TLS protection disabled.
Warning: Accessing getcomposer.org over http which is an insecure protocol.

 However, it works the composer selfupdate (or whatever).

while one cannot easily "enable SSL in the php.ini" on Linux; PHP requires to be compiled with openSSL configured as shared library - in order to be able to access it from the PHP CLI SAPI.

 Hence, after inventioning and looking for a while I found that my PHP.INI obviously didn't look in the accurate directory for my PHP Extensions, so I went under:

"Directory in which the loadable extensions (modules) reside." And casting the following:

; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
;extension_dir = "ext"

And easily removed the ; infront of "extension_dir = "ext", note this is just for Windows, remove the semicolon in front of the first extension_dir in case you are running a different operating system.

10 6 4
31,120 points

Related questions

0 votes
1 answer 24 views
Problem : How to fix this erro: Composer' is not recognized as an internal or external command, operable program or batch file..
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 3.4K views
Problem : Currently I am using the windows server 2008 os. I download the composer setup.exe and install it to my PC . But when I try to install composer. I face below error: 'composer' is not recognized as an internal or external command, eg:- 'composer' is not recognized as an internal or external command, operable program or batch file.
asked Feb 4, 2020 jwilliam 3.9k points
0 votes
1 answer 16 views
Problem: Any help :To enable extensions, verify that they are enabled in your .ini files.
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 3.7K views
Problem :. I am new to Magneto. I am trying to install the Magento 2.0.2 via composer but I am facing below error: Problem 1 - Installation request for magento/product-enterprise-edition 2.0.2 -> satisfiable by magento/product-enterprise-edition[2.0.2]. - magento/ ... by PHP in CLI mode. Please Note : I have already installed php5-cli and php5-curl. Can anybody help me in fixing above error?
asked Feb 26, 2020 mphil 2.3k points
1 vote
1 answer 17 views
Problem: Any ideas on what I need to do to fix this? Thanks! your php installation appears to be missing the mysql extension which is required by wordpress
asked Mar 3 Muneeb Saadii 125k points
0 votes
1 answer 64 views
Problem: Hi, kodlog i need assistance regarding this popup error message.” Your php installation appears to be missing the mysql extension which is required by wordpress.”
asked Nov 9, 2020 prog_learner 2.5k points
0 votes
1 answer 2 views
Problem: Please assist me in resolving this issue: you are not allowed to access this file. check index_dev.php for more information.
asked Apr 1 rakib1 51.3k points
0 votes
1 answer 91 views
0 votes
1 answer 9 views
Problem: I want help: the get method is not supported for this route. supported methods: post.
asked Mar 19 Wafa Abu Yousef 6.1k points