From cf432fa670bf20b66b24255768fe9dffbfe85416 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Fri, 9 Jan 2015 14:15:32 +0100 Subject: [PATCH] doc: Add Librados PHP documentation --- doc/rados/api/librados-intro.rst | 67 ++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/doc/rados/api/librados-intro.rst b/doc/rados/api/librados-intro.rst index c120ec9fe9072..82ea014cd7dd7 100644 --- a/doc/rados/api/librados-intro.rst +++ b/doc/rados/api/librados-intro.rst @@ -119,6 +119,36 @@ To build the documentation, execute the following:: ant docs +Getting librados for PHP +------------------------- + +To install the ``librados`` extension for PHP, you need to execute the following procedure: + +#. Install php-dev. For Debian/Ubuntu, execute:: + + sudo apt-get install php5-dev build-essential + + For CentOS/RHEL, execute:: + + sudo yum install php-devel + +#. Clone the ``phprados`` repository:: + + git clone https://github.com/ceph/phprados.git + +#. Build ``phprados``:: + + cd phprados + phpize + ./configure + make + sudo make install + +#. Enable ``phprados`` in php.ini by adding:: + + extension=rados.so + + Step 2: Configuring a Cluster Handle ==================================== @@ -456,6 +486,28 @@ to specify the classpath. For example:: java CephClient +PHP Example +------------ + +With the RADOS extension enabled in PHP you can start creating a new cluster handle very easily: + +.. code-block:: php + +