array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'mongodb.installation.pecl.php', 1 => 'Installing the MongoDB PHP Driver with PECL', ), 'up' => array ( 0 => 'mongodb.installation.php', 1 => 'Kurulum', ), 'prev' => array ( 0 => 'mongodb.installation.php', 1 => 'Kurulum', ), 'next' => array ( 0 => 'mongodb.installation.homebrew.php', 1 => 'Installing the MongoDB PHP Driver on macOS with Homebrew', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/configure.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
Bu PECL eklentisini kurma bilgisi kılavuzun PECL eklentisinin kurulması başlıklı faslında bulunabilir. Yeni dağıtımlar, indirmeler, kaynak dosyaları, sürdürücü bilgileri ve CHANGELOG gibi ek bilgiler şu adreste bulunabilir: » https://pecl.php.net/package/mongodb
Linux, Unix, and macOS users may run the following command to install the driver:
$ sudo pecl install mongodb
On systems with multiple version of PHP installed (e.g. macOS default, Homebrew, » XAMPP), each version of PHP will have its own pecl command and php.ini file(s). Additionally, each PHP environments (e.g. CLI, web) may use separate php.ini files.
As of driver version 1.17.0, PECL will prompt for various
configure
options. To install the driver with default
options in a non-interactive script, empty string input may be piped to
pecl install
using the yes
command:
$ yes '' | sudo pecl install mongodb
A complete list of supported configure
options can be
found in the package.xml
file included in the PECL
package. To install the driver with specific configure
options in a non-interactive script, the
--configureoptions
option for
pecl install
may be used:
$ sudo pecl install --configureoptions='with-mongodb-system-libs="yes" enable-mongodb-developer-flags="no"' mongodb
By default, installing the driver via PECL will use bundled versions of » libbson, » libmongoc, and » libmongocrypt and attempt to automatically configure them.
Bilginize: If the build process fails to find an SSL library, check that the development packages (e.g.
libssl-dev
) and » pkg-config are both installed. If that does not resolve the problem, consider using the manual installation process.
Finally, add the following line to the php.ini file for each environment that will need to use the driver:
extension=mongodb.so