0

My problem is when I create a new Symfony 3.4 project with Composer.

I will enter the following command:

composer create-project symfony/website-skeleton projectName

When composer begins to create the project it will give me the following warnings:

PHP Warning: PHP Startup: Unable to load dynamic library 'php_openssl' (tried: C:\php\ext\php_openssl (The specified module could not be found. ), C:\php\ext\php_php_openssl.dll (The specified module could not be found. )) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'php_openssl' (tried: C:\php\ext\php_openssl (The specified module could not be found. ), C:\php\ext\php_php_openssl.dll (The specified module could not be found. )) in Unknown on line 0

[Composer\Exception\NoSslException] The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.

From my understanding, SSL is encryption for websites. At a judgment, I think the problem is composer cannot download Symfony securely.By telling me to try disabling TLS I think means trying to download Symfony insecurely since TLS is another form of encryption.

I have never had this problem with Composer before, I can not think of anything I have changed for this problem to occur.

If anyone has come across this problem or knows of any solutions that would be greatly appreciated because I cannot work on existing projects because of this.

EDIT: The file path it is looking down is incorrect, it should check down "C:\wamp\bin\php\php7.2.1\ext" and not "C:\php\ext\" as this file path does not exist. I am unsure how to adjust this.

StevenG1
  • 55
  • 1
  • 9
  • You need to enable the PHP openssl extension. How this is done depends on your local server. – Philippe-B- Apr 15 '18 at 15:24
  • 1
    Possible duplicate of [How to enable PHP's openssl extension to install Composer?](https://stackoverflow.com/questions/18064612/how-to-enable-phps-openssl-extension-to-install-composer) – EmilCataranciuc Apr 15 '18 at 21:56
  • Apologies, I have read through the thread but my problem is slightly different I have made a further comment on the solution. @Emil – StevenG1 Apr 16 '18 at 17:58

2 Answers2

2
  1. Go to that location and edit the file named: php.ini
  2. Uncomment the line extension=php_openssl.dll by removing the semicolon at the beginning.
  3. Restart your server
Sir Kane
  • 71
  • 1
  • 5
  • I seem to be having trouble with changing the file path it is searching down. The file path "C:\php\ext\php_php_openssl.dll" is incorrect. I found the actual path but I do not know how to edit the file path. – StevenG1 Apr 16 '18 at 17:54
  • So what is the real path of your `php_openssl.dll` file? @StevenG1 – Sir Kane Apr 17 '18 at 00:09
0

Locate your php.ini and adjust extension_dir according to your needs. You can find more info here.

EmilCataranciuc
  • 1,024
  • 1
  • 11
  • 24