T
T
tuxx2016-02-01 08:27:03
PHP
tuxx, 2016-02-01 08:27:03

SQLite PHP "unable to open database file"?

When trying to work with SQLite from PHP, I get the error "unable to open database file". In the configs, I registered sqlite3.extension_dir and set permissions for this folder to 777 and the files inside it.
The code that gives the error:

$_db = new SQLite3($_config['database'].'.sqlite3');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2016-02-01
@tuxx

var_dump(is_file($_config['database'].'.sqlite3'), $_config['database'].'.sqlite3');

if false - correct the path to the file (it will be displayed in the second line)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question