25 lines
4.5 KiB
HTML
25 lines
4.5 KiB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>J.3. Approaches to running multiple PHP versions</title><link rel="stylesheet" href="manual.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.74.0"><link rel="home" href="index.html" title="JpGraph Manual"><link rel="up" href="apj.html" title="Appendix J. Setting up PHP5 in parallel with PHP4 in SuSE 10.1"><link rel="prev" href="apjs02.html" title="J.2. Making sure you have the correct Apache2 setup"><link rel="next" href="apjs04.html" title="J.4. Outline of the remainder of the chapter"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">J.3. Approaches to running multiple PHP versions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apjs02.html">Prev</a> </td><th width="60%" align="center">Appendix J. Setting up PHP5 in parallel with PHP4 in SuSE 10.1</th><td width="20%" align="right"> <a accesskey="n" href="apjs04.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2681205"></a>J.3. Approaches to running multiple PHP versions</h2></div></div></div><p>There are two fundamental ways of running multiple versions of PHP on the same server. </p><p>
|
||
</p><div class="orderedlist"><ol type="1"><li><p>Running multiple instances of the HTTPD demon where each instance listens
|
||
on separate addresses and/or ports. </p><p><span class="bold"><strong>Advantage:</strong></span> This is the only way to run
|
||
multiple versions of PHP as (SAPI) modules in Apache2. In addition this has
|
||
some better security since potential crashes will be isolated and not effect
|
||
the other HTTPD demons. </p><p><span class="bold"><strong>Drawback:</strong></span> Running multiple HTTPD
|
||
instances will need more system resources in terms of memory and file
|
||
handlers. </p></li><li><p>Running one instance of the HTTPD demon which is configured to serve
|
||
multiple virtual hosts. This is the approach we have chosen. </p><p><span class="bold"><strong>Advantage:</strong></span> Minimum system overhead and
|
||
relatively easy to setup. </p><p><span class="bold"><strong>Drawback:</strong></span> Only one PHP version can be run
|
||
as a (SAPI) Apache module the other PHP versions must be
|
||
configured/installed as CGI modules. This has a slight performance impact
|
||
and might not be suitable for heavily loaded production sites. (Note: that
|
||
could be overcome with the use of fast-cgi which works by pre-loading an
|
||
instance of PHP in memory which will then be used by the Apache process. See
|
||
Apache2 documentation regarding fast-cgi for more details). </p><p>
|
||
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>There are actually two versions of virtual hosts with apache. By
|
||
name pr by IP-address. In this example we have chosen to match the
|
||
virtual hosts by IP address since for a development server we want
|
||
to be able to use plain IP addresses and not have the added
|
||
complexity of setting up a full DNS server. For more details about
|
||
other differences please see the excellent Apache2 documentation.
|
||
</p></div><p>
|
||
</p></li></ol></div><p>
|
||
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apjs02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="apj.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apjs04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">J.2. Making sure you have the correct Apache2 setup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> J.4. Outline of the remainder of the chapter</td></tr></table></div></body></html>
|