Thanks! That will makes our lives easier, as we are in the process of moving towards 5.3 (getting ready for ZF2!).

So you recommend going with each developer having his/her own local stack rather than central dev server?

Do you recommend VM for this to keep the environments similar?

On 8/6/2010 2:23 PM, Matthew Weier O'Phinney wrote:
-- Paul<[email protected]>  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.

Reply via email to