安装PHP sphinx扩展 sphinx-1.1.0/sphinx.c:105:2: error: too few arguments 错误
2014-06-22 11:40
459 查看
表现:
/home/sphinx-1.1.0/sphinx.c: In function ‘php_sphinx_client_read_property’:
/home/sphinx-1.1.0/sphinx.c:105:2: error: too few arguments to function ‘std_hnd->read_property’
/home/sphinx-1.1.0/sphinx.c: In function ‘zim_SphinxClient_updateAttributes’:
/home/sphinx-1.1.0/sphinx.c:1040:6: warning: passing argument 2 of ‘memset’ makes integer from pointer without a cast [enabled by default]
/usr/include/x86_64-linux-gnu/bits/string3.h:77:1: note: expected ‘int’ but argument is of type ‘void *’
/home/sphinx-1.1.0/sphinx.c: In function ‘zm_startup_sphinx’:
/home/sphinx-1.1.0/sphinx.c:1888:43: warning: assignment from incompatible pointer type [enabled by default]
sphinx-1.1.0/sphinx.c:105:2: error: too few arguments
解决
之前在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.
编辑安装方式简单描述:
Shell代码
# tar -xzf sphinx-1.1.0.tgz
# cd sphinx-1.1.0
# vi sphinx.c
# ./configure
# make && make install
/home/sphinx-1.1.0/sphinx.c: In function ‘php_sphinx_client_read_property’:
/home/sphinx-1.1.0/sphinx.c:105:2: error: too few arguments to function ‘std_hnd->read_property’
/home/sphinx-1.1.0/sphinx.c: In function ‘zim_SphinxClient_updateAttributes’:
/home/sphinx-1.1.0/sphinx.c:1040:6: warning: passing argument 2 of ‘memset’ makes integer from pointer without a cast [enabled by default]
/usr/include/x86_64-linux-gnu/bits/string3.h:77:1: note: expected ‘int’ but argument is of type ‘void *’
/home/sphinx-1.1.0/sphinx.c: In function ‘zm_startup_sphinx’:
/home/sphinx-1.1.0/sphinx.c:1888:43: warning: assignment from incompatible pointer type [enabled by default]
sphinx-1.1.0/sphinx.c:105:2: error: too few arguments
解决
之前在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.
编辑安装方式简单描述:
Shell代码
# tar -xzf sphinx-1.1.0.tgz
# cd sphinx-1.1.0
# vi sphinx.c
# ./configure
# make && make install
相关文章推荐
- php sphinx扩展错误,object(SphinxClient)#1 (2) { ["error"]=> string(35) "connect() failed: Permission den
- PHP源码安装mcrypt扩展error: ‘PHP_FE_END’ undeclared here (not in a function)错误处理
- vmware tools 安装不上,报错/tmp/modconfig-IgPiI7/vmhgfs-only/filesystem.c:685: error: too few arguments to
- magento -- PHP版本引起的错误Fatal error: Method Varien_Object::__tostring() cannot take arguments
- php安装错误:error while loading shared libraries: libltdl.so.3
- 安装PHP常见错误解决error: libjpeg.(a|so),error: libpng.(a|so) not foun...
- PHP安装错误 configure: error: xml2-config not found. Please check your libxml2 installation.
- linux安装coreseek和php的sphinx扩展
- centos6.2 linux安装php过程及配置错误处理 configure: error: xml2-config not found. Please check your libxml2 i
- [install-pear-installer] Error 127 安装PHP时错误
- PHP安装错误 configure: error: xml2-config not found. Please check your libxml2 installation.
- PHP调用Oracle存储过程时的错误:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
- 在安装phpmyadmin出现错误,提示缺少 mysqli 扩展。请检查 PHP 配置解决方案
- php sphinx 扩展的安装
- 安装php扩展sphinx
- 安装php扩展sphinx
- PHP安装错误 configure: error: xml2-config not found. Please check your libxml2 installation.
- 64位centos上nginx,php编译安装遇configure: error: Cannot find libmysqlclient under /usr 错误解决