PHP7 pecl Installing MongoDB extensions

Source: Internet
Author: User
Tags install mongodb mongodb pear

Hi

I ' m running Alpine 3.3 in Docker with the testing repo for PHP7 packages, after installing Php7-pear, and trying to run PE CL 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 a extra "XML Extension not fou nd"at the end.

I compared the "/usr/bin/pecl" with one from Ubuntu and the-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 "[Email protected]"

Ubuntu:
EXEC $PHP-C-Q $INCARG-D date.timezone=utc-d output_buffering=1-d variables_order=egpcs-d safe_mode=0-d register_arg c_argv= "on" $INCDIR/peclcmd.php "[Email protected]"

-N Meaning: "No configuration (INI) files would be used"
If not using CONF, XML won ' t is loaded, so I ' m pretty sure the "-N" should be removed.

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

SUMERY:VI/USR/BIN/PECL Remove-n para

PHP7 pecl Installing MongoDB extensions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.