Home  >  Article  >  Backend Development  >  在PHP 5.4.10下安装PECL扩展 sphinx-1.1.0时遇到的有关问题

在PHP 5.4.10下安装PECL扩展 sphinx-1.1.0时遇到的有关问题

WBOY
WBOYOriginal
2016-06-13 12:50:07821browse

在PHP 5.4.10下安装PECL扩展 sphinx-1.1.0时遇到的问题

????? 之前在PHP 5.2.16以及5.3.17环境下安装PECL扩展sphinx-1.1.0时,均成功.但今日在PHP 5.4.10环境下

安装sphinx-1.1.0时,却遇到错误.

????? 遇到的错误在PHP官网上作为bug由其他使用者反应了,见

????? https://bugs.php.net/bug.php?id=61241

?

????? 解决方式:

????? 1.来自PHP开发人员tony2001@php.net的回复,在SVN发布的PHP更新源码中进行了修复.

?????? 回复时间是: 2012-06-12 19:17 UTC

?????? 因为所使用的PHP是采用服务器系统安装的,因此此方式不适合.

????? 2.参照回复者andrew at cbtech dot co dot uk的回复,对sphinx-1.1.0的源码修改,再进行编译安装.

????? 下面是其回复内容:

If you change line 105 of sphinx.c from:
retval = std_hnd->read_property(object, member, type TSRMLS_CC);
to
retval = std_hnd->read_property(object, member, type TSRMLS_CC, NULL);
it compiles and seems to work.

?

????? 编辑安装方式简单描述:

# tar -xzf sphinx-1.1.0.tgz
# cd sphinx-1.1.0
# vi sphinx.c
# ./configure
# make && make install

?

????? PECL扩展的源码手动编译安装可以参见:

????? 1. http://www.php.net/manual/zh/install.pecl.phpize.php

????? 2. mac下PHP RabbitMQ amqp扩展 安装 扩展包编译

?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn