Synology and php7

Issue #353 resolved
finanalyst created an issue

I've been using phpLiteAdmin for a while on a Synology NAS.

Then I changed the php version from 5.6 to 7.

phpLiteAdmin failed. Got (after login):

There was a problem setting up your database, <my database>. An attempt will be made to find out what's going on so you can fix the problem more easily.

Checking supported SQLite PHP extensions...

PDO: installed
PDO SQLite Driver: not installed
SQLite3: installed
SQLiteDatabase: not installed

...done.

The problem cannot be diagnosed properly. Please file an issue report at https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open.

Changing back from php7 to php5.6, and the database is accessible.

Other internet activated php programs can access and write to it when running php7, so the sqlite3 php module works, the file ownership and permissions issues have been resolved.

Synology is a proprietary form of linux.

It is easy to switch between php 5.6 and php 7, but I would prefer to use php7.

I am using the most uptodate version for my NAS (DSM 6.1.5-15254 on a DS213) and updated all packages.

I looked at the http log and sys logs. Nothing there. I could not find php7 log file, though php.ini has error logging on.

Comments (7)

  1. phpLiteAdmin repo owner

    Strange. Please try this:

    • create a new folder somewhere
    • change the folder that phpLiteAdmin scans for databases to this empty folder
    • open phpLiteAdmin and try to create a database with it. Does it work?
    • does the same error message reappear when trying to work with the empty db?

    Also take a close look at the file name given by the error message. Is this really your SQLite 3 database? Especially, 100% sure that it is not an SQlite 2 database?

    Also, if you currently use the stable version, please have a try with the development version, if I remember correctly there was some change regarding php7: https://www.phpliteadmin.org/phpliteadmin-dev.zip

  2. finanalyst reporter

    Thanks for rapid response!!

    Definitely strange. As I said, code works perfectly for php5.6, but not php7 (on Synology).

    1. created empty writable directory ./test (relative to location of phpliteadmin.php). Login ok. Empty dir confirmed. Program asked for new database name. Input 'new.sqlite3'. got:
    There was a problem setting up your database, ./test/new.sqlite3. An attempt will be made to find out what's going on so you can fix the problem more easily.
    
    Checking supported SQLite PHP extensions...
    
    PDO: installed
    PDO SQLite Driver: not installed
    SQLite3: installed
    SQLiteDatabase: not installed
    
    ...done.
    
    1. I only use sqlite3 and these are new databases, no legacy code.

    2. Downloaded development version, placed in same directory as database, exactly the same response.

  3. phpLiteAdmin repo owner

    mmmh... ok, so I changed something. phpLiteAdmin tried to use PDO if the PDO-class was there, even if the sqlite-driver was not there. Normally this should fail and it would continue to try the SQLite3 extension, but who knows. So now it checks for the sqlite-pdo-driver and skips pdo if its not there. Please try whether this works for you. You can get the dev version here: https://www.phpliteadmin.org/phpliteadmin-dev.zip

    I just noticed there seems to be some weird caching problem with the download of the dev version. So please check if the "Last updated" comment says "2018-02-23" in line 6. If it doesn't, try another browser or clean your cache.

    Just for the record: I just tried phpLiteAdmin with PHP 7.1 on Ubuntu 17.10 without problems. But you cannot remove the pdo-sqlite-driver on ubuntu easily without also removing the sqlite3 extension, so I could not test your exact case.

  4. finanalyst reporter

    Sorry about the delay. Went hiking and other stuff to do. Good news: latest version works as expected!

    a) I also had the download problem. Emptied cache and got the updated version.

    b) Synology is not an Ubuntu distro. It uses a proprietary Linux distribution and quite a few of the 'normal' GNU tools are missing. Synology uses an ARM processor, so there may be something in the ARM php7 toolchain that is not the same as AMD/Intel.

    [I normally use Ubuntu and I haven't noticed any php7 problems with Ubuntu.]

    Any way, the latest version seems to work.

    Thank you VERY much for the help.

  5. finanalyst reporter

    Just a note. Sent a $50 contribution to phpliteadmin team in appreciation. Receipt # 6J150627WX1268535 Have a good day. Richard

  6. Log in to comment