php扩展使用比我的PHP更新的API版本进行编译 [英] php extension compiles with newer API version than my PHP

查看:416
本文介绍了php扩展使用比我的PHP更新的API版本进行编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这让我发疯了:我正在尝试为库(www.phah.org)编译php扩展名,该扩展名可以正常编译,但是当我尝试启用php加载时,出现以下警告(这实际上是make测试的输出):

This is driving me nuts : I'm trying to compile a php extension for a library (www.phah.org), which compiles fine, but when I try to enable load it with php, I have the following warning (this is actually the output of make test):

PHP Warning:  PHP Startup: pHash: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20090626

令人困惑的是,当我在编译前进行phpize时,它显示了正确的API版本:

The confusing thing is when i do phpize before compiling, it shows the right API version :

$ phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

但是它仍然使用20100525(php 5.4)而不是220090626(php 5.3)进行编译. 我花了很多时间进行搜索,但是我只发现ppl存在相反的问题(为旧版本的php进行扩展编译).

But it is still compiled with 20100525 (php 5.4) instead of 220090626 (php 5.3). I spent quite some time searching, but I only found ppl having the opposite problem (extension compiling for an older version of php).

有任何提示吗?

推荐答案

好吧,我知道了:除了使用0.9.6源代码附带的php绑定之外,您还可以使用此处的0.9.4版本 https://github.com/sdepold/pHash 或此版本,因为它是从0.9.6派生的, https://github.com/Alexis2004/php-phash 两者编译都很好,没有API版本问题.看起来似乎不是来自Zend.

Well, I figured it out : instead of using the php bindings shipped with 0.9.6 sources, you can use either the 0.9.4 version from here https://github.com/sdepold/pHash, or this version as it is forked from 0.9.6, https://github.com/Alexis2004/php-phash Both compile just fine without the API version problem. looks like it doesn't come from Zend apparently.

这篇关于php扩展使用比我的PHP更新的API版本进行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆