Closed binarweb closed 2 years ago
I managed to solve it. This issue can be closed.
I did it by mounting a config file to the phpmyadmin container.
The docker-compose.yml
file content:
version: "3"
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
PMA_ARBITRARY: 1
volumes:
- ./config.inc.php:/etc/phpmyadmin/config.inc.php
restart: always
The config.inc.php
content:
<?php
# Extend session lifetime
$sessionValidity = 3600 * 24 * 365 * 1; // 1 year
$cfg['LoginCookieValidity'] = $sessionValidity; // http://docs.phpmyadmin.net/en/latest/config.html#cfg_LoginCookieValidity
ini_set('session.gc_maxlifetime', (string) $sessionValidity);
Does this work nice for you since then ?
It does work. But, I don't remember if I changed something else. I might have changed the cronjob or the systemd service for PHP to delay cleaning up stale sessions.
It does work. But, I don't remember if I changed something else. I might have changed the cronjob or the systemd service for PHP to delay cleaning up stale sessions.
Okay, that's good to know. Thanks for the feedback
If you add the following to you yml file, you're able to control all PHP setting server based:
volumes:
- ./custom.ini:/usr/local/etc/php/conf.d/custom.ini
While working, the phpMyAdmin tab is left open. Sometimes, when I get back to it I'm logged out.
Is there a way to increase the session timeout of phpMyAdmin in docker to something like 30 days?
The container exposes phpMyAdmin to outside world, so I wouldn't use https://github.com/phpmyadmin/docker/issues/235#issuecomment-526636759.