我试图在centos 7上针对php7编译一个自定义php扩展。
当我在扩展目录中运行phpize时,我得到:
Configuring for:
PHP Api Version: 20160303
Zend Module Api No: 20160303
Zend Extension Api No: 320160303但是,当我安装模块并运行php时,我得到:
PHP Warning: PHP Startup: murmur: Unable to initialize module
Module compiled with module API=20131226
PHP compiled with module API=20160303
These options need to match我已经采取了一些步骤来解决这个问题:
已安装的php7:
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum -y install yum-utils yum-config-manager --enable remi-php71
yum install -y php php-devel php-mbstring php-common php-pear php-pdo php-mysqlnd php-opcache php-intl php-bcmath php-gd php-pecl-amqp php-pecl-mailparse php-xml php-mcrypt php-imap php-ldap php-pecl-memcached php-process php-cli php-pecl-zip编译了自定义扩展:
cd {extension dir}
phpize
./configure --enable-murmur
make为什么phpize会告诉我这个扩展是针对phpize 20160303编译的,但是当它被PHP加载时,它说这个模块是根据Api 20131226编译的?
发布于 2018-03-16 00:06:25
我在扩展名目录中有一些以前编译过的文件。一旦我清除了文件,下一个编译就可以在php中完美地工作了。
https://stackoverflow.com/questions/49310963
复制相似问题