Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: disabling login every 1800 seconds on phpmyadmin

  1. #1
    Join Date
    Jun 2006
    Beans
    161
    Distro
    Ubuntu 13.10 Saucy Salamander

    disabling login every 1800 seconds on phpmyadmin

    On Ubuntu, phpmyadmin defaults to requiring you to login after 1800 seconds of inactivity. This is VERY annoying for me, because I only need phpmyadmin about once every 30 minutes or so, so I have to login each and every time I want to use it.

    I googled and found a solution that says to add this line to /etc/phpmyadmin/config.inc.php

    Code:
    $cfg['LoginCookieValidity'] = 547847;
    Well, I did that, but it still makes me log in every 30 minutes. Is there a more ubuntu-specific fixed needed?
    Last edited by nbv4; April 3rd, 2008 at 02:01 PM.

  2. #2
    Join Date
    May 2005
    Location
    Helsinki, Finland
    Beans
    Hidden!

    Re: disabling login every 1800 seconds on phpmyadmin

    without knowing anything about php or phpmyadmin, I'd say that line sets cookie lifetime to exactly 30 minutes... Why don't you try a larger number?
    GeoClue -- a geographic information service for Linux
    Contact Info

  3. #3
    Join Date
    Nov 2007
    Location
    UK
    Beans
    772
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: disabling login every 1800 seconds on phpmyadmin

    Presumably thats in seconds.

    1800/60 = 30.

    Have you tried making the number larger? 86400 for example?

    EDIT: Beaten to it!
    Disclaimer: Yes I usually talk crap

  4. #4
    Join Date
    Jun 2006
    Beans
    161
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: disabling login every 1800 seconds on phpmyadmin

    Quote Originally Posted by pedro_orange View Post
    Presumably thats in seconds.

    1800/60 = 30.

    Have you tried making the number larger? 86400 for example?

    EDIT: Beaten to it!
    crap. Yes, I made the number super large, but it had no effect. I copy/pasted that line from somewhere else, and forgot to change it.

  5. #5
    Join Date
    Nov 2007
    Location
    UK
    Beans
    772
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: disabling login every 1800 seconds on phpmyadmin

    Could try editing:

    /usr/share/phpmyadmin/config/config.inc.php
    $cfg[’Servers’][$i][’LoginCookieValidity’] = 86400;

    I presume you've set $cfg['LoginCookieStore'] = 0?

    EDIT: Remember it's an integer, and could possibly be overflowing.
    Disclaimer: Yes I usually talk crap

  6. #6
    Join Date
    Jun 2006
    Beans
    161
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: disabling login every 1800 seconds on phpmyadmin

    Quote Originally Posted by pedro_orange View Post
    Could try editing:

    /usr/share/phpmyadmin/config/config.inc.php
    $cfg[’Servers’][$i][’LoginCookieValidity’] = 86400;
    that probably fixed it. the one in /etc/ was kind of blank, but the one in /usr/share seems to be the one phpmyadmin is actually using. Why would there be more than one phpmyadmin config file?
    I presume you've set $cfg['LoginCookieStore'] = 0?
    is it supposed to be set?
    EDIT: Remember it's an integer, and could possibly be overflowing.
    since I'm using 64bit ubuntu, I can set it to a larger value than there are seconds since the big boom

  7. #7
    Join Date
    Nov 2007
    Location
    UK
    Beans
    772
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: disabling login every 1800 seconds on phpmyadmin

    that probably fixed it. the one in /etc/ was kind of blank, but the one in /usr/share seems to be the one phpmyadmin is actually using. Why would there be more than one phpmyadmin config file?
    I dunno. I'm just rather handy at googling problems and finding solutions! I've never used phpmyadmin in my life!

    I presume you've set $cfg['LoginCookieStore'] = 0?

    is it supposed to be set?
    Well if you set it to 0, the cookie is destroyed only when the browser is closed. And is not given a specified timeout.
    Disclaimer: Yes I usually talk crap

  8. #8
    Join Date
    Jun 2006
    Beans
    161
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: disabling login every 1800 seconds on phpmyadmin

    Crap, that method still didn't work. Here is my config:

    Code:
    <?php
    /**
     * Please, do not edit this file. The configuration file for Debian
     * is located in the /etc/phpmyadmin directory.
     */
    
    // Load secret generated on postinst
    include('/var/lib/phpmyadmin/blowfish_secret.inc.php');
    
    // Load autoconf local config
    include('/var/lib/phpmyadmin/config.inc.php');
    
    // Load user's local config
    include('/etc/phpmyadmin/config.inc.php');
    
    // Set the default server if there is no defined
    if (!isset($cfg['Servers'])) {
        $cfg['Servers'][1]['host'] = 'localhost';
    }
    
    
    
    // Set the default values for $cfg['Servers'] entries
    for ($i=1; (!empty($cfg['Servers'][$i]['host']) || (isset($cfg['Servers'][$i]['connect_type']) && $cfg['Servers'][$i]['connect_type'] == 'socket')); $i++) {
        if (!isset($cfg['Servers'][$i]['auth_type'])) {
            $cfg['Servers'][$i]['auth_type'] = 'cookie';
        }
        if (!isset($cfg['Servers'][$i]['host'])) {
            $cfg['Servers'][$i]['host'] = 'localhost';
        }
        if (!isset($cfg['Servers'][$i]['connect_type'])) {
            $cfg['Servers'][$i]['connect_type'] = 'tcp';
        }
        if (!isset($cfg['Servers'][$i]['compress'])) {
            $cfg['Servers'][$i]['compress'] = false;
        }
        if (!isset($cfg['Servers'][$i]['extension'])) {
            $cfg['Servers'][$i]['extension'] = 'mysql';
        }
    
        $cfg['Servers'][$i]['LoginCookieStore'] = 0;
    }
    If anyone out there uses phpmyadmin and has it so they don't have to log in after 1800 seconds, could you PLEASE post your config so I can copy it?

    edit: and here is my config found in /etc/phpmyadmin:

    Code:
    <?php
    /**
     * Debian local configuration file
     *
     * This file overrides the settings made by phpMyAdmin interactive setup
     * utility.
     *
     * For example configuration see /usr/share/doc/phpmyadmin/examples/config.default.php.gz
     *
     * NOTE: do not add security sensitive data to this file (like passwords)
     * unless you really know what you're doing. If you do, any user that can
     * run PHP or CGI on your webserver will be able to read them. If you still
     * want to do this, make sure to properly secure the access to this file
     * (also on the filesystem level).
     */
    
    /**
     * Server(s) configuration
     */
    $i = 0;
    // The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
    // You can disable a server config entry by setting host to ''.
    $i++;
    
    /* Authentication type */
    //$cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    //$cfg['Servers'][$i]['host'] = 'localhost';
    //$cfg['Servers'][$i]['connect_type'] = 'tcp';
    //$cfg['Servers'][$i]['compress'] = false;
    /* Select mysqli if your server has it */
    //$cfg['Servers'][$i]['extension'] = 'mysql';
    /* Optional: User for advanced features */
    // $cfg['Servers'][$i]['controluser'] = 'pma';
    // $cfg['Servers'][$i]['controlpass'] = 'pmapass';
    /* Optional: Advanced phpMyAdmin features */
    // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    // $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
    // $cfg['Servers'][$i]['relation'] = 'pma_relation';
    // $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
    // $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
    // $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
    // $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
    // $cfg['Servers'][$i]['history'] = 'pma_history';
    // $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
    
    /*
     * End of servers configuration
     */
    
    /*
     * Directories for saving/loading files from server
     */
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';
    $cfg['Servers'][$i]['LoginCookieStore'] = 0;
    Last edited by nbv4; April 4th, 2008 at 04:09 AM.

  9. #9
    Join Date
    Oct 2006
    Beans
    Hidden!

    Re: disabling login every 1800 seconds on phpmyadmin

    I have this issue too and it drives me nuts. Thanks to this thread I now see that there are two config files (I was only changing the one in /etc)

    I also tried uncommenting this:

    Code:
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    But still no help. I figure setting cookie auth type would have helped.

    SUPER annoying. The only thing that bugs me about Ubuntu right now.

  10. #10
    Join Date
    Feb 2005
    Location
    Vancouver, Canada
    Beans
    102

    Re: disabling login every 1800 seconds on phpmyadmin

    Have a look at this debian bug report:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499399

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •