duangu9997 2011-11-29 16:27
浏览 95
已采纳

使用PHP 5.3+的CentOS 6上的xapian

I've got a 64bit server with CentOS 6 and PHP 5.3 installed

php-5.3.2-6.el6_0.1.x86_64

I've installed xapian using RPMs from their website

rpm-eprints-org-xapian-6-1.noarch
xapian-bindings-php-1.2.7-1.x86_64
xapian-core-libs-1.2.7-1.x86_64
xapian-bindings-1.2.7-1.x86_64
xapian-core-1.2.7-1.x86_64

Now when I try to use the xapian library from PHP through Apache, I get this error:

Call to undefined function dl() in /usr/share/php/xapian.php on line 22

After some Googleing I found that dl() is no longer working in PHP 5.3+. I've enabled enable_dl in php.ini, didn't do anything. I've not been able to find any solution to this problem anywhere. I guess there aren't many people using CentOS 6 at the moment?

What can I do?

  • 写回答

1条回答 默认 最新

  • dph58509 2011-11-29 16:38
    关注

    Since the xapian-bindings are a PHP-extension you could just load it by adding the following to your php.ini:

    extension = xapian.so
    

    Btw. the dl-manual says that dl is just disabled for certain "SAPIs" (and apparently mod_php is one of them).

    One alternative would be to try php-cgi.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决