Skip to content
Advertisement

PHP date.timezone not found with Docker & PHP-FPM

I’m creating a Symfony environment (PHP-FPM, Nginx, & more) with Docker & Docker-compose.

But, PHP does not use my php.ini and ignores the config (date.timezone parameter is not found in my Symfony application).

Of course, when I go on my container, the date.timezone is correctly set in the 2 php.ini (cli & FPM).

I don’t understand why, but it works if I put my php.ini in /usr/local/etc/php/ folder (wtf)

Did I miss something?

docker-compose.yml :

JavaScript

Dockerfile :

JavaScript

Advertisement

Answer

Official PHP Docker Image use /usr/local/etc/php as base folder: see Dockerfile.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement