Linux: How To Install Fts3 (for Sqlite3) In Php?
I tried asking the question php - Is there a binary package for php5-sqlite3 with fts3 enabled? - Ask Ubuntu - Stack Exchange; but no dice there - so I'll try here again in differe
Solution 1:
Use answer from how to enable sqlite3 for php? - Stack Overflow but instead of
$ sudo ./configureyou need
$ sudo CPPFLAGS="-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" ./configureCredits to: sqlite - fts3 manual. Just to clarify, you don't need install separate php5-sqlite3 package because if you look into http://pecl.php.net/get/sqlite3-0.6.tgz you will see that php_sqlite3 included there. Btw, important line from INSTALL file:
Make sure you have extension=sqlite3.so in your php.ini
Solution 2:
You do not need to recompile the sqlite extension. You can load an extension as:
<?php$db = new SQLite3('mysqlitedb.db');
$db->loadExtension('myExtension.so');
?>
Post a Comment for "Linux: How To Install Fts3 (for Sqlite3) In Php?"