logout and install notes

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@295504 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kristina Chodorow 2010-02-25 16:22:04 +00:00
parent a26901c028
commit 4e2f580a56
2 changed files with 49 additions and 6 deletions

View file

@ -20,7 +20,7 @@
$ sudo pecl install mongo
]]>
</programlisting>
</programlisting>
</para>
<para>
@ -29,7 +29,11 @@ $ sudo pecl install mongo
<![CDATA[
extension=mongo.so
]]>
</programlisting>
</programlisting>
</para>
<para>
If pecl runs out of memory, make sure memory_limit in php.ini is set to at least 32M.
</para>
</section>
@ -101,12 +105,22 @@ $ sudo make install
</para>
<para>
Precompiled binaries are available from
If you are using XAMPP, you may be able to compile the driver with the
following command:
<programlisting>
<![CDATA[
sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo
]]>
</programlisting>
</para>
<para>
If you are using MAMP (or XAMPP and the above command does not work),
precompiled binaries are available from
<link xlink:href="&url.mongodb.github.downloads;">Github</link>
(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
PHP). Extract mongo.so from the archive and add it to MAMP or XAMPP's
extension directory. Add
<programlisting>
<![CDATA[
extension=mongo.so
@ -130,6 +144,22 @@ $ phpize && aclocal && autoconf && ./configure && make && make install
(Thanks to <link xlink:href="&url.mongodb.tweet.gentoo;">@riklaunim</link>)
</para>
</section>
<section>
<title>Fedora</title>
<para>
If you don't want to modify php.ini directly, you can create a separate
mongo.ini file. Within the /etc/php.d directory, create a subdirectory named
mongo (or something else you like). In the mongo directory, create a
mongo.ini file. Put the following in your mongo.ini file:
<programlisting>
<![CDATA[
extension=mongo.so
; any other mongo options you'd like (see the Runtime Configuration section)
]]>
</programlisting>
</para>
</section>
</section>
<section>

View file

@ -36,6 +36,19 @@ $result = $db->command(array("authenticate" => 1,
"nonce" => $nonce["nonce"],
"key" => $saltedHash);
?>
]]>
</programlisting>
</para>
<para>
Once a connection has been authenticated, it can only be un-authenticated by
using the "logout" database command:
<programlisting role="php">
<![CDATA[
<?php
$db->command(array("logout" => 1));
?>
]]>
</programlisting>