Get Error "Directory does not exist or is not a directory" but it is.

Issue #324 invalid
Former user created an issue

After I login I get this error: The directory you specified to scan for databases does not exist or is not a directory.

I'm using // Version: 1.9.7.1

The start of my phpliteadmin file says:

//password to gain access
$password = 'passwordremoved';

//directory relative to this file to search for databases (if false, manually list databases in the $databases variable)
$directory = '/var/lib/sambashare/data';

//whether or not to scan the subdirectories of the above directory infinitely deep
$subdirectories = false;

//if the above $directory variable is set to false, you must specify the databases manually in an array as the next variable
//if any of the databases do not exist as they are referenced by their path, they will be created automatically

/* ---- Interface settings ---- */

// Theme! If you want to change theme, save the CSS file in same folder of phpliteadmin or in folder "themes"
$theme = 'phpliteadmin.css';

// the default language! If you want to change it, save the language file in same folder of phpliteadmin or in folder "languages"
// More about localizations (downloads, how to translate etc.): https://bitbucket.org/phpliteadmin/public/wiki/Localization
$language = 'en';

// set default number of rows. You need to relog after changing the number
$rowsNum = 30;

// reduce string characters by a number bigger than 10
$charsNum = 300;

// maximum number of SQL queries to save in the history
$maxSavedQueries = 10;

/* ---- Custom functions ---- */
//a list of custom functions that can be applied to columns in the databases
//make sure to define every function below if it is not a core PHP function
$custom_functions = array(
        'md5', 'sha1', 'time', 'strtotime',
        // add the names of your custom functions to this array
        /* 'leet_text', */
);

// define your custom functions here
/*
function leet_text($value)
{
  return strtr($value, 'eaAsSOl', '344zZ01');
}
*/


/* ---- Advanced options ---- */

//changing the following variable allows multiple phpLiteAdmin installs to work under the same domain.
$cookie_name = 'pla3412';

//whether or not to put the app in debug mode where errors are outputted
$debug = true;

// the user is allowed to create databases with only these extensions
$allowed_extensions = array('db','db3','sqlite','sqlite3');


// English language-texts.
// Read our wiki on how to translate: https://bitbucket.org/phpliteadmin/public/wiki/Localization

I tried setting the owner of both the file and the directory as root and www-data, and it's been chmod 777 and I still get the error: -rwxrwxrwx 1 www-data www-data 2490368 Jun 17 21:37

Current PHP version: 7.0.18-0ubuntu0.16.04.1.

I've used this SQL database file in other versions of PHP, but had to resinstall my computer. Can access this file using other methods.

Comments (3)

  1. phpLiteAdmin repo owner

    Does the www-data user have access to the parent directories? E.g. if /var/lib/sambashare is 660 and owned by samba:samba, it won't work.

  2. Log in to comment