cvs: peardoc /en/guide/users installation.xml /en/guide/users/installation checking.xml getting.xml

From: Date: Thu, 29 May 2008 20:52:46 +0000
Subject: cvs: peardoc /en/guide/users installation.xml /en/guide/users/installation checking.xml getting.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-10802@lists.php.net to get a copy of this message
cweiske Thu May 29 20:52:46 2008 UTC Added files: /peardoc/en/guide/users/installation checking.xml Modified files: /peardoc/en/guide/users installation.xml /peardoc/en/guide/users/installation getting.xml Log: Add a "check if pear works" section

http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/guide/users/installation.xml diff -u peardoc/en/guide/users/installation.xml:1.3 peardoc/en/guide/users/installation.xml:1.4 --- peardoc/en/guide/users/installation.xml:1.3 Fri Apr 4 09:10:29 2008 +++ peardoc/en/guide/users/installation.xml Thu May 29 20:52:46 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- do not change this ID, or you'll break thousands of link in the web --> <chapter id="installation"> <chapterinfo> @@ -17,6 +17,7 @@ &guide.users.installation.introduction; &guide.users.installation.getting; &guide.users.installation.shared; + &guide.users.installation.checking; </chapter> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation/getting.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/en/guide/users/installation/getting.xml diff -u peardoc/en/guide/users/installation/getting.xml:1.5 peardoc/en/guide/users/installation/getting.xml:1.6 --- peardoc/en/guide/users/installation/getting.xml:1.5 Thu Apr 17 02:49:33 2008 +++ peardoc/en/guide/users/installation/getting.xml Thu May 29 20:52:46 2008 @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- do not change this ID, or you'll break thousands of link in the web --> <sect1 id="installation.getting"> <title>Getting the manager</title> + <sect2> <title>Windows</title> @@ -22,8 +23,9 @@ Prompt. </para> <para> - To update your PEAR installation from go-pear.org, request - &url.pear.go; in your browser and save the output to a local + To update your PEAR installation, request + <ulink url="&url.pear.go;">&url.pear.go;</ulink> + in your browser and save the output to a local file <filename>go-pear.php</filename>. You can then run <screen> <userinput> @@ -40,8 +42,12 @@ </para> </note> + <para> + Now <link linkend="installation.checking">check that PEAR works</link>. + </para> </sect2> + <sect2> <title>Unix/Linux/BSD</title> <para> @@ -83,8 +89,13 @@ </screen> </para> </note> + + <para> + Now <link linkend="installation.checking">check that PEAR works</link>. + </para> </sect2> + <sect2> <title>Mac OS X</title> <para> @@ -111,8 +122,13 @@ </screen> </para> </note> + + <para> + Now <link linkend="installation.checking">check that PEAR works</link>. + </para> </sect2> + <sect2> <title>PEAR in hosting environments</title> @@ -122,10 +138,11 @@ can use the PEAR Installer using the Web Frontend. </para> <para> - Go to &url.pear.go; and save as <filename>go-pear.php</filename>. Copy - <filename>go-pear.php</filename> to + Go to <ulink url="&url.pear.go;">&url.pear.go;</ulink> and save as + <filename>go-pear.php</filename>. + Copy <filename>go-pear.php</filename> to your server and open the corresponding URL in your browser, for - example http://example.com/pear/go-pear.php. + example <filename>http://example.com/pear/go-pear.php</filename>. </para> <warning id="installation.web.prerequesite"> <title>Prerequisites</title> @@ -134,6 +151,10 @@ already before the installation. </para> </warning> + + <para> + Now <link linkend="installation.checking">check that PEAR works</link>. + </para> </sect2> </sect1> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/peardoc/en/guide/users/installation/checking.xml?view=markup&rev=1.1 Index: peardoc/en/guide/users/installation/checking.xml +++ peardoc/en/guide/users/installation/checking.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- do not change this ID, or you'll break thousands of link in the web --> <sect1 id="installation.checking"> <title>Checking if PEAR works</title> <sect2 id="installation.checking.cli"> <title>Verifying command line tool</title> <para> Both <command>pear</command> and <command>pecl</command> tools should be available everywhere on command line. For that to work, pear's binary directory should be in your <literal>PATH</literal> variable. </para> <para> To verify it works, simply type <command>pear</command>. A list of commands should be shown: </para> <screen><![CDATA[ $ pear Commands: build Build an Extension From C Source bundle Unpacks a Pecl Package channel-add Add a Channel.... ]]></screen> <para> You should further test that PEAR is up to date: </para> <screen><![CDATA[ $ pear version PEAR Version: 1.7.2 PHP Version: 5.2.6RC4-pl0-gentoo Zend Engine Version: 2.2.0 Running on: Linux ... ]]></screen> </sect2> <sect2 id="installation.checking.includepath"> <title>Verify the include path</title> <para> To use PEAR and PEAR compatible packages in your applications, you normally include them into your PHP scripts using <function>require_once</function>. This does only work when PEAR's <literal>php_dir</literal> is in PHP's include path. </para> <orderedlist> <listitem> <para> First, check where PEAR installs <filename>.php</filename> files: </para> <screen> $ pear config-get php_dir /usr/share/lib/php/ </screen> </listitem> <listitem> <para> Now check PHP's include_path setting. On unix command line, execute </para> <screen><![CDATA[ $ php -i|grep include_path include_path => .:/usr/share/lib/php/ => .:/usr/share/lib/php/ ]]></screen> <para> On Windows you could either pipe the output into a file and inspect it, or use <command>more</command> and search for the setting: </para> <screen><![CDATA[ $ php -i|more ]]></screen> <para> To check the PHP's include_path in your web server, save a file with only <literal>phpinfo();</literal> in it. Open it in your browser and verify the setting. </para> <para> In every case, PEAR's <literal>bin_dir</literal> should be in the include path. If not, add it in your system's <filename>php.ini</filename>. </para> </listitem> <listitem> <para> Now that this is done, try including a file. Create a new <literal>.php</literal> file with the following contents: </para> <programlisting role="php"><![CDATA[ <?php require_once 'System.php'; ?> ]]></programlisting> <para> <filename>System.php</filename> is shipped with every PEAR installation and thus should be on your computer, too. Open the file with the browser from your web server, and also try it on command line. There should be no output. A message like: </para> <screen><![CDATA[ Warning: require_once(System.php): failed to open stream: No such file or directory in /path/to/test.php on line 2 ]]></screen> <para> means that your include path is not correct. </para> </listitem> </orderedlist> <para> That's it! Now go on and <link linkend="guide.users.commandline.cli">install some packages</link>. </para> <sect3> <title>Things that could be in your way</title> <itemizedlist> <listitem> <para> After changing <filename>php.ini</filename>, you need to restart your web server. </para> </listitem> <listitem> <para> Newer Linux distributions use multiple <filename>php.ini</filename> files; mostly one for the web server (e.g. <filename>/etc/php/apache2-php5/</filename>) and one for command line (like <filename>/etc/php/cli-php5/</filename>). Make sure you edit the right ones. </para> </listitem> <listitem> <para> On Windows, recent versions of PHP use <filename>php.ini</filename> from their own directory (where <filename>php.exe</filename> is). You still might have an old <filename>php.ini</filename> in your <filename>windows</filename> or <filename>system(32)</filename> directory that fools you. </para> </listitem> </itemizedlist> </sect3> </sect2> </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#10802) next »