Multiple PHP versions running as cgi

Posted by Pierre on Server Fault See other posts from Server Fault or by Pierre
Published on 2012-10-25T09:42:20Z Indexed on 2012/10/25 11:03 UTC
Read the original article Hit count: 366

Filed under:
|
|
|

I'm trying to install a second version of PHP, to run alongside the current version of php. I've compiled the latest php source from github (5.5-DEV), and I'm trying to run it as CGI.

Here is my virtual host config:

<VirtualHost *:8055>
    DocumentRoot /Library/WebServer/Documents/
    ScriptAlias /cgi-bin/ /usr/local/php55/cgi

    Action php55-cgi /cgi-bin/php-cgi
    AddHandler php55-cgi .php

    <Directory /Library/WebServer/Documents/>
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order Allow,Deny
        Allow from all
    </Directory>

    DirectoryIndex index.html index.php
</VirtualHost>

But when I go to http://127.0.0.1:8055/info.php, I get the following error:

Forbidden

You don't have permission to access /cgi-bin/php-cgi/info.php on this server

Edit

I'm now switching between

LoadModule php5_module /usr/local/php54/libphp5.so

and

LoadModule php5_module /usr/local/php55/libphp5.so

It works for now, but is not ideal. I would like to have the different versions of php on different virtual hosts

© Server Fault or respective owner

Related posts about apache2

Related posts about php