upload_
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
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 ) ?
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:
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
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
Try by changing post_max_size
in /etc/php.ini
file.
Edit phpMyAdmin's config.inc.php
and add or update LoginCookieValidity
the value as follows:
$cfg['LoginCookieValidity'] = 3600 * 9; // 9 hours
To upload more than 2M:
cd /etc/php5/apache2/php.ini
sudo nano php.ini
Search for upload_max_filesize
in php.ini
, and change value to 64M
(for 64 Mb):
upload_max_filesize = 64M
Save and exit.
Restart apache
:
sudo /etc/init.d/apache2 restart
Finish!
How to set phpMyAdmin default 1440 second timeout higher:
locate php.ini
el@apollo:/var/lib/phpmyadmin$ locate php.ini
/etc/php5/apache2/php.ini
open the file as root to edit, find this line:
session.gc_maxlifetime = 1440
Change it to this (500000 seconds is 5.7 days)
session.gc_maxlifetime = 500000
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.