问题
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