博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
安装PHP sphinx扩展 sphinx-1.1.0/sphinx.c:105:2: error: too few arguments 错误
阅读量:7082 次
发布时间:2019-06-28

本文共 1415 字,大约阅读时间需要 4 分钟。

 

表现:

/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.

 

      编辑安装方式简单描述:

    1. # tar -xzf sphinx-1.1.0.tgz  
    2. # cd sphinx-1.1.0  
    3. # vi sphinx.c  
    4. # ./configure  
    5. # make && make install 
 
 
 
好文要顶  关注我  收藏该文 
 

转载地址:http://fnlml.baihongyu.com/

你可能感兴趣的文章
Loadrunner得到server參数
查看>>
LEMP平台全编译搭建
查看>>
Select * 一定不走索引是否正确?
查看>>
php-fpm 启动参数及重要配置详解
查看>>
GIS+=地理信息+容器技术(1)——容器技术概述
查看>>
libmemcached的安装及測试
查看>>
Elasticsearch之CURL命令的GET
查看>>
c++ 11 thread 初试
查看>>
项目PMO工作
查看>>
eclipse 执行MapReduce程序错误异常汇总(解决Map not fount)
查看>>
OpenCV实践之路——Python的安装和使用
查看>>
iOS上的http请求:get、post以及同步、异步
查看>>
【hdu 6172】Array Challenge(数列、找规律)
查看>>
关于LINUX权限-bash: ./startup.sh: Permission denied
查看>>
fn:replace()函数
查看>>
win7 怎么设置开机直接进入桌面? netplwiz 命令
查看>>
安卓平台下ARM Mali OpenCL编程-GPU信息检测(转)
查看>>
数学之美读书笔记一如何度量查询关键字和网页的相关性(逆文本频率指数)...
查看>>
MySQL慢查询日志总结
查看>>
Ubuntu Apache配置及开启mod_rewrite模块
查看>>