Error installing Symphony: fopen failed to open stream: Unable to find the socket transport "http"

Asked

Viewed 129 times

-3

I’m following the tutorial for the installation of symfony, but an error occurs while running it

  [GuzzleHttp\Exception\RequestException]
  Error creating resource: [message] fopen(https://get.symfony.com/symfony.version): failed to open stream: Unable to find
   the socket transport "http" - did you forget to enable it when you configured PHP?
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] Undefined variable: http_response_header
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 407

  [GuzzleHttp\Ring\Exception\RingException]
  Error creating resource: [message] fopen(https://get.symfony.com/symfony.version): failed to open stream: Unable to find
   the socket transport "http" - did you forget to enable it when you configured PHP?
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] Undefined variable: http_response_header
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 407
**

I have installed apt-get install php5-Curl and even then, the problem remains

1 answer

0

This might be your SSL not activated, to activate with PHP5 no Ubuntu va no php.ini and uncomment (remove the ; in front of the extesion=) the line:

;extension=openssl.so

Should stay like this:

extension=openssl.so

If it’s Windows uncomment:

;extension=php_openssl.dll

If it is PHP7.2 (windows and linux):

;extension=openssl

Another solution you can try is to activate CURL using the following command:

 sudo apt-get install php5-curl

If it’s already installed and still doesn’t work, you can edit it in php.ini and uncomment the line (if it’s php5 with linux):

;extension=php_curl.dll

If it is windows:

;extension=curl.so

If it is PHP7.2 (windows and linux):

;extension=curl
  • I performed the settings and now shows the following error: symfony new myproject PHP Warning: PHP Startup: Unable to load Dynamic library '/usr/lib/php/20151012/php_curl.dll' - /usr/lib/php/20151012/php_curl.dll: open Shared Object file: No such file or directory in Unknown on line 0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.