Error installing Symfony

0

I followed the instructions to install symfony from the official website but when I entered the command: php -r "file_put_contents('symfony', file_get_contents('https://symfony.com/installer'));" it gives me the following error:

  

PHP Warning: file_get_contents (): Unable to find the wrapper "https"   - did you forget to enable it when you configured PHP? in Command line code on line 1

     

Warning: file_get_contents (): Unable to find the wrapper "https" - did   you forget to enable it when you configured PHP? in Command line code   on line 1 PHP Warning: file_get_contents (h   ttps: //symfony.com/installer): failed to open stream: Invalid argument   in Command line code on line 1

     

Warning: file_get_contents (ht tps: //symfony.com/installer): failed to   open stream: Invalid argument in Command line code on line 1

    
asked by Yept 11.10.2017 в 05:15
source

2 answers

1

The problem you are having is that you have not enabled the ssl module so you can make requests https from php. If you do not have the module enabled, it returns an error when trying to make the request. What fails is the

file_get_contents('https://symfony.com/installer')

You have to enable it in the php.ini that you are using.

If you are using XAMPP, uncomment the line (delete the;)

;extension=php_openssl.dll 

in

/apache/bin/php.ini

and restart the apache

    
answered by 20.10.2017 / 04:58
source
1

Better install composer and from it you generate new projects!

Download it and install it! link

Then from the terminal you go to the folder where you want to create the new project:

Ex: C: \ xampp \ htdocs

And already being in the folder where you want to create the project, you use:

composer create-project symfony / framework-standard-edition my_project_name "2.8. *"

What is in the double quotes is the version to be installed, if not, you will install the latest stable version (currently).

I hope it serves you.

For more info:

link - > Search: Creating Symfony Applications with Composer

And if you want to go deeper, this man has translated all the documentation into Spanish to prepare for the certification.

link

To enjoy !!!

    
answered by 12.10.2017 в 05:05