LInux:如何在 PHP 中安装 FTS3(对于 sqlite3)?
我尝试问这个问题 php - 是否有启用 fts3 的 php5-sqlite3 二进制包? - 询问 Ubuntu - Stack Exchange;但那里没有骰子 - 所以我会用不同的话再次尝试:如何在 Ubuntu Linux 服务器上的 SQLite3 for php 下启用 FTS3?
我想使用 Sqlite 为 Mediawiki 启用 FTS3 - 我通常会收到“没有这样的模块:fts3
”错误。
我发现:
- 如何为 php 启用 sqlite3? - Stack Overflow - 建议删除
php5-sqlite3
并从源代码安装 sqlite3(尽管没有具体提及 FTS3) - 旧 Nabble - SQLite - FTS3 索引PHP < 5.3 其中说:
>这是错误:
>
> 'SQLSTATE[HY000]:一般错误:1 没有这样的模块:fts3'
>有一个编译时选项:SQLITE_ENABLE_FTS3
...,我猜,最终说没有其他方法可以为 SQlite3 for PHP 激活 FTS3 - 除了从源代码构建用于 php 的 sqlite 之外?这对我来说不是一个好的选择,因为我在生产服务器上没有权限...这就是为什么我会再次问:是否有某种二进制包可以帮助我启用 FTS3?
如果没有二进制包 - 我想 php 的 sqlite3 部分将被编译为 .so
对象。有没有办法说服 PHP 以某种方式加载“外部”.so
仅针对特定服务器目录(类似于 ini_set 用于在本地更改 display_errors
)?
编辑:额外问题:假设我已经安装了 sqlite3,并且从源代码启用了 FTS3; PHP 是否会在 phpinfo()
中显示某种消息/指示,该消息会是什么?
预先感谢您的任何答复,
干杯!
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?
I would want to enable FTS3 for a Mediawiki using Sqlite - and I typically get the "no such module: fts3
" error.
I have found:
- 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:
> and here is the error:
>
> 'SQLSTATE[HY000]: General error: 1 no such module: fts3'
>There is a compile-time option: SQLITE_ENABLE_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?
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)?
EDIT: 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用如何为php启用sqlite3? - Stack Overflow,但
您需要
学分:sqlite - fts3 手册。只是为了澄清,您不需要安装单独的 php5-sqlite3 软件包,因为如果您查看 http://pecl.php.net/get/sqlite3-0.6.tgz 你会看到 php_sqlite3 包含在那里。顺便说一句,安装文件中的重要一行:
Use answer from how to enable sqlite3 for php? - Stack Overflow but instead of
you need
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:
您不需要重新编译 sqlite 扩展。您可以加载扩展:
https://secure.php.net/manual /en/sqlite3.loadextension.php
You do not need to recompile the sqlite extension. You can load an extension as:
https://secure.php.net/manual/en/sqlite3.loadextension.php