I want to play with the JSON1 extension for SQLite3 but when I do the following;
<?php
$db = new SQLite3('foo.db');
$db->loadExtension('json1.dll');
?>
I get the error;
Warning: SQLite3::loadExtension(): Unable to load extension at 'ext\json1.dll' in C:\test\json1.php on line 3
The documentation says that extension loading is disabled by default for security reasons but can be enabled by a prior call to the C interface function sqlite3_enable_load_extension().
How can I call that function, or is there another way to enable SQLite extension loading from PHP?
PS. I compiled json1.dll
using MinGW+Msys by doing;
gcc -g -shared json1.c sqlite3ext.h -o json1.dll