Author: bhuvan
Date: Fri Sep 15 09:21:21 2006
New Revision: 3293
Modified:
trunk/generic/serverguide/C/network-applications.xml
Log:
include php5 installation, configuration and testing sections
Modified: trunk/generic/serverguide/C/network-applications.xml
==============================================================================
--- trunk/generic/serverguide/C/network-applications.xml (original)
+++ trunk/generic/serverguide/C/network-applications.xml Fri Sep 15
09:21:21 2006
@@ -1969,6 +1969,106 @@
</para>
</sect2>
</sect1>
+
+ <sect1 id="php5" status="complete">
+ <title>PHP5 - Scripting Language</title>
+ <para>PHP is a general-purpose scripting language suited for Web
+ development. The PHP script can be embedded into HTML. This
+ section explains how to install and configure PHP5 in Ubuntu
+ System with Apache2 and MySQL.</para>
+ <para> This section assumes you have installed and configured
+ Apache 2 Web Server and MySQL Database Server. You can refer to
+ Apache 2 section and MySQL sections in this document to install and
+ configure Apache 2 and MySQL respectively.</para>
+
+<sect2 id="php5-installation" status="complete">
+ <title>Installation</title>
+ <para>The PHP5 is available in Ubuntu Linux. </para>
+
+ <procedure><step><para>
+ To install PHP5 you
+ can enter the following command in the terminal prompt:
+
+<screen>
+<command>sudo apt-get install php5-common php5 libapache2-mod-php5</command>
+</screen>
+</para>
+
+ <para>You can run PHP5 scripts from command line. to run PHP5 scripts
+ from command line you should install
+ <application>php5-cgi</application> package. To install
+ <application>php5-cgi</application> you can enter the following
+ command in the terminal prompt:
+<screen>
+<command>sudo apt-get install php5-cgi</command>
+</screen>
+</para>
+ <para>To use <application>MySQL</application> with PHP5 you should
install
+ <application>php5-mysql</application> package. To install
+ <application>php5-mysql</application> you can enter the following
+ command in the terminal prompt:
+<screen>
+<command>sudo apt-get install php5-mysql</command>
+</screen>
+</para>
+ <para>Similarly, to use <application>PostgreSQL</application> with PHP5
you should install
+ <application>php5-pgsql</application> package. To install
+ <application>php5-pgsql</application> you can enter the following
+ command in the terminal prompt:
+<screen>
+<command>sudo apt-get install php5-pgsql</command>
+</screen>
+ </para>
+ </step>
+ </procedure>
+ </sect2>
+ <sect2 id="php5-configuration" status="complete">
+ <title>Configuration</title>
+ <para>
+ Once you install PHP5, you can run PHP5 scripts from your web
+ browser. If you have installed
+ <application>php5-cgi</application> package, you can run PHP5
+ scripts from your command prompt.
+ </para>
+
+ <para>
+ By default, the Apache 2 Web server is configured to run PHP5
+ scripts. In other words, the PHP5 module is enabled in Apache2
+ Web server automatically when you install the module. Please
+ verify if the files
+ <filename>/etc/apache2/mods-enabled/php5.conf</filename> and
+ <filename>/etc/apache2/mods-enabled/php5.load</filename>
+ exist. If they do not exists, you can enable the module using
+ <command>a2enmod</command> command.
+ </para>
+
+ <para>Once you install PHP5 related packages and enabled PHP5
+ Apache 2 module, you should restart Apache2 Web server to run
+ PHP5 scripts. You can run the following command at a terminal
+ prompt to restart your web server:
+<screen><command>sudo /etc/init.d/apache2 restart</command> </screen>
+ </para>
+ </sect2>
+ <sect2 id="php5-testing" status="complete">
+ <title>Testing</title>
+ <para>To verify your installation, you can run following PHP5
+ phpinfo script:
+ </para>
+<programlisting>
+<?php
+print_r (phpinfo());
+?>
+</programlisting>
+ <para>
+ You can save the content in a file
+ <filename>phpinfo.php</filename> and place it
+ under <command>DocumentRoot</command> directory of Apache2 Web
+ server. When point your browser to
+ <filename>http://hostname/phpinfo.php</filename>, it would
+ display values of various PHP5 configuration parameters.
+ </para>
+ </sect2>
+ </sect1>
<sect1 id="squid" status="complete">
<title>Squid - Proxy Server</title>
|