"No tables in database" if WAL files are not writable
I'm trying to install phpliteadmin on a raspberry. I installed sqlite3, apache and php
sudo apt-get install sqlite3 -y sudo apt-get install apache2 -y sudo apt-get install php libapache2-mod-php -y when i know try to start phpliteadmin in an empty directory and try to create a database i get the following error:
PDO: installed PDO SQLite Driver: not installed SQLite3: not installed SQLiteDatabase: not installed when i install the pdo sqlite driver the errot goes away but i want to use the other databse php extensions, because with the PDO SQLite Driver i cannot read database with WAL set. why do i get the error SQLite3: not installed when it is installed. is there anything missing?
Comments (4)
-
repo owner -
reporter I know now the cause of the problems with WAL. There is a similar Issue (https://bitbucket.org/phpliteadmin/public/issues/90/does-not-support-wal) which could have the same cause. My datbase files .db, .db-shm, *.db-wal have been readonly for the phpliteadmin user (www-data). The result was 'No tables in database'. After changing them to write-access for this user, everything was fine and i can see the tables.
-
repo owner So the remaining issue is basically that phpLiteAdmin does not complain that these files are not writable, right?
-
repo owner - changed title to "No tables in database" if WAL files are not writable
- changed milestone to 1.9.9
- Log in to comment
The sqlite package you installed is not PHP's SQLite extension, it is the standalone SQLite binary that has nothing to do with PHP. To install the SQlite extension of PHP you need one of these, depending on your PHP version:
See https://bitbucket.org/phpliteadmin/public/wiki/Installation
You cannot use the SQLiteDatabase extension for SQLite 2 on most modern Distributions, as it is deprecated and not available in most Linux distributions.
If you install the package mentioned above, you most likely have both SQLite3 and the PDO Sqlite extension available. phpLiteAdmin will use PDO as first choice, but you can try to force it to use SQLite3 by changing
to
in phpliteadmin.php
Please explain further what your problem with PDO's SQlite extension is. phpLiteAdmin currently does not use WAL anyway.