问题描述
我需要在运行 joomla 的 docker 上增加 max_execution_time。我修改了我的 PHP.ini 并按卷将其传递给 docker:
cat /data/PHP.ini
upload_max_filesize = 101M
post_max_size = 101M
max_execution_time = 666
我的运行 docker run
docker run -d \
--name myjoomla \
-p 80:80 \
-e JOOMLA_DB_NAME=dbname \
-e JOOMLA_DB_USER=user \
-e JOOMLA_DB_PASSWORD=pass \
-e JOOMLA_DB_HOST=host \
-v /data/www/html:/var/www/html \
-v /data/PHP.ini:/usr/local/etc/PHP/conf.d/PHP.ini \
--restart=always \
joomla:latest
对于其他变量它有效但不适用于 max_execution_time
$ docker exec -it myjoomla PHP -i | grep max_
log_errors_max_len => 1024 => 1024
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
post_max_size => 101M => 101M
upload_max_filesize => 101M => 101M
ldap.max_links => Unlimited => Unlimited
memcached.sess_lock_max_wait => not set => not set
memcached.sess_lock_wait_max => 150 => 150
MysqLi.max_links => Unlimited => Unlimited
MysqLi.max_persistent => Unlimited => Unlimited
pgsql.max_links => Unlimited => Unlimited
pgsql.max_persistent => Unlimited => Unlimited
session.gc_maxlifetime => 1440 => 1440
还有其他设置吗?我错过了什么吗? 谢谢 卡罗
解决方法
尝试在 package lesson3;
public class Task6 {
public static void main(String[] args) {
int n=123456789;
System.out.println(n);
do{
private static int sumDigits(int n)
int s=sumDigits(n);
if (s < 10) ;
{
if (s == 9) System.out.println("divides by 9");
else System.out.println("doesn't divide by 9");
break;
}
else n = s;
}while (true);
}
中创建一个带有必需参数的 custom.ini
文件,而不是直接将其放入 /usr/local/etc/php/conf.d
php.ini