2

I start a tutorial about Symfony 3 and I'm facing an issue when creating a new project with this command :

php symfony.phar new Symfony

I have this error :

[GuzzleHttp\Exception\RequestException]
  Error creating resource: [message] fopen(): Unable to find the wrapper "https" - did you forget to enable it when y
  ou configured PHP?
  [file] phar://C:/xampp/htdocs/symfony.phar/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] fopen(https://get.symfony.com/symfony.version): failed to open stream: Invalid argument
  [file] phar://C:/xampp/htdocs/symfony.phar/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] Undefined variable: http_response_header
  [file] phar://C:/xampp/htdocs/symfony.phar/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 407






  [GuzzleHttp\Ring\Exception\RingException]
  Error creating resource: [message] fopen(): Unable to find the wrapper "https" - did you forget to enable it when y
  ou configured PHP?
  [file] phar://C:/xampp/htdocs/symfony.phar/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] fopen(https://get.symfony.com/symfony.version): failed to open stream: Invalid argument
  [file] phar://C:/xampp/htdocs/symfony.phar/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] Undefined variable: http_response_header
  [file] phar://C:/xampp/htdocs/symfony.phar/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 407

I have PHP7 installed locally, is it possible it's the source of the problem ?

Thanks in advance

Nathan30
  • 689
  • 2
  • 8
  • 29
  • 4
    check this http://stackoverflow.com/questions/5444249/unable-to-find-the-wrapper-https-did-you-forget-to-enable-it-when-you-config –  Aug 14 '16 at 19:47

1 Answers1

3

Probably as per @0x13a 's comments you don't have openssl installed.

I think in XAMPP these are the instructions:

Go into your C:\xampp\php\ext\php.ini file and uncomment:

;extension=php_openssl.dll

If not, try adding it. I believe XAMPP should have openssl installed, but if not, you might need to look into that.


Edit #2 - For Marine1

Use this command to install openssl:

sudo apt-get install openssl

Then find out which php.ini is being used vi php from command line:

php -i |grep 'Loaded Configuration File'

Then edit the above specified php.ini with vi (below is an example):

vi /etc/php.ini

And make the changes I indicated.

Alvin Bunk
  • 7,621
  • 3
  • 29
  • 45
  • Hi Nathan30. If this fixed the problem, can you click the checkmark to mark this as the answer. There are 2 ways to respond to an answer, one way is to click the up arrow if the answer helped, the other is the checkmark to indicate it solved the problem. Thanks! – Alvin Bunk Aug 15 '16 at 15:39
  • And what about users of Linux ? ;) – Revolucion for Monica Feb 22 '17 at 18:30
  • Hi @Marine1, what distro of Linux do you have? My answer address the OP's question which is on Windows. – Alvin Bunk Feb 22 '17 at 18:35
  • @Marine1 See my Edit #2 section (just for you). By the `16.04` is not a distro, but instead you should have called it `Ubuntu 16.04 LTS`. Thanks! – Alvin Bunk Feb 22 '17 at 18:48
  • 1
    @Marine1, `vi` is the standard text editor that has been around since the 1970's (at least). You can instead use nano editor, or whatever is available on your distro. For example `nano /etc/php.ini`. – Alvin Bunk Feb 22 '17 at 19:28