LInux:如何在PHP中安装FTS3(对于sqlite3)? [英] LInux: How to install FTS3 (for sqlite3) in PHP?
问题描述
我尝试问一个问题 php-是否有启用fts3的php5-sqlite3的二进制软件包? -询问Ubuntu-Stack Exchange ;但那里没有骰子-因此,我将以不同的方式在这里再次尝试:如何在Ubuntu Linux服务器上为PHP启用SQLite3下的FTS3?
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 different words: how can one enable FTS3 under SQLite3 for php on an Ubuntu Linux server?
我想使用Sqlite为Mediawiki启用FTS3-通常会出现"no such module: fts3
"错误.
I would want to enable FTS3 for a Mediawiki using Sqlite - and I typically get the "no such module: fts3
" error.
我发现:
- 如何为PHP启用sqlite3? -堆栈溢出-建议删除
php5-sqlite3
并从源代码安装sqlite3(尽管没有具体提及FTS3) - 旧Nabble-SQLite-FTS3索引PHP< 5.3 其中表示:
- how to enable sqlite3 for php? - Stack Overflow - where it is recommended that
php5-sqlite3
is removed and sqlite3 is installed from source (though no specific mention of FTS3) - Old Nabble - SQLite - FTS3 indexing in PHP < 5.3 which says:
>,这是错误:
>
>'SQLSTATE [HY000]:常规错误:1没有这样的模块:fts3'
>
> and here is the error:
>
> 'SQLSTATE[HY000]: General error: 1 no such module: fts3'
>
有一个编译时选项:SQLITE_ENABLE_FTS3
There is a compile-time option: SQLITE_ENABLE_FTS3
...,我想这最终会说,除了从源代码构建用于PHP的sqlite之外,没有其他方法可以为PHP的SQlite3激活FTS3?这对我来说不是一个好选择,因为我没有生产服务器上的权限...这就是为什么我要再次询问:是否有某种二进制软件包可以帮助我启用FTS3?
... which, I guess, eventually says that there is no other way to activate FTS3 for SQlite3 for PHP - other than building sqlite for php from source? That would not be a good option for me, since I have no rights on the production server... which is why I'd ask again: is there some sort of a binary package to help me get FTS3 enabled?
如果没有二进制包,我想PHP的sqlite3部分将被编译为.so
对象.有没有办法说服PHP以某种方式为特定服务器目录加载外部" .so
(类似于
If there isn't a binary package for that - I imagine the sqlite3 part for php will be compiled as an .so
object. Is there a way to persuade PHP to, somehow, load an "external" .so
just for a particular server directory (akin to how ini_set is used to change display_errors
locally)?
奖励问题:说我已经从源代码启用了FTS3的情况下安装了sqlite3; PHP将在phpinfo()
中显示某种消息/指示,该消息是什么?
Bonus question: Say I've installed sqlite3 with FTS3 enabled from source; will PHP show some sort of a message/indication in phpinfo()
, and what will that message be?
在此先感谢您的回答,
干杯!
Thanks in advance for any answers,
Cheers!
推荐答案
使用如何为PHP启用sqlite3? -堆栈溢出,而不是
$ sudo ./configure
您需要
$ sudo CPPFLAGS="-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" ./configure
提供给: sqlite-fts3手册.只是为了澄清,您不需要安装单独的php5-sqlite3软件包,因为如果您查看 http://pecl.php.net/get/sqlite3-0.6.tgz ,您将看到其中包含了php_sqlite3.顺便说一句,INSTALL文件中的重要行:
Credits 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:
确保您的php.ini文件中具有extension = sqlite3.so
Make sure you have extension=sqlite3.so in your php.ini
这篇关于LInux:如何在PHP中安装FTS3(对于sqlite3)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!