首页 > 数据库技术 > 详细

PHP7 pecl 安装 mongodb扩展

时间:2018-03-28 21:00:45      阅读:705      评论:0      收藏:0      [点我收藏+]
Hi,

I‘m running alpine 3.3 in docker with the testing repo for php7 packages, after installing php7-pear, and trying to run pecl I get a bunch of warnings/notices :

~ # pecl
Warning: Invalid argument supplied for foreach() in Command.php on line 249
Warning: Invalid argument supplied for foreach() in /usr/share/php7/PEAR/Command.php on line 249
Notice: Undefined index: honorsbaseinstall in Role.php on line 173
Notice: Undefined index: installable in Role.php on line 139
Notice: Undefined index: phpfile in Role.php on line 204
Notice: Undefined index: config_vars in Role.php on line 46
And if I try to install mongodb for example, I‘ll get the same warnings as before with an extra "XML Extension not found" at the end.

I compared the "/usr/bin/pecl" with one from ubuntu and the only difference is the "-n" in the exec line :

alpine:
exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"

ubuntu:
exec $PHP -C -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"

-n meaning: "No configuration (ini) files will be used"
If not using conf, xml won‘t be loaded, so I‘m pretty sure the "-n" should be removed.

I tested after removing it, and got no warning or anything and was able to install my extension.

sumery: vi /usr/bin/pecl remove -n para

PHP7 pecl 安装 mongodb扩展

原文:http://blog.51cto.com/livestreaming/2092162

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!