I want to try the JSON1
extension for SQLite in PHP7 but it is not enabled by default.
So I have compiled a new php_sqlite3.dll
with the JSON1
extension enabled as per these instructions but when I try to start PHP I get an error;
Warning: PHP Startup: Invalid library (maybe not a PHP library) 'sqlite3'
in Unknown on line 0
What am I doing wrong?
Further info
After replacing php_sqlite3.dll
with my version, the SQLite3
class no longer works in PHP eg. this line of PHP code;
$cn = new SQLite3(':memory:');
gives this error;
Fatal error: Uncaught Error: Class 'SQLite3' not found
I compiled the new php_sqlite3.dll
by doing;
gcc -g -shared -DSQLITE_ENABLE_JSON1 sqlite3.c -o php_sqlite3.dll
Then I replaced php_sqlite3.dll
in my Windows PHP /ext
folder with the one created above.