Description
Description
Apologies if this isn't the right place to ask a question like this, but am I understanding correctly that compiling PHP with PDO_SQLITE_OMIT_LOAD_EXTENSION=0
adds a loadExtension()
method to PDO\Sqlite
, letting developers load SQLite extensions?
(Added in #12804)
See:
php-src/ext/pdo_sqlite/config.m4
Line 28 in 4e9cde7
php-src/ext/pdo_sqlite/pdo_sqlite.c
Lines 69 to 71 in 4e9cde7
I'm curious why this is omitted by default. The RFC clarifies that the approach used in the PR above only allows loading extensions using the C API, not SQLite statements, so there shouldn't be any risks?
Is it because the sqlite library on the server may be compiled with SQLITE_OMIT_LOAD_EXTENSION
and the method has no way of knowing that?
Being able to load SQLite extensions in PDO, without recompiling PHP, would be very helpful imo since there's a decent number of questions online asking how to achieve certain things with PDO (which is often a requirement e.g. in Laravel's ORM) vs the SQLite3 class directly.