|
6 | 6 | Requirements for Running Symfony
|
7 | 7 | ================================
|
8 | 8 |
|
9 |
| -To run Symfony, your system needs to adhere to a list of requirements. You |
10 |
| -can easily see if your system passes all requirements by running the |
11 |
| -``web/config.php`` in your Symfony distribution. Since the CLI often uses |
12 |
| -a different ``php.ini`` configuration file, it's also a good idea to check |
13 |
| -your requirements from the command line via: |
| 9 | +Symfony 2.7 requires **PHP 5.3.9** or higher to run, in addition to other minor |
| 10 | +requirements. To make things simple, Symfony provides a tool to quickly check if |
| 11 | +your system meets all those requirements. |
14 | 12 |
|
15 |
| -.. code-block:: terminal |
16 |
| -
|
17 |
| - $ php app/check.php |
18 |
| -
|
19 |
| -Below is the list of required and optional requirements. |
20 |
| - |
21 |
| -Required |
22 |
| --------- |
| 13 | +Beware that PHP can define a different configuration for the command console and |
| 14 | +the web server, so you need to check requirements in both environments. |
23 | 15 |
|
24 |
| -* PHP needs to be a minimum version of PHP 5.3.9 |
25 |
| -* `JSON extension`_ needs to be enabled |
26 |
| -* `ctype extension`_ needs to be enabled |
27 |
| -* Your ``php.ini`` needs to have the ``date.timezone`` setting |
| 16 | +Checking Requirements for the Web Server |
| 17 | +---------------------------------------- |
28 | 18 |
|
29 |
| -.. caution:: |
| 19 | +Symfony includes a ``config.php`` file in the ``web/`` directory of your project. |
| 20 | +Open that file with your browser to check the requirements. |
30 | 21 |
|
31 |
| - Be aware that PHP 5.3.16 is not suitable to run Symfony, |
32 |
| - because of a `major bug in the Reflection subsystem`_. |
| 22 | +Once you've fixed all the reported issues, delete the ``web/config.php`` file |
| 23 | +to avoid leaking internal information about your application to visitors. |
33 | 24 |
|
34 |
| -Optional |
35 |
| --------- |
| 25 | +Checking Requirements for the Command Console |
| 26 | +--------------------------------------------- |
36 | 27 |
|
37 |
| -* You need to have the PHP-XML module installed |
38 |
| -* You need to have at least version 2.6.21 of libxml |
39 |
| -* PHP tokenizer needs to be enabled |
40 |
| -* mbstring functions need to be enabled |
41 |
| -* iconv needs to be enabled |
42 |
| -* POSIX needs to be enabled (only on \*nix) |
43 |
| -* Intl needs to be installed with ICU 4+ |
44 |
| -* APC 3.0.17+ (or another opcode cache needs to be installed) |
45 |
| -* ``php.ini`` recommended settings |
| 28 | +Open your console or terminal, enter in your project directory, execute this |
| 29 | +command and fix the reported issues: |
46 | 30 |
|
47 |
| - * ``short_open_tag = Off`` |
48 |
| - * ``magic_quotes_gpc = Off`` |
49 |
| - * ``register_globals = Off`` |
50 |
| - * ``session.auto_start = Off`` |
51 |
| - |
52 |
| -Doctrine |
53 |
| --------- |
54 |
| - |
55 |
| -If you want to use Doctrine, you will need to have PDO installed. Additionally, |
56 |
| -you need to have the PDO driver installed for the database server you want |
57 |
| -to use. |
| 31 | +.. code-block:: terminal |
58 | 32 |
|
59 |
| -.. _`Requirements section of the README`: https://github.com/symfony/symfony/blob/2.7/README.md#requirements |
60 |
| -.. _`JSON extension`: https://php.net/manual/book.json.php |
61 |
| -.. _`ctype extension`: https://php.net/manual/book.ctype.php |
62 |
| -.. _`major bug in the Reflection subsystem`: https://bugs.php.net/bug.php?id=62715 |
| 33 | + $ cd my-project/ |
| 34 | + $ php app/check.php |
0 commit comments