Re: phpdoc /en/reference/pdo reference.xml

From: Date: Fri, 09 Sep 2005 14:28:52 +0000
Subject: Re: phpdoc /en/reference/pdo reference.xml
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969370027@lists.php.net to get a copy of this message
This modify break build, please correct. Here's the result of 'make test_xml' below: /usr/bin/xmllint --noent --noout --valid manual.xml /home/dallas/phpdoc/en/reference/pdo/reference.xml:70: element procedure: validi ty error : Element procedure content does not follow the DTD, expecting ((title , titleabbrev?)? , (calloutlist | glosslist | itemizedlist | orderedlist | segme ntedlist | simplelist | variablelist | caution | important | note | tip | warnin g | literallayout | programlisting | programlistingco | screen | screenco | scre enshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjec tco | informalequation | informalexample | informalfigure | informaltable | equa tion | example | figure | table | msgset | procedure | sidebar | qandaset | anch or | bridgehead | remark | highlights | abstract | authorblurb | epigraph | inde xterm | beginpage)* , step+), got (title para para para ) </procedure>
               ^
/home/dallas/phpdoc/en/reference/pdo/reference.xml:112: element procedure: valid
ity error : Element procedure content does not follow the DTD, expecting ((title
, titleabbrev?)? , (calloutlist | glosslist | itemizedlist | orderedlist | segm
entedlist | simplelist | variablelist | caution | important | note | tip | warni
ng | literallayout | programlisting | programlistingco | screen | screenco | scr
eenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis
| constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para
| simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobje
ctco | informalequation | informalexample | informalfigure | informaltable | equ
ation | example | figure | table | msgset | procedure | sidebar | qandaset | anc
hor | bridgehead | remark | highlights | abstract | authorblurb | epigraph | ind
exterm | beginpage)* , step+), got (title para para para para ) </procedure>
               ^
make: *** [test_xml] Error 4 ""Wez Furlong"" <wez@php.net> 写入消息新闻:cvswez1126234848@cvsserver...
wez Thu Sep 8 23:00:48 2005 EDT Modified files: /phpdoc/en/reference/pdo reference.xml Log: revise install instructions http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/reference.xml?r1=1.30&r2=1.31&ty=u Index: phpdoc/en/reference/pdo/reference.xml diff -u phpdoc/en/reference/pdo/reference.xml:1.30 phpdoc/en/reference/pdo/reference.xml:1.31 --- phpdoc/en/reference/pdo/reference.xml:1.30 Sun Sep 4 15:39:23 2005 +++ phpdoc/en/reference/pdo/reference.xml Thu Sep 8 23:00:46 2005 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.30 $ --> +<!-- $Revision: 1.31 $ --> <!-- Purpose: database.abstract --> <!-- Membership: pecl, bundled --> <!-- State:experimental --> @@ -21,59 +21,101 @@
     itself; you must use a <link linkend="pdo.drivers">database-specific
     PDO driver</link> to access a database server.
    </para>
+    <para>
+     PDO ships with PHP 5.1, and is available as a PECL extension for PHP 5.0;
+     PDO requires the new OO features in the core of PHP 5, and so will not
+     run with earlier versions of PHP.
+    </para>
</section> <section id="pdo.installation"> &reftitle.install; - <!-- Uncomment this section when PDO actually stabilizes and PEAR method - works --> - <!--
-    <para>
-     PDO is currently available as a PECL extension from
-     <ulink url='&url.pecl.package;pdo'>&url.pecl.package;pdo</ulink>.
-     Ensure you have installed the CLI version of PHP and that the
-     <command>pear</command> and <command>phpize</command> scripts are
-     available in your current path.
-    </para>
-    <para>
-     Run the following command to download, build, and install the
-     latest stable version of PDO:
-     <screen>
+    <procedure id='pdo.install.unix51up'>
+     <title>PHP 5.1 and up on Unix systems</title>
+     <para>
+      If you're running a PHP 5.1 release, PDO is included in the distribution;
+      it will be automatically enabled when you run configure.  It is
+      recommended that you build PDO as a shared extension, as this will allow
+      you to take advantage of updates that are made available via PECL. The
+      recommended configure line for building PHP with PDO support should
+      enable zlib support (for the pear installer) as well.  You may also need
+      to enable the PDO driver for your database of choice; consult the
+      documentation for  <link linkend="pdo.drivers">database-specific
+      PDO drivers</link> to find out more about that.
+      <screen>
<![CDATA[ -pear install pdo + ./configure --with-zlib --enable-pdo=shared ]]>
-     </screen>
-    </para>
-    <para>
-     The <command>pear</command> command automatically installs the
-     PDO module into your PHP extensions directory. To enable the
-     PDO extension on Linux or Unix operating systems, you must add
-     the following line to &php.ini;:
-     <screen>
+      </screen>
+     </para>
+     <para>
+      After installing PDO as a shared module, you must edit your php.ini file
+      so that the PDO extension will be loaded automatically when PHP runs.
+      You will also need to enable any database specific drivers there too;
+      make sure that they are listed after the pdo.so line, as PDO must be
+      initialized before the database specific extensions can be loaded.
+      If you built the extensions statically, you can skip this step.
+      <screen>
<![CDATA[ extension=pdo.so ]]>
-     </screen>
-    </para>
-     -->
-    <procedure id='installwindows'>
-     <title>Windows</title>
+      </screen>
+     </para>
     <para>
-      Follow the same steps to install and enable the PDO drivers of your
-      choice.
+      Having PDO as a shared module will allow you to run <command>pear
+      upgrade pdo</command> as new versions of PDO are published, without
+      forcing you to rebuild the whole of PHP.  Note that if you do this, you
+      also need to upgrade your database specific PDO drivers at the same
+      time.
     </para>
+    </procedure>
+    <procedure id='pdo.install.pecl'>
+     <title>PHP 5.0 and up on Unix systems</title>
+     <para>
+      PDO is available as a PECL extension from
+      <ulink url='&url.pecl.package;pdo'>&url.pecl.package;pdo</ulink>.
+      Installation can be performed via the <command>pear</command> tool; this
+      is enabled by default when you configure PHP.  You should ensure that
+      PHP was configured --with-zlib in order for
+      <command>pear</command> to be able to handle the compressed package
+      files.
+     </para>
+     <para>
+      Run the following command to download, build, and install the
+      latest stable version of PDO:
+      <screen>
+<![CDATA[ +pear install pdo +]]>
+      </screen>
+     </para>
+     <para>
+      If PDO is still in beta (and at the time of writing, it is), you will
+      need to tell the pear tool that it's ok to fetch the beta package.
+      Instead of running the command above, run the following:
+      <screen>
+<![CDATA[ +pear install pdo-beta +]]>
+      </screen>
+     </para>
+     <para>
+      The <command>pear</command> command automatically installs the
+      PDO module into your PHP extensions directory. To enable the
+      PDO extension on Linux or Unix operating systems, you must add
+      the following line to &php.ini;:
+      <screen>
+<![CDATA[ +extension=pdo.so +]]>
+      </screen>
+     </para>
+    </procedure>
+    <procedure id='pdo.install.win32php51'>
+     <title>Windows users running PHP 5.1 and up</title>
     <step>
      <para>
-       Windows users can download the extension DLL <filename>php_pdo.dll</filename>
-       as part of the PECL collection binaries from
-       <ulink url='&url.php.downloads;'>&url.php.downloads;</ulink> or a more
-       recent version from a <ulink url="&url.pecl.get.win.php5.0;">PHP 5 PECL
-       Snapshot</ulink>.
-      </para>
-     </step>
-     <step>
-      <para>
-       To enable the PDO extension on Windows operating systems, you must
-       add the following line to &php.ini;:
+       PDO and all the major drivers ship with PHP as shared extensions, and
+       simply need to be activated by editing the &php.ini; file:
       <screen>
<![CDATA[ extension=php_pdo.dll @@ -106,62 +148,6 @@
      </para>
     </step>
    </procedure>
-    <procedure id='installunix'>
-     <title>Linux and UNIX</title>
-     <para>
-      Due to a bug in the <command>pear</command> installer you should install
-      the PDO package manually using the following steps:
-     </para>
-     <para>
-      Follow the same steps to install and enable the PDO drivers of your
-      choice. E.g. for MySQL driver, replace PDO with PDO_MYSQL in the
-      following instructions.
-     </para>
-     <step>
-      <para>Download the PDO package to your local machine:
-       <screen>
-<![CDATA[ -bash$ wget http://pecl.php.net/get/PDO -]]>
-       </screen>
-      </para>
-     </step>
-     <step>
-      <para>
-       Determine your PHP <filename>bin</filename> directory. If your
-       PHP 5 CLI binary lives at <filename>/usr/local/php5/bin/php</filename>
-       then the bin dir is <filename>/usr/local/php5/bin</filename>.
-      </para>
-     </step>
-     <step>
-      <para>
-       Set your path so that your PHP <filename>bin</filename> directory
-       is at the front:
-       <screen>
-<![CDATA[
-    export PATH="/usr/local/php5/bin:$PATH"
-]]>
-       </screen>
-      </para>
-     </step>
-     <step>
-      <para>
-       Manually build and install the PDO extension:
-       <screen>
-<![CDATA[ -bash$ tar xzf PDO-0.9.tgz -bash$ cd PDO-0.9 -bash$ phpize -bash$ ./configure -bash$ make -bash$ sudo -s -bash# make install -bash# echo extension=pdo.so >> /usr/local/php5/lib/php.ini -]]>
-       </screen>
-      </para>
-     </step>
-    </procedure>
</section> &reference.pdo.ini;


« previous php.doc (#969370027) next »