# Outdated SQLite version on PHP 7.4

**URL:** <https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584>\
**Category:** PHP\
**Tags:** php-740\
**Created:** [December 21, 2019, 8:38am UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584 "2019-12-21T08:38:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![staudenmeir](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/staudenmeir/32/733_2.png) [@staudenmeir](https://travis-ci.community/u/staudenmeir)\
**Post date:** [December 21, 2019, 8:38am UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584/1 "2019-12-21T08:38:21Z")

</div>

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](https://travis-ci.org/staudenmeir/travis-sqlite/builds/628039122)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 21, 2019, 9:57am UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584/2 "2019-12-21T09:57:19Z")

</div>

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](https://travis-ci.community/t/increase-sqlite-sqlite-max-variable-number-in-php-pgo-extension/4874)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 21, 2019, 6:40pm UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584/3 "2019-12-21T18:40:22Z")

</div>

> [@native-api](#):
>
> there has been a request to change an SQLite configuration parameter required by some ORMs

> [@staudenmeir](#):
>
> PHP 7.4 only provides SQLite 3.11.0

Actually, I believe, this is the reason! Travis did link PHP against the system’s `sqlite3` – because [`3.11.0` is what Xenial provides](https://packages.ubuntu.com/xenial-updates/sqlite3).

@staudenmeir, [Bionic provides `3.22.0`](https://packages.ubuntu.com/bionic-updates/sqlite3). Will that be enough for your needs?

---

<div class="post-metadata">

**Author:** ![staudenmeir](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/staudenmeir/32/733_2.png) [@staudenmeir](https://travis-ci.community/u/staudenmeir)\
**Post date:** [December 21, 2019, 11:50pm UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584/4 "2019-12-21T23:50:13Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![staudenmeir](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/staudenmeir/32/733_2.png) [@staudenmeir](https://travis-ci.community/u/staudenmeir)\
**Post date:** [January 3, 2020, 5:57pm UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584/5 "2020-01-03T17:57:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [January 3, 2020, 7:33pm UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584/6 "2020-01-03T19:33:25Z")

</div>

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/manual/en/ref.pdo-sqlite.php), [https://www.php.net/ChangeLog-7.php#PHP\_7\_4](https://www.php.net/ChangeLog-7.php#PHP_7_4), [https://www.php.net/manual/en/migration74.other-changes.php](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.

---

<div class="post-metadata">

**Author:** ![staudenmeir](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/staudenmeir/32/733_2.png) [@staudenmeir](https://travis-ci.community/u/staudenmeir)\
**Post date:** [January 3, 2020, 8:25pm UTC](https://travis-ci.community/t/outdated-sqlite-version-on-php-7-4/6584/8 "2020-01-03T20:25:38Z")

</div>

@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.
