Reputation: 909
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
Upvotes: 2
Views: 1639
Reputation: 7764
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.
Upvotes: 3