php extension compiles with newer API version than my PHP

倾然丶 夕夏残阳落幕 提交于 2019-12-25 02:12:44

问题


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

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

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

Any hints?


回答1:


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.



来源:https://stackoverflow.com/questions/22202459/php-extension-compiles-with-newer-api-version-than-my-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!