phpphpmyadmin

Temp Dir is not accessible phpmyadmin


Upon trying to establish a connection with phpMyAdmin Im getting the error:

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

I have looked on here at some solutions and I am still confused.

Do I need to create a new tmp folder within phpmyadmin and make it executable. Does a tmp folder need to be nested in xamppfiles/share

How do I resolve this.


Solution

  • I was having this same issue on update to phpMyAdmin 4.8.0.1. Without changing permissions or adding any folders, you should open your $PMA-DIR/config.inc.php and edit the following section:

    EDIT: While using the system /tmp will work, it does present a security issue.
    The recommended solution is to create a tmp directory inside your $PMA-DIR and assign ownership to your webserver user (www-data, nginx, apache). Then reference that directory in the configuration. The following is edited to reflect that scenario:

     * Directories for saving/loading files from server
     */
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';
    

    Add $cfg['TempDir'] = 'tmp'; to the file. I made mine look like this:

    /*
     * Directories for saving/loading files from server
     */
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';
    $cfg['TempDir'] = 'tmp';
    

    If you already had this entry in your config.inc.php then make sure that the entry is correct.

    Refresh phpMyAdmin in the browser and the error should be cleared.