Create db version 2 or 3

Issue #290 resolved
Nicolas Vivien created an issue

Hello,

here is some suggestion i made to pla

  • create sqlite2 or sqlite3 database

patch is based from branch-master v1.9.6

Comments (7)

  1. phpLiteAdmin repo owner

    Added option to choose between Sqlite version3 and version2 when creating database, if both versions are supported by PHP extensions. (Not tested with v2, though, as I don't have an ancient php supporting it ;)) Fixes issue #290

    → <<cset 806d286388e7>>

  2. Nicolas Vivien reporter

    Hello phpliteadmin,

    for the commit 806d286388e7, it is safe to add a condition in case Sqlite 2 is not supported:

    if(class_exists('SQLiteDatabase')){ echo "<option value='$sqlite2'>SQLite 2</option>"; }

    or disabled the option

    Regards

  3. Christopher Kramer

    Hi, I added a condition that displays the whole selectbox only if both sqlite2 and 3 are supported:

    if(class_exists('SQLiteDatabase') && (class_exists('SQLite3') || class_exists('PDO')))
    

    For most users, the select box would be unnecessary as current PHP versions (since 5.4) do not include SQLiteDatabase anymore and thus have no support for SQLite 2 anymore. I know we still support these ancient versions. But anyone still using Sqlite2 and PHP < 5.5 should really consider updating. There is no support for these php versions anymore, they most probably have lots of known security issues. Support for PHP 5.3 ended in 2014, support for 5.4 in September 2015.

  4. Nicolas Vivien reporter

    Hi, I understand your point now thank you. The reason why I suggest this option is because I have implemented this option longtime ago and wanted to share it and it was painful to add these changes to code every time I update PHPLiteAdmin. Some of my sites that I maintain still use SQLite 2 and the owner does not want to upgrade since it works fine.

  5. Log in to comment