phpMyAdmin "The directory you set for upload work cannot be reached"
I know this is old but the google search for that problem points here. So here is the answer:
Debian and Ubuntu limits the access for folders. You must use the phpmyadmin folder for that.
In Ubuntu it is "/etc/phpmyadmin/" (without the quotes).
So the config would be:
$cfg['UploadDir'] = '/etc/phpmyadmin/';
First, check the upload_max_filesize in php.ini. By default it is 2M, that means, if you upload a file > 2M, it will fail. (Try to compress the SQL file and upload again.) You can change the upload_max_filesize to a bigger value (< 20M) in php.ini and restart your web server.
And, make sure the UploadDir is writable. In Linux, you can run this command to make a folder writable: chmod a+w upload
When on a server, for example, I am using HostGator, I needed to login as the root user using Putty.exe
.
Then I had to navigate to this file directory,
/usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
This line
$cfg['UploadDir'] = '';
To
$cfg['UploadDir'] = '/home/rootnameofwebsite/public_html/createAFolderHere';
That got the folders to sync up ok. I had a separate issue where it did not recognize the .dbf file I uploaded. Still trying to figure that one out. But I did try a regular .sql file and that showed up in the dropdown.