Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpMyAdmin "The directory you set for upload work cannot be reached"

Tags:

phpmyadmin

I am uploading a 24mb sql file and have been following the instructions to setup an upload dir for phpmyadmin using $cfg['UploadDir']. Unfortunately it is not working.

I have created a folder inside my phpMyAdmin folder called 'upload'.

In my config.inc.php I have put the following:

$cfg['UploadDir'] = 'upload';

This config was wizard created by PMA.

I have also tried:

$cfg['UploadDir'] = './upload';
$cfg['UploadDir'] = '/absolute_php_my_admin_address/upload';

I've also tried all those variations with a trailing '/' on the end.

I've found many threads on the web with the exact problem. My upload folder has the same permissions and ownership as the parent PMA directory. I am also not running in Safe mode.

Have you run into this issue and solved it? Running PMA 3.5.2 on Redhat 5.

like image 452
willdanceforfun Avatar asked Jul 11 '12 08:07

willdanceforfun


1 Answers

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/';
like image 93
Diego Castro Avatar answered Nov 03 '22 13:11

Diego Castro