0

I am trying to install a package into my symfony 6.1 application, and when i run the command composer require sensio/framework-extra-bundle

I get this error message 
[RuntimeException] You must enable the openssl extension in your php.ini
to load information from https://... 

I tried to enable the openssl extension at the php.ini file but i cant find the (extension=php_openssl.dll) line, i only find this (extension=openssl) and it's alredy uncommented.


For the php version it's PHP 8.1.8

(ask me for any additionnal informations)


If someone could help me to find a solution and thank you very much for your time :)

endo.anaconda
  • 2,449
  • 4
  • 29
  • 55
Rabie gh
  • 11
  • 1
  • 2
  • Does `phpinfo()` show it enabled? – Dave Aug 09 '22 at 19:21
  • Does this answer your question? [The openssl extension is required for SSL/TLS protection](https://stackoverflow.com/questions/35249620/the-openssl-extension-is-required-for-ssl-tls-protection) – Nico Haase Aug 10 '22 at 06:49
  • It should not hurt to run `composer diagnose` to learn about the configuration on your system, as well as `composer show -p` which will make Composer list the platform packages (which includes the PHP extensions) it is able to see. – hakre Aug 12 '22 at 10:56

1 Answers1

0

Debug if openssl is loaded in PHP

The symfony profile phpinfo, where you should be able to see, if your PHP configuration really runs openssl

try the following url

http://{local server address, e.g. localhost:8001}/_profiler/phpinfo where you may change the beginning of the link to your environment

outside symfony you may create an empty file e.g. phpinfo.php with the content

<?php
phpinfo();

Fixing the issue

your post lacks of information on your environment. How did you setup your developement environement.

As offtopic suggestion and to avoid this issue in the future you may have a look at docker, there you can setup a standardized environement, e.g. https://github.com/ger86/symfony-docker

endo.anaconda
  • 2,449
  • 4
  • 29
  • 55
  • 1
    Thanks for your response, i asked you if you need any additionnal informations,i'm a beginner so i know that there is lot of thinks that i still dont know, for the suggetion that you have made i dont really get it so can i have more clarifications. – Rabie gh Aug 10 '22 at 11:44
  • fot the phpinfo() i tried it and it shows that the openssl extension is enabled – Rabie gh Aug 10 '22 at 11:49