1

I have just installed php and am trying to download Composer.

The message I get when downloading is the following:

c:\>curl -sS https://getcomposer.org/installer | php
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\php\php_
l' - The specified module could not be found.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\php\php_opens
The specified module could not be found.
 in Unknown on line 0
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script aga

The openssl extension is missing, which means that secure HTTPS transf
possible.
If possible you should enable it or recompile php with --with-openssl

I made sure to enable extension=php_openssl.dll in php.ini and using php --ini I am able to verify that the correct php.ini file is loaded.

If I use curl -sS http://getcomposer.org/installer | php instead the exact same message is displayed.

Could someone guide me through a solution?

EDIT: I think this was the fault of a badly set up php.ini. Specifically, I didn't uncomment extension_dir = "ext". However now I am running into other problems. When I try to install Composer I get:

Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org

Request to https://getcomposer.org/installer failed with errors:
SSL: Handshake timed out. Failed to enable crypto. Failed to open stream: operation failed

Is this a bad setting again on my end?

mlamp
  • 773
  • 2
  • 9
  • 21
  • 1
    `Unable to load dynamic library 'C:\php\php_l'` sounds like bad php.ini entries, or bad copy and pasting... – miken32 Nov 24 '15 at 20:24
  • Check your extension path perhaps its wrong. – René Höhle Nov 24 '15 at 20:25
  • Can you do other things with PHP? My focus is on the two `Warning: PHP Startup` warnings. – HPierce Nov 24 '15 at 20:26
  • Possible duplicate of [PHP Warning: PHP Startup: Unable to load dynamic library](http://stackoverflow.com/questions/5282264/php-warning-php-startup-unable-to-load-dynamic-library) – HPierce Nov 24 '15 at 20:28

2 Answers2

0

I was finally able to install it properly, after configuring php correctly and using the php -r "readfile('https://getcomposer.org/installer');" | php command.

mlamp
  • 773
  • 2
  • 9
  • 21
0

I guess the crypto problem was caused, because you tried to access the installer page via https-protocoll. So curl has to use SSL-encryption which itself uses crypto-library. You could also have tried downloading the installer, using http://.

Hope that helps

Guido Kitzing
  • 892
  • 5
  • 14