- Move mod_perl & mod_php into a subsection of their own

- Add information about the different ways mod_perl is available
- Clarify how to install PHP extentions
- Improve readability of the entire section

Reviewed by:	trhodes@, ceri@
Approved by:	ceri@
This commit is contained in:
Brad Davis 2006-01-28 02:04:23 +00:00
parent 7cc50fbdca
commit 21c1052159
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=26986

View file

@ -4461,9 +4461,20 @@ DocumentRoot /www/someotherdomain.tld
</sect3>
<sect3>
<title>Dynamic Websites with Perl &amp; PHP</title>
<para>In the past few years, more businesses have turned to the
Internet in order to enhance their revenue and increase
exposure. This has also increased the need for interactive
web content. While some companies, such as &microsoft;, have
introduced solutions into their proprietary products, the
open source community answered the call. Two options for
dynamic web content include mod_perl &amp; mod_php.</para>
<sect4>
<title>mod_perl</title>
<indexterm><primary>Perl</primary></indexterm>
<indexterm><primary>mod_perl</primary></indexterm>
<indexterm><secondary>Perl</secondary></indexterm>
<para>The <application>Apache</application>/Perl integration project brings together the
full power of the Perl programming language and the <application>Apache
@ -4473,14 +4484,22 @@ DocumentRoot /www/someotherdomain.tld
overhead of starting an external interpreter and the penalty
of Perl start-up time.</para>
<para>If you have not yet installed
<application>Apache</application>, then a version of <application>Apache</application>
that includes <application>mod_perl</application> may be installed with the <filename
role="package">www/apache13-modperl</filename> port.</para>
</sect3>
<para><application>mod_perl</application> is available a few
different ways. To use <application>mod_perl</application>
remember that <application>mod_perl</application> 1.0 only
works with <application>Apache</application> 1.3 and
<application>mod_perl</application> 2.0 only works with
<application>Apache</application> 2.
<application>mod_perl</application> 1.0 is available in
<filename role="package">www/mod_perl</filename> and a
statically compiled version is available in
<filename role="package">www/apache13-modperl</filename>.
<application>mod_perl</application> 2.0 is avaliable in
<filename role="package">www/mod_perl2</filename>.</para>
</sect4>
<sect3>
<sect3info>
<sect4>
<sect4info>
<authorgroup>
<author>
<firstname>Tom</firstname>
@ -4488,25 +4507,19 @@ DocumentRoot /www/someotherdomain.tld
<contrib>Written by </contrib>
</author>
</authorgroup>
</sect3info>
<title>PHP</title>
</sect4info>
<title>mod_php</title>
<indexterm><primary>PHP</primary></indexterm>
<indexterm><primary>mod_php</primary></indexterm>
<indexterm><secondary>PHP</primary></indexterm>
<para>In the past few years, more businesses have turned to the
Internet in order to enhance their revenue and increase
exposure. This has also increased the need for interactive
web content. While some companies, such as &microsoft;, have
introduced solutions into their proprietary products, the
open source community answered the call. One answer, widely
used, is known as <acronym>PHP</acronym>.
<para>PHP, also known as <quote>Hypertext Preprocessor</quote>
is a general-purpose scripting language that is especially
suited for Web development. Capable of being embedded into
<acronym>HTML</acronym> its syntax draws upon C, &java;,
and Perl with the intention of allowing web developers
write dynamically generated webpages quickly.</para>
<para><acronym>PHP</acronym>, also known as <quote>PHP:
Hypertext Preprocessor</quote> is a general-purpose scripting
language that is especially suited for Web development.
Capable of being embedded into <acronym>HTML</acronym> its
syntax draws upon C, &java;, and Perl with the intention of
allowing web developers to write dynamically generated
webpages quickly.</para>
<para>To gain support for <acronym>PHP</acronym>5 for the
<application>Apache</application> web server, begin by
@ -4515,8 +4528,8 @@ DocumentRoot /www/someotherdomain.tld
port.</para>
<para>This will install and configure the modules required
to support dynamic web applications. Check to ensure the
following lines have been added to
to support dynamic <acronym>PHP</acronym> applications. Check
to ensure the following lines have been added to
<filename>/usr/local/etc/apache/httpd.conf</filename>:</para>
<programlisting>LoadModule php5_module libexec/apache/libphp5.so
@ -4530,28 +4543,34 @@ AddModule mod_php5.c
AddType application/x-httpd-php-source .phps
&lt;/IfModule&gt;</programlisting>
<para>Once completed, a simple call to the
<command>apachectl</command> command for a graceful
restart:</para>
<para>Once completed, a simple call to the
<command>apachectl</command> command for a graceful
restart is needed to load the <acronym>PHP</acronym>
module:</para>
<screen>&prompt.root; <userinput>apachectl graceful</userinput></screen>
<para>The <acronym>PHP</acronym> support in &os; is extremely
modular. If support for any extensions is required, an
administrator only needs to install the appropriate port
and restart <application>Apache</application> like recommended
above.</para>
<para>The <acronym>PHP</acronym> support in &os; is extremely
modular so the base install is very limited. It is very easy
to add support using the
<filename role="package">lang/php5-extensions</filename> port.
This port provides a menu driven interface to
<acronym>PHP</acronym> extension installation.
Alternatively, individual extensions can be installed using
the appropriate port.</para>
<para>For instance, to add support for the
<application>MySQL</application> database server to
<acronym>PHP</acronym>5, simply install the
<filename role="package">databases/php5-mysql</filename>
and issue the following command:</para>
port.</para>
<para>After installing an extension, the
<application>Apache</application> server must be reloaded to
pick up the new configuration changes.</para>
<screen>&prompt.root; <userinput>apachectl graceful</userinput></screen>
<para>Which will enable <application>MySQL</application>
support in <acronym>PHP</acronym>.</para>
</sect4>
</sect3>
</sect2>
</sect1>