- 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_max_filesize
inphp.ini
but it didn't make any difference.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
Try by changing
post_max_size
in/etc/php.ini
file.https://wiki.phpmyadmin.net/pma/phpMyAdmin_configuration_file
Edit phpMyAdmin's
config.inc.php
and add or updateLoginCookieValidity
the value as follows:To upload more than 2M:
Search for
upload_max_filesize
inphp.ini
, and change value to64M
(for 64 Mb):Save and exit.
Restart
apache
:Finish!
How to set phpMyAdmin default 1440 second timeout higher:
locate php.ini
open the file as root to edit, find this line:
Change it to this (500000 seconds is 5.7 days)
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.
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: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:
session.gc_maxlifetime = <seconds>
php_admin_value session.gc_maxlifetime <seconds>
ini_set(‘session.gc_maxlifetime’, <seconds>);
About the second question:
You need to change both,
upload_max_filesize
andpost_max_size
in your php.ini. Thepost_max_size
value needs to be at least theupload_max_filesize
value.Don't forget to restart your server
Reference
I'm aware this post has been answered, but I've just resolved the same issue, so I thought I would add my findings to help others.
I needed to increase the PhpMyAdmin upload file size limit from default the 2,048KiB and I too changed the upload_max_filesize and post_max_size and memory_limit, but nothing changed.
It took my a while to find the problem, when I used the phpinfo(); script to identify where the PHP.ini file was it said was here: C:\Program Files (x86)\iis express\PHP\v5.5\php.ini, but I finally noticed in the PhpMyAdmin homepage that the Web server was running version: 5.6.31. So, I updated the upload, post and memory limits in the PHP.ini for both versions 5.5 and 5.6 and the import limit in PhpMyAdmin increased.