phpmyadmin logs out after 1440 secs

后端 未结 24 1339
予麋鹿
予麋鹿 2021-01-29 23:29

In my local development Ubuntu box I use MySQL and phpmyadmin to work with the database.

Whenever phpmyadmin is idle for 1440 secs (24min) the session expires. I lose m

24条回答
  •  故里飘歌
    2021-01-29 23:59

    After I tried all suggested methods here and still kept getting logged out, I turned to writing a small usercsript for Tampermonkey as I already have that extension. It is very simple and just sends a request to one of low footprint scripts of PHPMyAdmin once every minute. Here is the code:

    // ==UserScript==
    // @name         PHPMyAdmin Keep Session Alive
    // @namespace    https://www.bitwizeor.io/
    // @version      0.1
    // @description  No more nasty PHPMyAdmin session expiries
    // @match        http://localhost/phpmyadmin/*
    // ==/UserScript==
    
    (function() {
        'use strict';
        console.log('PHPMyAdmin Keep Session Alive activated');
        var url;
        window.setInterval(function(){
            url = $("#serverinfo a:eq(1)").prop("href");
            url += '&ajax_request=true&ajax_page_request=true';
            $.getJSON(url);
            console.log('pinging ...');
        }, 60000);
    })();
    

提交回复
热议问题