我在gentoo下面出了一个奇怪的问题。 Mongodb扩展在apache2和cli中正常工作,但是fpm无法启动: /etc/init.d/php-fpm restart *测试PHP FastCGI Process Manager配置...... [30-Jan-2016 13:59:47]注意:配置文件/etc/php/fpm-php7.0/php-fpm.conf测试成功
zend_mm_heap已损坏[!! ]
php -v
PHP 7.0.2-pl5-gentoo (cli) (built: Jan 30 2016 13:16:21) ( ZTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
以下是来自cli的信息:
php -i|grep mongo
mongodb
mongodb support => enabled
mongodb version => 1.1.3-dev
mongodb stability => devel
libmongoc version => 1.3.1-dev
mongodb.debug => no value => no value
我甚至没有sasl编译mongodb,但结果是一样的。 像这样手动编译Mongodb扩展(我的系统是x86_64): git clone https://github.com/mongodb/mongo-php-driver.git cd mongo-php-driver; git submodule sync&& git submodule update --init
phpize --clean phpize
rm aclocal.m4
aclocal会 autoconf的
./ configure --without-mongodb_sasl(我试过有没有这个) 使 make install
在php.ini中添加extension = mongodb.so:/etc/php/fpm-php7.0/php.ini 重启php-fpm:/etc/init.d/php-fpm restart
最奇怪的是,如果我用gdb启动php-fpm进程来回溯扩展程序的工作原理。
gdb -q /usr/lib/php7.0/bin/php-fpm
Reading symbols from /usr/lib/php7.0/bin/php-fpm...(no debugging symbols found)...done.
(gdb) set args --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
(gdb) run
Starting program: /usr/lib64/php7.0/bin/php-fpm --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Inferior 1 (process 4075) exited normally]
(gdb)
任何帮助都是apreciated