From 736bcd32512cb58589c4a13184cd151085297000 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Fri, 15 Jan 2010 19:08:52 +0000 Subject: [PATCH] added installation instructions git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@293592 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/book.xml | 9 +-- reference/mongo/configure.xml | 146 ++++++++++++++++++++++++++++++++++ reference/mongo/setup.xml | 8 +- 3 files changed, 154 insertions(+), 9 deletions(-) diff --git a/reference/mongo/book.xml b/reference/mongo/book.xml index 61f7a3621d..64448b5578 100644 --- a/reference/mongo/book.xml +++ b/reference/mongo/book.xml @@ -9,12 +9,9 @@ &reftitle.intro; MongoDB is a high-performance, open source, schema-free document database - designed for creating scalable websites. - - - - More information and downloads for Mongo can be found at &url.mongodb; and - information about PHP in particular at &url.mongodb.php;. + designed for creating scalable websites. This is the PHP driver for MongoDB. + To use the PHP driver, you must first download the database server from + &url.mongodb;. diff --git a/reference/mongo/configure.xml b/reference/mongo/configure.xml index 38757501c6..08079667f5 100644 --- a/reference/mongo/configure.xml +++ b/reference/mongo/configure.xml @@ -8,6 +8,152 @@ &pecl.info; &url.pecl.package;mongo. + + + Installing on *NIX + + + Run: + + + + + + + Add the following line to your php.ini file: + + + + + + + + Installing on Windows + + + VC8 and VC9 precompiled binaries are available for thread safe and + non-thread-safe PHP 5.3 on + Github. + VC6 precompiled binaries are available for thread safe and non-thread-safe + PHP 5.2 and 5.3 from php.net. + Unzip the archive and put php_mongo.dll in your PHP extension directory + ("ext" by default). + + + + Add the following line to your php.ini file: + + + + + + + + Manual Installation + + For driver developers and people interested in the latest bugfixes, you + can compile the driver from the latest source on + Github. + Go to Github and click the "download" button. Then run: + + +.tar.gz +$ cd mongodb-mongodb-php-driver- +$ phpize +$ ./configure +$ sudo make install +]]> + + + + + Make the following changes to php.ini: + + + + + 1. The build will display where it is installing the PHP driver with output that looks something like: + + + + + Make sure that it is the same as the PHP extension directory by runnning: + + + /usr/lib/php/extensions/no-debug-zts-20060613 => + /usr/lib/php/extensions/no-debug-zts-20060613 +]]> + + + If it's not, change the extension_dir in php.ini or move mongo.so. + + + + + 2. To load the extension on PHP startup, add a line: Github + + + + + + + + + + + + OS X + + + If your system is unable to find autoconf, you'll need to install Xcode + (available on your installation DVD). + + + + Precompiled binaries are available from + Github + (download the latest one with "osx" in the name that matches your version of + PHP). These for use with MAMP and XAMPP, which come without the headers + necessary to compile the extension from scratch. Extract mongo.so from the + archive and add it to MAMP or XAMPP's extension directory. Add + + + + to the php.ini file being used and restart the server. + + + + + Gentoo + On Gentoo using PECL you might get an error that libtool is the wrong + version. Compiling from source you'll need to run aclocal and autoconf. + + + + + + (Thanks to @riklaunim) + + diff --git a/reference/mongo/setup.xml b/reference/mongo/setup.xml index a11d51aafd..2cc8ec631f 100644 --- a/reference/mongo/setup.xml +++ b/reference/mongo/setup.xml @@ -6,10 +6,12 @@
&reftitle.required; - - Requires PHP 5.0 and up. - You can download MongoDB from &url.mongodb;. + Requires PHP 5.1 or greater. + + + Requires a MongoDB database server, which can download MongoDB from + &url.mongodb;.