svn: /phpdoc/en/trunk/reference/mongo/ connecting.xml
| From: | Kristina Chodorow | Date: | Thu, 05 Aug 2010 22:18:37 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mongo/ connecting.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-6965@lists.php.net to get a copy of this message | ||
kristina Thu, 05 Aug 2010 22:18:37 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=301915
Log:
domain socket support
Changed paths:
U phpdoc/en/trunk/reference/mongo/connecting.xml
Modified: phpdoc/en/trunk/reference/mongo/connecting.xml
===================================================================
--- phpdoc/en/trunk/reference/mongo/connecting.xml 2010-08-05 21:24:22 UTC (rev 301914)
+++ phpdoc/en/trunk/reference/mongo/connecting.xml 2010-08-05 22:18:37 UTC (rev 301915)
@@ -165,4 +165,47 @@
</para>
</section>
+ <section>
+ <title>Domain Socket Support</title>
+
+ <para>
+ If you are running MongoDB locally and have version 1.0.9 or better of the
+ driver, you can connect to the database via file. MongoDB automatically
+ opens a socket file on startup: /tmp/mongodb-<port>.sock
+ (C:\tmp\mongodb-<27017>.sock on Windows).
+ </para>
+
+ <para>
+ To connect to the socket file, specify the path in your MongoDB connection
+ string:
+ </para>
+
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$m = new Mongo("mongodb:///tmp/mongo-27017.sock");
+
+?>
+]]>
+ </programlisting>
+
+ <para>
+ If you would like to use authentication on connection (as described above)
+ with a socket file, you must specify a port of 0 so that the connection
+ string parser knows where the end of the connection string is.
+ </para>
+
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$m = new Mongo("mongodb://username:password@/tmp/mongo-27017.sock:0/foo");
+
+?>
+]]>
+ </programlisting>
+
+ </section>
+
</section>