This project requires PHP 8.3
and the following php extensions:
curl
json
mbstring
pdo
openssl
git clone [email protected]:AurelienLab/daps-p5-blog.git
cd daps-p5-blog
In projet root directory execute this command:
composer install
You'll need the empty database for this project. You can explicitly ask me for it in private message. Once you imported it, remember the database name and your mysql credentials.
APP_ENV=dev # Current environment (dev|prod)
APP_KEY=generateme # Random string used for encryption
APP_REMEMBER_ME_LIFETIME=336 # Number of hours a user will be remembered for auto login
APP_PASSWORD_REQUEST_HOURS_VALIDITY=24 # Number of hours of password request token validity
APP_CONTACT_EMAIL=[email protected] # Mail sender
################################
####### DATABASE CONFIG ########
################################
DB_HOST=localhost
DB_PORT=3306
DB_NAME=
DB_USER=
DB_PASSWORD=
# See https://symfony.com/doc/current/mailer.html for mailer configuration
MAILER_DSN=smtp://<user>:<password>@provider.com:2525
MAILER_DEFAULT_SENDER=[email protected]
Your web server must target public/
folder in project directory, and have FollowSymLinks enabled.
Follow this documentation for nginx
or this one for apache2.
Your web server user must have rights to write in public/uploads
folder and sub-folders. If you're running on Unix
system with ACL You can run the following:
# Get current web server user
HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1)
# set permissions for future files and folders
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX public/uploads
# set permissions on the existing files and folders
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX public/uploads
Source: https://symfony.com/doc/current/setup/file_permissions.html