Getting PHP4 to work along side PHP5 in Ubuntu Gutsy

I got PHP4, compiled it as CGI.. here’s how.

Install required packages

configured as follows.

This installed it into /home/pookey/php

Enabled per vhost using the following syntax

For some stupid reason I failed to figure out, doc_root needs to be set to the document root for each vhost, and can only be done in php.ini (setting PHP_DOCUMENTATION_ROOT with SetEnv failed). This means each vhost needs it’s own php.ini, which is placed wherever you set PHPRC to.

Using this system, you can have PHP4 and PHP5 mixed even on the same vhost

3 thoughts on “Getting PHP4 to work along side PHP5 in Ubuntu Gutsy”

  1. php.net proper seems to have abandoned php4 source downloads completely, and museum.php.net has been down.

    I was able to snag 4.3.10 sources at:
    > wget ‘http://www.moztips.com/php_gtk/php-4.3.10.tar.gz’

    > md5sum php-4.3.10.tar.gz
    73f5d1f42e34efa534a09c6091b5a21e

    -tim d

Leave a Reply

Your email address will not be published. Required fields are marked *