Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dmausner opened this issue Jun 11, 2024 · 7 comments
Closed

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

dmausner opened this issue Jun 11, 2024 · 7 comments

Comments

@dmausner
Copy link

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
Copy link

tacman commented Jun 15, 2024

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
Copy link
Author

dmausner commented Jun 15, 2024 via email

@tacman
Copy link

tacman commented Jun 15, 2024

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
Copy link
Author

dmausner commented Jun 15, 2024 via email

@tacman
Copy link

tacman commented Jun 16, 2024

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
Copy link
Member

jimwins commented Jul 20, 2024

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
Copy link
Member

cmb69 commented Jul 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants