Web lists-archives.com

Re: JSON1 extension for SQLite

So this cannot be solved. I've changed my code from PDO to SQLite3 and get this error message instead:

$this->connection->loadExtension('json1');   // or json1.dll

--> Not supported in multithreaded Web servers

XAMPP does not support letting PHP's SQLite load extensions. For whatever reason. Maybe they're not capable of getting it right, I don't know. XAMPP has disappointed and (negatively) surprised me before.


So I need to find another solution. That sucks.


Von: Yves Goergen <nospam.list@xxxxxxxxxxxxxxx>
Gesendet: Di, 2019-02-19 23:54 +0100
I have found the archive (x86 and PHP 7.0) and the DLL in it. But when I
try to load the extension, I get the error message "not authorized".
Seems I'm not allowed to load extensions. And there doesn't seem to be a
way to enable it.



Maybe I need to replace PDO with the dedicated SQLite 3 client functions
in PHP.


Von: Jan Ehrhardt <phpdev@xxxxxxxxxxx>
Gesendet: So, 2019-02-17 14:09 +0100
Yves Goergen in php.general (Fri, 15 Feb 2019 23:41:29 +0100):
I've already asked in their support forum and they say that XAMPP only
includes PHP's official Windows builds. I've looked around and found two
SQLite-related files: php_pdo_sqlite.dll and php_sqlite3.dll, both are
around 840 kB. There is no DLL named like json1.

Intriguing issue. Could you try the json1.dll inside

See https://www.apachelounge.com/viewtopic.php?t=6359 for info about
these builds.

Note: sqlite3.extension_dir in your php.ini should contain the full path
to the directory with the json1.dll.

I tested loading of the extension with the following php.ini:

sqlite3.extension_dir = "N:\php-sdk\php73dev\x64\Release\php-7.3.2"
extension_dir = "ext"

The json1.dll should also work with your XAMPP, AFAIK.