PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Manually Installing the MongoDB PHP Driver | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Manually Installing the MongoDB PHP Driver

For driver developers and people interested in the latest bugfixes, you can compile the driver from the latest source code on » Github. Run the following commands to clone and build the project:

$ git clone https://github.com/mongodb/mongo-php-driver.git
$ cd mongo-php-driver
$ git submodule sync && git submodule update --init
$ phpize
$ ./configure
$ make all -j 5
$ sudo make install

注意: By default, the driver will use bundled versions of » libbson and » libmongoc and rely on PHP to find OpenSSL (i.e. PHP_SETUP_OPENSSL). If the build process fails to find OpenSSL, check that the OpenSSL development package (e.g. libssl-dev) and » pkg-config are both installed.

The last step will report where mongodb.so has been installed, similar to:

Installing shared extensions:     /usr/lib/php/extensions/debug-non-zts-20151012/

Ensure that the extension_dir option in php.ini points to the directory where mongodb.so was installed. You can query the option by running:

$ php -i | grep extension_dir
  extension_dir => /usr/lib/php/extensions/debug-non-zts-20151012 =>
                   /usr/lib/php/extensions/debug-non-zts-20151012

If the directories differ, either change extension_dir in php.ini or manually move mongodb.so to the correct directory.

Add the following line to your php.ini file:

extension=mongodb.so


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「Manually Installing the MongoDB PHP Driver」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Manually Installing the MongoDB PHP Driver」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: