admin管理员组

文章数量:1290236

I want to use the latest version of sqlite (3.49.0 from this writing) in PHP.

I'm using docker and for latest docker image cli version (php:8.2-cli) sqlite3 shows the following version:

$ docker compose run --rm php php -r "echo SQLite3::version()['versionString'] . PHP_EOL;"
3.40.1

After I manually install the latest sqlite3 version via the following

RUN curl -L .tar.gz | tar xz && \
    cd sqlite-autoconf-3490000 && \
    ./configure --prefix=/usr/local && \
    make && make install && \
    cd .. && rm -rf sqlite-*

I can see that sqlite3 is at latest version

$ docker compose run --rm php sqlite3 --version
3.49.0 2025-02-06

but the PDO version is still at older version:

$ docker compose run --rm php php -r "echo SQLite3::version()['versionString'] . PHP_EOL;"
3.40.1

I want to use the latest version of sqlite (3.49.0 from this writing) in PHP.

I'm using docker and for latest docker image cli version (php:8.2-cli) sqlite3 shows the following version:

$ docker compose run --rm php php -r "echo SQLite3::version()['versionString'] . PHP_EOL;"
3.40.1

After I manually install the latest sqlite3 version via the following

RUN curl -L https://www.sqlite./2025/sqlite-autoconf-3490000.tar.gz | tar xz && \
    cd sqlite-autoconf-3490000 && \
    ./configure --prefix=/usr/local && \
    make && make install && \
    cd .. && rm -rf sqlite-*

I can see that sqlite3 is at latest version

$ docker compose run --rm php sqlite3 --version
3.49.0 2025-02-06

but the PDO version is still at older version:

$ docker compose run --rm php php -r "echo SQLite3::version()['versionString'] . PHP_EOL;"
3.40.1
Share Improve this question edited yesterday Dharman 33.4k27 gold badges101 silver badges147 bronze badges Recognized by PHP Collective asked Feb 16 at 14:52 KarloKarlo 1643 silver badges9 bronze badges 1
  • Please do not add answers to the question. If you found a solution you want to share, post it as an answer. – Dharman Commented yesterday
Add a comment  | 

1 Answer 1

Reset to default 0

You have to update the PDO extension, and specifically the sqlite3 driver extension of PDO with the updated libraries as well.

PDO is part of core, you can find the source code here: https://github/php/php-src/?tab=readme-ov-file#building-php-source-code

SQLite3 is already mentioned in the prerequisites before make.

本文标签: phpHow do I update PDO to use the latest sqlite3 versionStack Overflow