Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change 
notification.

The following page has been changed by ChrisPepper:
http://wiki.apache.org/httpd/PHP4AndPHP5

The comment on the change is:
Touch up punctuation & phrasing.

------------------------------------------------------------------------------
  
  == Guide to enabling both PHP4 and PHP5 in different vhosts ==
  
- We often see people asking how to enable both PHP4, and PHP5 for different 
vhosts.  This can be done if you follow the Apache recommended method of 
enabling PHP in the first place.  There is a very popular misconception that 
people should use {{{AddType}}} to enable PHP.  This will not work in this 
scenario and is not recommended.[[BR]]
+ We often see people asking how to enable both PHP4 and PHP5 for different 
vhosts.  This can be done if you follow the Apache recommended method of 
enabling PHP in the first place.  There is a very popular misconception that 
people should use {{{AddType}}} to enable PHP.  This will not work in this 
scenario and is not recommended.[[BR]]
  We won't tell you how to install PHP, but you need to make sure that you 
select different install locations for each version.  You then need to maintain 
a separate copy of {{{php.ini}}} for each install.
  
  The PHP modules should be loaded by having something similar to this in your 
{{{httpd.conf}}}
@@ -18, +18 @@

  ...
  }}}
  
- '''''N.B.''' You need to check the names of the modules you are using, the 
names above may not match what you have on your system''
+ '''''N.B.''' You need to check the names of the modules you are using; the 
names above may not match what you have on your system.''
  
- Once you have added these, you now need to instruct Apache on how to use 
these modules. The Apache recommended way to do this is to use the 
{{{AddHandler}}} directive.  Below is an example of how this can be done :
+ Once you have added these, you now need to instruct Apache on how to use 
these modules. The Apache recommended way to do this is to use the 
{{{AddHandler}}} directive.  Below is an example of how:
  
  {{{
  AddHandler application/x-httpd-php .php .phtml
@@ -58, +58 @@

  
  There are several ways to use these options: 
  
-  1. Set a global default, i.e. PHP5, then using {{{RemoveHandler}}} specify 
each vhost that needs to use PHP4.
+  1. Set a global default (i.e. PHP5), then use {{{RemoveHandler}}} to specify 
each vhost that needs to use PHP4.
-  2. Set each each vhost to use a specific version, i.e. Not using a global 
default.  (You could use an {{{Include}}} statement for that, as in example 
vhost 3, where you would include all the required PHP4 directives)
+  2. Set each each vhost to use a specific version (i.e., not use a global 
default).  You could use an {{{Include}}} statement for this, as in vhost 
example 3; the include would include all the required PHP4 directives.
  

Reply via email to