Content
Introductory
You may be familiar with the situation where, as a web developer, you get up from your computer to stretch or make a good coffee. This time point is enough to hide in the background phpMyAdmin for our surface to exit us during this time. This would be fine as well, as this feature is for security, but in the course of daily work, multiple logins become inconvenient, not to mention when all this happens while running an SQL command.
(For the sake of example, I set the time limit here to 120 seconds so I don't have to wait for the default setting time)
In this brief tutorial, we'll look at how to set this time longer than the "factory" 24 minutes so that you only have to sign in once a day.
Furthermore, do not apply to LAMP systems where there is only one PHP Each page runs in SAPI mode (Mod-PHP) because then the session properties of the other websites also change.
This amendment is mainly a Perfect server configurations where phpMyAdmin is the interface Apache runs as a module while web pages can be run in other PHP modes (CGI, Fast-CGI, PHP-FPM), so this session setting does not affect other web pages in this case.
Configure the php.ini file
Before setting up a session in the phpMyAdmin interface, you must first set it up in php.ini, otherwise phpMyAdmin will report an error due to the different length of the session settings.
Debian 8 If the default PHP version of the distribution is 5, then edit the following file:
nano /etc/php5/apache2/php.ini
Debian 9 and 7.0 is the default PHP version, so edit here:
nano /etc/php/7.0/apache2/php.ini
In the file, look for the following setting:
session.gc_maxlifetime = 1440
And rewrite it for us for a reasonably long time (in seconds). I usually set the round 1 day, that is, I set 86400 on my machine.
Of course, this is only a maximum time limit, even in phpMyAdmin.
Then restart Apache:
service apache2 restart
Configure phpMyAdmin
In phpMyAdmin, this must be configured separately for each user, so log in with the user for whom you want to apply this setting.
Click on the top menu bar Beállítások menu item and then below functions submenu. Here it is General tab, set the desired seconds for the "Sign-in cookie validity" setting:
Save it and you're done.
Conclusion
With this little simple setup, you can save a lot of time by using the phpMyAdmin database manager a lot on a daily basis. However, before you set up, make sure you don't overwhelm other websites.
- To post registration and login required
- 186 views