-- Paul <z...@zooluserver.com> wrote
(on Friday, 06 August 2010, 12:15 PM -0400):
<snip>
> Can you run two instances of Zend Server CE, one w/ php5.2 the other with
> php5.3?
</snip>

Yes. Zend Server has FastCGI enabled, so you can have mod_php with one
version of PHP, and create FastCGI vhosts for running projects on other
versions of PHP. The steps are relatively easy:

 * In your vhost, you add a few lines:

    ScriptAlias /cgi-bin/ /path/to/zfproject/public/cgi-bin/
    AddHandler php-fcgi .php
    Action php-fcgi /cgi-bin/php-5.3.1

 * Create a "cgi-bin" directory under your "public" directory
 
 * Create a script named "php-5.3.1" (or whatever you want -- just needs
   to be whatever you put in your vhost definition), and have it execute
   the php-cgi binary:

    #!/bin/bash
    exec /path/to/php/install/bin/php-cgi "$@"

   Because it's a CLI/CGI version of PHP, you can pass additional
   arguments to it as well -- which is useful for setting things like
   the include_path, etc.

   Make sure the script is executable.

 * On Zend Server on my ubuntu install, I had to do a few things to
   enable FastCGI: 

   % cd /etc/apache2/mods-enabled
   % sudo ln -s ../mods-available/fastcgi.load .
   % sudo ln -s ../mods-available/fastcgi.conf .
   % sudo ln -s ../mods-available/actions.load .
   % sudo ln -s ../mods-available/actions.conf .

Then restart your server, and you should be set.

-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

Reply via email to