Outdated SQLite version on PHP 7.4

While PHP 7.3 comes with SQLite 3.28.0, PHP 7.4 only provides SQLite 3.11.0. This version was released in 2016 and is missing a lot of features.

Can you please update it? Thanks!

https://travis-ci.org/staudenmeir/travis-sqlite/builds/628039122

While you are at it, there has been a request to change an SQLite configuration parameter required by some ORMs: Increase SQLite SQLITE_MAX_VARIABLE_NUMBER in PHP PGO extension

Actually, I believe, this is the reason! Travis did link PHP against the system’s sqlite3 – because 3.11.0 is what Xenial provides.

@staudenmeir, Bionic provides 3.22.0. Will that be enough for your needs?

@native-api Thanks for the tip.

Unfortunately, SQLite 3.22.0 is not sufficient for all my projects, some require 3.24.0 or 3.25.0.

I’m trying to understand how exactly PHP accesses the SQLite library.

How come the PHP 7.3 machine (Ubuntu 16.04 and 18.04) provides SQLite 3.28.0 while both SQLite packages (libsqlite3 and sqlite3) are on 3.22.0? Does the PHP installation have its own SQLite library and can I update it myself?

Okay, I see the reason. It turns out, PHP 7.4 no longer bundles a (newer) private copy of libsqlite3 (see https://www.php.net/manual/en/ref.pdo-sqlite.php, https://www.php.net/ChangeLog-7.php#PHP_7_4, https://www.php.net/manual/en/migration74.other-changes.php).

So now the default build configuration (which is what Travis provides) is built against whatever version the distro supplies – which for Ubuntu are the aforementioned versions.


So you’ll need to work with PHP developers to figure out if it’s possible and how to hook 7.4 to a newer private copy of libsqlite3 – as it was their decision to change the software’s scope of supply.

It’s up to Travis staff whether to implement the result as the default, but you can always build a custom PHP version from source and use that.

1 Like

@native-api Thanks for the links and your help!

I’ve compiled the latest libsqlite3.so library myself and tried replacing the installed version on a local Ubuntu machine, but I’m only getting “could not find driver” errors. I’ll keep looking for an answer.

Imprint