Skip to content

Update setup.rst #7058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ executable that needs to be installed on your system only once:

# Windows systems
c:\> php -r "readfile('https://symfony.com/installer');" > symfony

# Windows 10 and xampp (whit the "PATH" environment variable defined in "c:\xampp\php'
c:\> php.exe -r "readfile('https://symfony.com/installer');" > symfony
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, when c:\xampp\php is in your PATH, php will be resolved to c:\xampp\php\php.exe by Windows

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right... I used php (not php.exe) and that's works...


.. note::

Expand All @@ -52,6 +55,9 @@ executable that needs to be installed on your system only once:
# ... then, execute the command as
c:\> cd projects
c:\projects\> php symfony
# in windows 10 with xampp...
c:\> cd projects
c:\projects\> php.exe symfony
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same applies here (and below)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right... I used php (not php.exe) and that's works...
The only problem is that
c:\projects> php symfony
doesn't create another file. I need use "php symfony" each time that must use symfony.
When I try symfony alone, I have errors:
c:\xampp\htdocs\symfonywebs>symfony
'symfony' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
the file 'symfony' is the PATH directory and in the directory where I execute that command.
What can be the problem?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correction: the file symfony is in the PATH....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows doesn't understand the shebang that indicates with which command a file should be run.

So you have to create a custom bat file to make symfony executable on Windows. Something along the lines of:

@echo
php "C:\path\to\symfony" %*

(the @echo part avoids the command being outputted to the screen, the next line indicates what command should be run (php ...) and %* tells Windows to pass all arguments passed to this bat file to the command)


.. _installation-creating-the-app:

Expand All @@ -61,6 +67,9 @@ with the ``new`` command:
.. code-block:: terminal

$ symfony new my_project_name

# in windows 10 with xampp...
$ php.exe symfony new my_project_name

This command creates a new directory called ``my_project_name/`` that contains
an empty project based on the most recent stable Symfony version available. In
Expand All @@ -72,6 +81,19 @@ to meet those requirements.

If the installer doesn't work for you or doesn't output anything, make sure
that the PHP `Phar extension`_ is installed and enabled on your computer.
In windows 10 with xampp, if you have un error like
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "un" should be "an"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry... is my "spanglish"!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an error that occurs in all cases on Windows. So let's make a bit more generic:

.. note::

    If you're on Windows, you might get this error:

        cURL error 60: SSL certificate problem: unable to get local issuer certificate.

    In this case, download this link: http://curl.haxx.se/ca/cacert.pem and move the
    file on your computer. Then edit your `php.ini` file and insert:

    .. code-block:: ini

        curl.cainfo = "C:\path\to\cacert.pem"


cURL error 60: SSL certificate problem: unable to get local issuer certificate.

In that case follow this link:

http://curl.haxx.se/ca/cacert.pem

Copy the entire page and save it in a: "cacert.pem"

Then in your php.ini file insert or edit the following line:

curl.cainfo = "[pathtothisfile]\cacert.pem"

Basing your Project on a Specific Symfony Version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down