php / web-php

The www.php.net site
http://www.php.net
Other
835 stars 534 forks source link

Request to compile php_sqlite3 with latest source from sqlite.org #1005

Closed dmausner closed 2 months ago

dmausner commented 3 months ago

The Sqlite team add new SQL function features in minor releases. The Windows release of PHP 8.3.8 contains Sqlite 3.40.x, but the latest source at sqlite.org is 3.46. Thus, the sqlite3 command line is 3.46 and contains new features; but PHP sqlite3 extension does not. Now, SQL that works OK at the command line, may fail when executed within PHP. This is a request to upgrade the sqlite3 source each time a PHP upgrade is finalized, so that php_sqlite3.dll is always up-to-date.

tacman commented 3 months ago

On a related note, is there a way to document the compile-time options? I think ENABLE_JSON1 is compiled in, I'm showing for php 8.3 that it's running Sqlite 3.37.2 on my ubuntu version.

I imagine there's a way to bump the sqlite version (as of 3.38 JSON is enabled unless it was explicitly omitted in the compile).

In short, I'm just trying to find out if I can safely use JSON functions in SQLite with all standard installs of PHP 8.3.

dmausner commented 3 months ago

This is the very issue I cited. One does not know, in advance, which Sqlite release will be compiled or linked into the next PHP release.

You can look at phpinfo() output to see the compiled options and the Sqlite version number.

But it is disappointing when Sqlite releases a new feature or correction, but PHP's next release contains Sqlite from many months and many releases ago.

I use sury.org to keep up with PHP for Linux, and php.net for Windows. Neither incorporates the latest Sqlite. I wrote to Sury and he questioned the need for the latest.

I have 8.3.8 for Windows, and it contains Sqlite 3.40; the latest is 3.46, containing various changes in JSON storage.

I have not located a process for upgrading just php_sqlite.

dave mausner. +1-312-925-3694. Rem tene, verba sequentur. (Cato) Just show me the code. (Dave)

On Sat, Jun 15, 2024, 06:48 Tac Tacelosky @.***> wrote:

On a related note, is there a way to document the compile-time options? I think ENABLE_JSON1 is compiled in, I'm showing for php 8.3 that it's running Sqlite 3.37.2 on my ubuntu version.

I imagine there's a way to bump the sqlite version (as of 3.4 JSON is enabled unless it was explicitly omitted in the compile).

In short, I'm just trying to find out if I can safely use JSON functions in SQLite with all standard installs of PHP 8.3.

— Reply to this email directly, view it on GitHub https://github.com/php/web-php/issues/1005#issuecomment-2169386385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7KS5H2GLTSYRPCULQN7W3ZHQSZNAVCNFSM6AAAAABJEOL4LWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRZGM4DMMZYGU . You are receiving this because you authored the thread.Message ID: @.***>

tacman commented 3 months ago

he questioned the need for the latest.

The version I'd really love to have is where jsonb is supported (released in early 2024), so that the JSON text doesn't need to be reparsed on every call. Somewhat smaller and significantly faster.

I use sqlite as a portable storage for a key/value lookup in my PHP apps, and it works great for strings. It's functional for JSON, but smaller and faster would be welcome!

I believe the current version with the latest PHP 8.3 is from January of 2022.

dmausner commented 3 months ago

JSONB is a perfect example of this problem. PHP packagers may not realize that Sqlite minor releases sometimes contain major feature additions.

dave mausner. +1-312-925-3694. Rem tene, verba sequentur. (Cato) Just show me the code. (Dave)

On Sat, Jun 15, 2024, 09:45 Tac Tacelosky @.***> wrote:

he questioned the need for the latest.

The version I'd really love to have is where jsonb is supported (released in early 2024), so that the JSON text doesn't need to be reparsed on every call. Somewhat smaller and significantly faster.

I use as a portable storage for a key/value lookup, and it works great for strings. It's functional for JSON, but smaller and faster would be welcome!

I believe the current version with the latest PHP 8.3 is from January of 2022.

— Reply to this email directly, view it on GitHub https://github.com/php/web-php/issues/1005#issuecomment-2169824222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7KS5GHDPFGCWGTTLVMJTLZHRHRHAVCNFSM6AAAAABJEOL4LWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRZHAZDIMRSGI . You are receiving this because you authored the thread.Message ID: @.***>

tacman commented 3 months ago

So I updated to the latest Ubuntu (which happens to be an LTS) and see that I'm now at 3.45.1, which is enough to get JSONB. Alas, now I have to figure out how to update the server...

jimwins commented 2 months ago

This isn't a website issue, it's an issue for the Windows build team (https://windows.php.net). Someone will need to reassign this issue to them. Maybe @dalehhirt can help?

cmb69 commented 2 months ago

The update to the latest SQLite3 version is relevant for https://github.com/winlibs/sqlite3, since this is the repo from which the sqlite3 binaries for PHP on Windows are usually built. Note that there is already a respective PR. And I have created a respective branch; I need to build and test this version, though.

To see which SQLite3 versions are used for the official Windows builds, see the respective series files.

You can see how the builds are actually done in https://github.com/winlibs/winlib-builder/blob/master/.github/workflows/sqlite3.yml. Most relevant is the Makefile that is run during these builds where you can see the compile time options which are used. Any changes to these options should be requested via https://github.com/php/php-src/issues (further discussion about that may be done on the Windows Internals list).

@jimwins, note that the Windows build team has practically dissolved. While I'm still doing the Windows builds, and will try to do some dependency updates for PHP 8.4, most of the work (most notably PECL DLL builds) is and will be done via https://github.com/php/php-windows-builder, where @shivammathur is the most appropriate contact.

Given that this ticket is in the wrong repository, and that the SQLite3 update is already tracked appropriately, I'm closing this ticket. Users who want to request further features to be built in to SQLite3, should start by filing an issue at https://github.com/php/php-src/issues.