安装PHP sphinx扩展 sphinx-1.1.0/sphinx.c:105:2: error: too few arguments 错误
表现:
/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.
编辑安装方式简单描述:
- # tar -xzf sphinx-1.1.0.tgz
- # cd sphinx-1.1.0
- # vi sphinx.c
- # ./configure
- # make && make install
安装PHP sphinx扩展 sphinx-1.1.0/sphinx.c:105:2: error: too few arguments 错误的更多相关文章
- 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 ...
- 搭建coreseek(sphinx+mmseg3)详细安装配置+php之sphinx扩展安装+php调用示例(转)
一个文档包含了安装.增量备份.扩展.api调用示例,省去了查找大量文章的时间. 搭建coreseek(sphinx+mmseg3)安装 [第一步] 先安装mmseg3 cd /var/install ...
- sphinx中文入门指南 (转自sphinx中文站)
Sphinx中文入门指南 wuhuiming<blvming在gmail.com>,转载请注明来源和作者 最后修改:2010年1月23日 1.简介 1.1.Sphinx是什么 1.2.Sp ...
- 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 ...
- LNMP笔记:安装 Xcache 缓存扩展,降低服务器负载
LNMP笔记:安装 Xcache 缓存扩展,降低服务器负载 2014/11/27 教程笔记 4,743 14 WordPress 精品主机推荐:恒创主机 | 阿里云(本站目前所用云主机) 倡萌 ...
- Linux下安装Redis php-redis扩展 redis重启shell脚本 超详细!
前言 前面刚写过nosql其中三款热门产品的对比,这次主要写关于Redis的一些事情,Redis的介绍.安装以及扩展(php-redis,因为我是phper)安装等等.同时是写给我的朋友(cccjjj ...
- Julia安装以及使用扩展包package(ERROR: UndefVarError: Pkg not defined)
刚刚安装好Julia1.0,想进行第一步尝试: Pkg.add("PyPlot") 却出现错误:ERROR: UndefVarError: Pkg not defined 问题描述 ...
- linux下部署monogoDB服务(以及安装php mogodb扩展)
这两天网站转移到新的服务器后,登录时出现一个问题,会等待几分钟服务器才响应. 开始以为是nginx服务器的问题,后面经过排查发现是php一个登陆验证的函数的问题,每次跑到这个函数就会迟钝几分钟. 经过 ...
- PHP7 学习笔记(三)关于PHP7如何安装调试工具Xdebug扩展以及Zephir的问题
前言: 1.自己摸索安装 2.快速安装 安装这个扩展是由于Zephir 编译不能始终通过,迫不得已啊,使用Zephir写扩展,总是出现以下错误: www@ubuntu1:~/phalcon-zephi ...
随机推荐
- android ImageLoader 混淆加载drawable出现黑色图片的解决方案
在网上找了很久,没有找到.后来看了源码才知道... 多线程异步加载和显示图片(图片来源于网络.sd卡.assets文件夹,drawable文件夹(不能加载9patch),新增加载视频缩略图) Stri ...
- xUtils 3.0 post使用详解
github:https://github.com/wyouflf/xUtils3 xUtils3简介 xUtils 包含了很多实用的android工具. xUtils 支持超大文件(超过2G)上传, ...
- floyd算法学习笔记
算法思路 路径矩阵 通过一个图的权值矩阵求出它的每两点间的最短路径矩阵.从图的带权邻接矩阵A=[a(i,j)] n×n开始,递归地进行n次更新,即由矩阵D(0)=A,按一个公式,构造出矩阵D(1):又 ...
- 解决apache启动错误"httpd:Could not reliably determine..."
启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name [root@serv ...
- 架构从最简单的数据访问框架(ORM)到资源调度和治理中心(SOA)说起
随着互联网的发展,网站应用的规模不断扩大,常规的垂直应用架构已无法应对,分布式服务架构以及流动计算架构势在必行,亟需一个治理系统确保架构有条不紊的演进. 单一应用架构当网站流量很小时,只需一个应用,将 ...
- 机器学习实战笔记(Python实现)-06-AdaBoost
--------------------------------------------------------------------------------------- 本系列文章为<机器 ...
- mysql比较时间大小unix_timestamp
使用unix_timestamp方法进行比较,将字符型的时间,转成unix时间戳 select * from t1 where unix_timestamp(time1) > unix_time ...
- 使用Nexus搭建Maven本地仓库
阅读目录 序 Nexus 本文版权归mephisto和博客园共有,欢迎转载,但须保留此段声明,并给出原文链接,谢谢合作. 文章是哥(mephisto)写的,SourceLink 序 在工作中可能存在有 ...
- python中的ValueError
在初学时候,会遇到这种错误,修改了代码,一一比对了代码,发现代码,没有错误,可是就是运行不了. 我们先从错误的语句来入手!(这显示了英语很重要) ValueError: need more tha ...
- android OnTouchListener 按下与抬起
写法一: private OnTouchListener pressOnTouchListener = new OnTouchListener(){ @Override public boolean ...