Bonjour,

J'ai décidé d'apprendre symfony mais je rencontre un problème dès l'installation.
Je suis sur windows et j'ai installé XAMPP. Avant de poster et dans l'espoir de réglé mes problèmes, j'ai réinstaller xampp et symfony cli.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
PHP 8.2.0 (cli) (built: Dec  6 2022 15:31:23) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies
Après installation j'ai lancé le symfony check:requirements qui m'a donné le résultat ci-desous.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
C:\Users\DELL\Desktop\symfony>symfony check:requirements
 
Symfony Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
> PHP is using the following php.ini file:
C:\xampp\php\php.ini
 
> Checking Symfony requirements:
 
..................W..........
 
 
 [OK]
 Your system is ready to run Symfony projects 
 
 
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * a PHP accelerator should be installed
   > Install and/or enable a PHP accelerator (highly recommended).
 
 
Note  The command console can use a different php.ini file        
~~~~  than the one used by your web server.
      Please check that both the console and the web server       
      are using the same PHP version and configuration.
Sur la première page que je crée j'ai le message "Unable to write in the "logs" directory (C:\Users\DELL\Desktop\symfony\symfony6/var/log).".

Sur le terminal j'ai ce message qui apparait à chaque fois que j'ajoute quelque chose avec composer
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
Symfony operations: 1 recipe (cf949ec5272e409930c15734a374b966)
  - Configuring symfony/acl-bundle (>=v2.3.0): From auto-generated recipe
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!  In Kernel.php line 578:
!!
!!    Unable to write in the "logs" directory (C:\Users\DELL\Desktop\symfony\symfony6/var/log).
!!
!!
!!
Script @auto-scripts was called via post-update-cmd
En relançant l'instruction symfony check:requirements j'ai maintenant les messages d'erreurs suivant :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
C:\Users\DELL\Desktop\symfony\symfony6>symfony check:requirements
 
Symfony Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
> PHP is using the following php.ini file:        
C:\xampp\php\php.ini
 
> Checking Symfony requirements:
 
............EE..........W..........
 
 
 [ERROR]
 Your system is not ready to run Symfony projects 
 
 
Fix the following mandatory requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * var/cache/ directory must be writable
   > Change the permissions of "var/cache/" directory so that the web
   > server can write into it.
 
 * var/log/ directory must be writable
   > Change the permissions of "var/log/" directory so that the web
   > server can write into it.
 
 
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * a PHP accelerator should be installed
   > Install and/or enable a PHP accelerator (highly recommended).
 
 
Note  The command console can use a different php.ini file
~~~~  than the one used by your web server.
      Please check that both the console and the web server
      are using the same PHP version and configuration.
De ce que je comprend, je dois donc configurer les permissions : https://symfony.com/doc/current/setu...rmissions.html.

mais je ne comprend pas les instructions :

Edit your web server configuration (commonly httpd.conf or apache2.conf for Apache) and set its user to be the same as your CLI user (e.g. for Apache, update the User and Group directives).
Comment je fais pour savoir quel est le "CLI user"? Actuellement dans httpd.conf j'ai User daemon et Group daemon.

J'ai essayé via symfony --help de collecter des données :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
C:\Users\DELL\Desktop\symfony\symfony6>symfony local:php:list
+---------+--------------+---------+---------+-------------+---------+---------+
| Version |  Directory   |   PHP   |   PHP   |     PHP     | Server  | System? |
|         |              |   CLI   |   FPM   |     CGI     |         |         |
+---------+--------------+---------+---------+-------------+---------+---------+
| 8.2.0   | C:\xampp\php | php.exe |         | php-cgi.exe | PHP CGI | *       |
+---------+--------------+---------+---------+-------------+---------+---------+
 
The current PHP version is selected from default version in $PATH
 
To control the version used in a directory, create a .php-version file that contains the version number (e.g. 7.2 or 7.2.15),   
or define config.platform.php inside composer.json.
If you're using Platform.sh, the version can also be specified in the .platform.app.yaml file.
J'espère avoir été assez exhaustif et que vous aller pouvoir m'aider.

Cordialement