View Full Version : [ubuntu] PHP4 on Hardy?

May 16th, 2008, 06:37 PM
I know it's old, obsolete, outdated, uncool, not very 2.0, etc.. but I have applications that aren't trivial to migrate to php5 and doing that right now is not an option.

Can I install PHP4 on 8.04? It doesn't show in the repos, and I'm not sure there won't be any problems to compile it myself (since it may rely on old libraries not available in the repos again).

I did a google search for it, but the best I could find was a page in chinese, and, since I don't understand it (sorry, can't learn it right now) I thought it was a good idea to ask about it here.

May 26th, 2008, 09:57 AM
I found these pages:

This is what I did:
1. Download libzzip-0.12 from one of the mirrors in:

2. Choose a repository and add it to synaptic:

3. Reload/update your packages list and install php4-cgi and any other php4 extension you may need like php4-mysql, etc.

4. Activate the apache actions module with

sudo a2enmod actions

5. Finally write a .htaccess file inside your website directory with

AddHandler php-script .php
Action php-script /cgi-bin/php4

This will make all the php files inside that directory and subdirectories to use php4.

You can check the links for more information.

July 16th, 2008, 07:25 PM

After following these steps would it replace a working instance of php5?

I want to run an instance of both php4 (for old applications) and php5 for current development.


father time
September 5th, 2008, 12:48 AM
Message Deleted.