表现:

/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
 
 
 
好文要顶 关注我 收藏该文  

安装PHP sphinx扩展 sphinx-1.1.0/sphinx.c:105:2: error: too few arguments 错误的更多相关文章

  1. Linux下coreseek环境安装 、mysql数据源、sphinx扩展安装及php调用

    一.安装m4-1.4.13.autoconf-2.64.automake-1.11.libtool-2.2.6 下载安装m4-1.4.13.autoconf-2.64.automake-1.11.li ...

  2. 搭建coreseek(sphinx+mmseg3)详细安装配置+php之sphinx扩展安装+php调用示例(转)

    一个文档包含了安装.增量备份.扩展.api调用示例,省去了查找大量文章的时间. 搭建coreseek(sphinx+mmseg3)安装 [第一步] 先安装mmseg3 cd /var/install ...

  3. sphinx中文入门指南 (转自sphinx中文站)

    Sphinx中文入门指南 wuhuiming<blvming在gmail.com>,转载请注明来源和作者 最后修改:2010年1月23日 1.简介 1.1.Sphinx是什么 1.2.Sp ...

  4. debian下使用Sphinx异常“Could not import extension sphinx.builders.linkcheck (exception: cannot import name SSLError)”的解决

    最近使用到Sphinx编译文档,出现如下异常: Extension error:Could not import extension sphinx.builders.linkcheck (except ...

  5. LNMP笔记:安装 Xcache 缓存扩展,降低服务器负载

    LNMP笔记:安装 Xcache 缓存扩展,降低服务器负载 2014/11/27 教程笔记 4,743 14     WordPress 精品主机推荐:恒创主机 | 阿里云(本站目前所用云主机) 倡萌 ...

  6. Linux下安装Redis php-redis扩展 redis重启shell脚本 超详细!

    前言 前面刚写过nosql其中三款热门产品的对比,这次主要写关于Redis的一些事情,Redis的介绍.安装以及扩展(php-redis,因为我是phper)安装等等.同时是写给我的朋友(cccjjj ...

  7. Julia安装以及使用扩展包package(ERROR: UndefVarError: Pkg not defined)

    刚刚安装好Julia1.0,想进行第一步尝试: Pkg.add("PyPlot") 却出现错误:ERROR: UndefVarError: Pkg not defined 问题描述 ...

  8. linux下部署monogoDB服务(以及安装php mogodb扩展)

    这两天网站转移到新的服务器后,登录时出现一个问题,会等待几分钟服务器才响应. 开始以为是nginx服务器的问题,后面经过排查发现是php一个登陆验证的函数的问题,每次跑到这个函数就会迟钝几分钟. 经过 ...

  9. PHP7 学习笔记(三)关于PHP7如何安装调试工具Xdebug扩展以及Zephir的问题

    前言: 1.自己摸索安装 2.快速安装 安装这个扩展是由于Zephir 编译不能始终通过,迫不得已啊,使用Zephir写扩展,总是出现以下错误: www@ubuntu1:~/phalcon-zephi ...

随机推荐

  1. 酷欧天气(CoolWeather)应用源码

    <ignore_js_op> 181420yank2y45klayhaan.jpg (35 KB, 下载次数: 0) 下载附件  保存到相册 2016-3-29 15:09 上传   酷欧 ...

  2. web.xml 配置中classpath: 与classpath*:的区别

    首先 classpath是指 WEB-INF文件夹下的classes目录 解释classes含义: 1.存放各种资源配置文件 eg.init.properties log4j.properties s ...

  3. reborn to freelancer

    I want to be a freelancer, so I come back to record all my efforts. I hope this will be a new start ...

  4. Jsoup系列学习(2)-解析html文件

    解析html文件 1.当我们通过发送http请求时,有时候返回结果是一个html格式字符串,你需要从一个网站获取和解析一个HTML文档,并查找其中的相关数据.你可以使用下面解决方法: 使用 Jsoup ...

  5. 6-2 sed 命令

    1. sed : stream editor,流编辑器 是处理纯ASICC纯文本,按行琢行操作的. 编辑器有两种,行编辑器和全屏编辑器 sed:默认不编辑原文件,仅对模式空间中的数据做处理,而后.处理 ...

  6. 刷新页面时 select值保持不变

    刷新页面时,要使下拉菜单(select).raido保持不变,用ajax是无法实现的.我想只能通过cookies才能实现.刷新前先把select或radio的值保存在cookies中,刷新后再填回去. ...

  7. SQL必知必会1-13 读书笔记

    博主不想写字并向你仍来了一堆代码 1-6 SQL——结构化查询语言,Structured Query Language: 基本按列查询: mysql> SELECT prod_id,prod_n ...

  8. 方法传参(JAVA与C的比较)

    java代码:public class Test{ static int e; // 默认是0 static String f; //默认是null public static void main(S ...

  9. Referenced file contains errors (http://www.springframework.org/schema...错误

    Referenced file contains errors (http://www.springframework.org/schema...错误 Referenced file contains ...

  10. 使用Minicom基于串口调试HiKey

    虽然通过adb shell调试方便,但是有些时候不得不借助于串口进行调试,比如测试suspend to ram之类的功能时,adb服务被关闭. 同时在minicom中也可以进入shell,进行操作. ...