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

Plugin should run more extensive checks #32

Open
xavivars opened this issue Apr 20, 2023 · 2 comments
Open

Plugin should run more extensive checks #32

xavivars opened this issue Apr 20, 2023 · 2 comments

Comments

@xavivars
Copy link

Currently, the plugin says your system is ready as soon as the host has SQLite and SQLite3 class exists.

But MATH functions (like FLOOR) are not available before SQLite 3.35 [1]. While that version is more than 2 years old, Linux distros like Debian stable [2] (which is the one where the WordPress 7.x Docker images are based from [3]) still have 3.34.

IMHO, the plugin should make sure all the TOKENs it supports and creates SQLIte queries for (like FLOOR [4]) are supported in the server, so maybe a version check should be done against the SQLite3 version running on the server.

[1] https://www.sqlite.org/changes.html#version_3_35_0
[2] https://packages.debian.org/bullseye/libsqlite3-0
[3] https://hub.docker.com/layers/library/wordpress/php7.4-fpm/images/sha256-08a1cb1fbe022cd08d5d19e6f95ab549194927959a297da41590d4f2d884f7b4?context=explore
[4] https://github.com/WordPress/sqlite-database-integration/blob/main/wp-includes/sqlite/class-wp-sqlite-lexer.php#L919

@abhibeckert
Copy link

abhibeckert commented Aug 3, 2023

Does WordPress actually use FLOOR() though? I'm using SQLite 3.34 and this plugin works floorlessly (sorry).

I'm sure some plugins require it - but then it should be the plugin that checks the database version.

@xavivars
Copy link
Author

xavivars commented Aug 3, 2023

If the idea is for this plugin to "transparently" replace the DB, so that no-one (neither core nor plugins) need to know that you are using SQLite, I don't think plugins are the ones who would need to check the version.

And making sure that top plugins are working should be a goal for this project. In my case, the plugin that was failing was Wordfence (top 11 WordPress.org most used plugin according to https://wordpress.org/plugins/browse/popular/)

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

No branches or pull requests

2 participants