3

我在互联网上找到的所有说明都是针对旧版本的 phpize、MAMP、php 和 OSX。

我尝试按照以下说明进行操作:

使用 php5.4.4 和 OSX 10.8,但我一直遇到这个问题:

[27-Feb-2013 17:46:17 UTC] PHP Warning:  PHP Startup: pcntl: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0

我的问题是,如何使用 API=20100525 编译它,我升级了基础 php,所以我使用的是 5.4.4 phpize:

pcntl tjstalcup$ /usr/local/bin/phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525

当我运行 make test 我得到:

PHP         : /usr/bin/php 
PHP_SAPI    : cli
PHP_VERSION : 5.3.15
ZEND_VERSION: 2.3.0

我觉得这就是问题所在,任何帮助将不胜感激。

4

1 回答 1

1

I ran into this problem when I was trying to install memcache on MAMP Pro running PHP 5.4.10 on OSX 10.8.

I resolved the problem by using the phpize located within the PHP version within MAMP so for example when compiling I used /Applications/MAMP/bin/php/php5.4.10/bin/phpize with my PHP version being 5.4.10

I suggest phpize'ing it with /Applications/MAMP/bin/php/php5.x.x/bin/phpize instead of the phpize located in the /usr/local/bin/

Also worth mentioning I ran into a few problems with the compiler so found a useful post HERE which explains to use MACOSX_DEPLOYMENT_TARGET=10.8 CFLAGS='-fgnu89-inline' LDFLAGS='-fgnu89-inline' CXXFLAGS='-fgnu89-inline' ./configure instead of the ordinary ./configure

于 2013-06-15T08:35:38.903 回答