I need the latest version of Sqlite3 on PHP 7.3.

Operating System & Version
Centos 7
cPanel & WHM Version
v86.0.4

leonidukg

Registered
Feb 22, 2020
1
0
1
Germany
cPanel Access Level
Root Administrator
Hello.
I need the latest version of Sqlite3 on PHP 7.3.
But EasyApache 4 always compiles without-sqlite3 and the system Sqlite 3.7.17 version is installed.
There are no options for selecting sqlite3 in EasyApache.
How can I compile PHP 7.3 with the new version of Sqlite3 ?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,268
1,296
363
Houston
Hello,


The package cpanel-sqlite is using version 3.27.1:

cpanel-sqlite-3.27.1-1.cp1186.x86_64

Code:
/usr/local/cpanel/3rdparty/bin/sqlite3 --version
3.27.1 2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd
Beyond that though, the only SQLite3 versions available would be what is provided by the operating system. There is no PHP version specific version of SQLite3.
 

keatliang2005

Registered
May 14, 2021
3
0
1
Malaysia
cPanel Access Level
Root Administrator
I have notice with the latest php80 and php81 the sqlite3 build version of very old

Psy Shell v0.11.8 (PHP 8.1.10 — cli) by Justin Hileman
>>> $dbh = new PDO('sqlite::memory:');
=> PDO {#4956
inTransaction: false,
attributes: {
CASE: NATURAL,
ERRMODE: EXCEPTION,
PERSISTENT: false,
DRIVER_NAME: "sqlite",
ORACLE_NULLS: NATURAL,
CLIENT_VERSION: "3.7.17",
SERVER_VERSION: "3.7.17",
STATEMENT_CLASS: [
"PDOStatement",
],
DEFAULT_FETCH_MODE: BOTH,
},
}

as with current sqlite version are 3.39.3 and many other package using newer syntax
with 3.7.17 it will break with newer library such as doctrine/dbal v3 because generated SQL syntax is not support at 3.7.17

can you guys update the base install of the sqlite for the php build ?
./configure '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr'
 

rbairwell

Well-Known Member
May 28, 2022
98
42
18
Mansfield, Nottingham, UK
cPanel Access Level
Root Administrator
Just to correct @cPanelLauren , yes /usr/local/cpanel/3rdparty/bin/sqlite3 --version (which returns 3.38.5 on my Centos v7.9.2009 server running cPanel 108.0.4), that is a cPanel specific package which won't respond to the standard "sqlite3" command (due to path settings for user accounts) and, tbh, I'm not sure how users are meant to be aware of it) and is intended for use by the cPanel system itself (for example, using RoundCube).

The "default location" for sqlite3 is /usr/bin/sqlite3 which is version 3.7.17 (2013-05-20) on my machine. Doing a quick repoquery -i sqlite shows that this version was found on the CentOS-base repo, Checking that repository for x86_64 packages confirms the latest release there is 3.7.17-8 from 28th Jan 2020.

So if you want the latest version, you will have to either compile it yourself (Hostnextra has a guide) or upgrade your operating system. AlmaLinux 9 has SQLite 3.34.1-5, CentOS 9 Stream has 3.34-5 and Ubuntu 22.04 has 3.37.2-2 (all according to pkgs.org )