Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in phpMyAdmin after updating to v4.8.0: The $cfg['TempDir'] (./tmp/) is not accessible

phpMyAdmin worked fine with v4.7.9. Now after updating to v4.8.0 today (replacing the old phpmyadmin folder against the new one) I'm getting this message in phpMyAdmin:

The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

I added the folder ./tmp/ like like this: /usr/share/tmp

phpMyAdmin is on: /usr/share/phpmyadmin

This didn't change anything.

Who know this error? What can I do?

like image 939
David Avatar asked Apr 09 '18 09:04

David


3 Answers

Solution was to create a folder called tmp like this: /usr/share/phpmyadmin/tmp.

Also make sure that the user (or group) running the webserver (e.g. Apache) has write access to the newly created tmp folder. Consequently, change the ownership to that user or add write access for all users. The latter one might not be really advisable.

like image 152
David Avatar answered Nov 12 '22 02:11

David


simple fix is to create tmp dir in your phpmyadmin dir and set permission to 777

mkdir tmp && chmod 777 tmp

then

update your config.inc.php file add that line

$cfg['TempDir'] = 'tmp';
like image 53
user889030 Avatar answered Nov 12 '22 01:11

user889030


I had this same problem on Ubuntu 18.04 when I replaced the phpMyAdmin version from the package repository (v4.6.6) with the latest version (4.8.0). I don't know if you are running on Ubuntu, but maybe my response will be helpful to you (or others) who encounter something similar.

I put the new version in the standard location, /usr/share/phpmyadmin/, but Ubuntu's package installation of PMA puts some configuration settings in other places (see /etc/phpmyadmin/ and /var/lib/phpmyadmin/). I found this setting in /etc/phpmyadmin/apache.conf:

php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp

and sure enough that directory had been created and had the proper permissions. Wanting to stay as close as possible to the package installation settings, I made this change in /usr/share/phpmyadmin/libraries/vendor_config.php and pointed directly to that folder:

//define('TEMP_DIR', './tmp/');
define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');

This setting is picked up by /usr/share/phpmyadmin/libraries/config.default.php (which you are not supposed to edit) to set $cfg['TempDir'].

like image 17
wevrem Avatar answered Nov 12 '22 02:11

wevrem