phpMyAdmin configuration

后端 未结 10 1097
刺人心
刺人心 2021-02-01 03:08
  • How do I increase phpmyadmin session timeout?
  • How do I increase phpmyadmin import file size limit(currently it says Max: 2,048KiB). I tried changing upload_
相关标签:
10条回答
  • 2021-02-01 03:40

    If you wished to keep phpMyAdmin from timing out so often, you might add this line:

    $cfg['LoginCookieValidity'] = 86400;

    By default, phpMyAdmin times out every 1440 seconds; to change this, change the session.gc_maxlifetime in php.ini as follows:

    session.gc_maxlifetime = 86400

    https://wiki.phpmyadmin.net/pma/phpMyAdmin_configuration_file

    0 讨论(0)
  • 2021-02-01 03:41

    config.inc.php > $cfg['LoginCookieValidity'] = 3600 * 9; // 9 hours

    edit from the link posted by ajreal: LoginCookieValidity

    for the second question , after changing upload_max_filesize in php.ini did you restart apache ( or whatever webserver you use ) ?

    0 讨论(0)
  • 2021-02-01 03:46

    For the first question, you need to change the $cfg[‘LoginCookieValidity’] config in the config.inc.php. Open config.inc.php in the phpMyAdmin “root” directory. Look for a line that contains this: $cfg[‘LoginCookieValidity’]. Set the value to the desired amount of seconds. If the line doesn't exist, just add it like this:

    $cfg[‘LoginCookieValidity’] = 3600; //(3600 = one hour)
    

    You will need to login again to phpmyadmin.

    This also assumes that the PHP session garbage collection is set-up accordingly. This can be done in a number of ways:

    • php.ini; add a line (or change an existing) that contains session.gc_maxlifetime = <seconds>
    • Apache configuration; add a line to the appropriate block that says php_admin_value session.gc_maxlifetime <seconds>
    • config.inc.php (phpMyAdmin); after the previously edited line, add a line with ini_set(‘session.gc_maxlifetime’, <seconds>);

    About the second question:

    You need to change both, upload_max_filesize and post_max_size in your php.ini. The post_max_size value needs to be at least the upload_max_filesize value.

    Don't forget to restart your server

    Reference

    0 讨论(0)
  • 2021-02-01 03:47

    Try by changing post_max_size in /etc/php.ini file.

    0 讨论(0)
  • 2021-02-01 03:48
    1. Edit phpMyAdmin's config.inc.php and add or update LoginCookieValidity the value as follows:

      $cfg['LoginCookieValidity'] = 3600 * 9; // 9 hours
      
    2. To upload more than 2M:

      cd /etc/php5/apache2/php.ini
      
      sudo nano php.ini
      
    3. Search for upload_max_filesize in php.ini, and change value to 64M (for 64 Mb):

      upload_max_filesize = 64M
      
    4. Save and exit.

    5. Restart apache:

      sudo /etc/init.d/apache2 restart
      
    6. Finish!

    0 讨论(0)
  • 2021-02-01 03:49

    How to set phpMyAdmin default 1440 second timeout higher:

    1. locate php.ini

      el@apollo:/var/lib/phpmyadmin$ locate php.ini
      /etc/php5/apache2/php.ini
      
    2. open the file as root to edit, find this line:

      session.gc_maxlifetime = 1440
      
    3. Change it to this (500000 seconds is 5.7 days)

      session.gc_maxlifetime = 500000
      
    4. Restart apache.

    Doing this decreases security because then it increases opportunity for cross site scripting and man in the middle attacks. It's all fun and games until you find your server is part of a botnet farming for credit cards.

    0 讨论(0)
提交回复
热议问题