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 mess
well,in my case this error has occured when i was using ubuntu 18.04. All you need is to go to the installation directory (in ubuntu - opt/lampp/phpmyadmin) and create a folder tmp with all the suitable read/write permissions.
Follow these steps in case of ubuntu-
1.go to the PMA installation directory by typing following commands in cmd-
cd opt/lampp/phpmyadmin
2.Then type the following command-
sudo mkdir tmp && chmod 777 tmp
and then you are done..!! I hope it helps..
Create a temp directory owned by and restricted to the webserver user. Do not place it inside of the phpMyAdmin webroot. (In this example, the webserver runs as apache
):
mkdir -p /var/tmp/phpMyAdmin
chown apache:apache /var/tmp/phpMyAdmin
chmod 700 /var/tmp/phpMyAdmin
Next, set TempDir
inside of phpMyAdmin's config.inc.php
:
$cfg['TempDir'] = '/var/tmp/phpMyAdmin';
Any answer suggesting that you create /usr/share/phpmyadmin/tmp
is advocating bad security practice. This is generally true for temp directories, and explicitly stated in the official phpMyAdmin documentation:
For security reasons, all directories should be outside the tree published by webserver.
Create a tmp
folder in the base directory of the phpMyAdmin install (e.g. /usr/share/phpmyadmin/tmp
), and make sure that it is writable by the user that PHP is running under.
If the folder already exists for example from a previous installation:
chmod -R 777 PATH_TO_FOLDER
Therefore permission on subdirectories are also modified (recursively).
For me phpmyadmin dir was found inside /opt/lampp/
/opt/lampp/phpmyadmin/
root
privileges to the terminal by typing sudo su
command.mkdir -p /tmp/
) hit enterchmod 777 /tmp
phpmyadmin
directory there is a file config.inc.php
. Open it using same terminal .$cfg['TempDir'] = /tmp;
and Save.I just changed my vendor_config.php
file to define('TEMP_DIR', '/tmp/');
instead of define('TEMP_DIR', './tmp/');
This seems to work.