TrafeX/docker-php-nginx

`max_execution_time` not getting applied in php.ini

foremtehan opened this issue · 3 comments

This is my php.ini file:

[PHP]
max_execution_time = 59

[Date]
date.timezone="UTC"
expose_php= Off

Dockerfile:

COPY docker-config/php.ini /etc/php81/conf.d/custom.ini

Inside the container:

image

But looks like it did not applied :

image

I also removed the keyword [PHP] but didn't work either

Hi @foremtehan,

I believe this is because artisan overrides the max_execution_time to set it to unlimited for CLI commands.

I don't think so, Here is the artisan file https://github.com/laravel/laravel/blob/9.x/artisan

You're right, I forgot that PHP overrides a few settings when using the CLI; https://www.php.net/manual/en/features.commandline.differences.php
As the docs said, these settings cannot be changed via ini files, you can only override it in the code with init_set.