I helped Robbster out on #clug today, building php4 for feisty (it’s been dropped after edgy, in favour of php5). If you want to install it, don’t care about security holes, and want to use the debs I created, add this line to your apt sources list, and go wild:
If on the other hand you want to know how to do it (so when the next PHP security hole appears tomorrow, you can build the latest version yourself), read on:
I’ve never used pbuilder before, so it was fun:
Edit /etc/pbuilderrc
to point to your closest mirror, and uncomment the COMPONENTS
line (so that you get universe included)
Now pbuilder is ready for work. Get the latest sources from debian (Download those 3 files at the end, dsc, orig.tar.gz and diff)
Sit back and watch…
When it’s done, you probably want to create a trivial repository of your debs:
Then add this to your sources.list
Wohoo. Remember to watch out for those security holes…
Comments
After installing php4 using tu
After installing php4 using tumbleweed's .deb files (above), we need to configure apache
It's not difficult:
sudo ln -s /etc/apache2/mods-available/actions.load /etc/apache2/mods-enabled/actions.load
(the command above is one line)sudo /etc/init.d/apache2 restart
.htaccess
file in the directory that you want to have php4 handle.Overwrite the default php5 handler with the php4 cgi handler
AddHandler php-script .php
Action php-script /cgi-bin/php4
and it is all done!
NOTE: there are serious security considerations with running php4 and especially with php4 as a cgi module. .... but if you're like me and need to develop and test against php4, this works just fine.
Reference:
php4 in gutsy
Upgrading to Ubuntu Gutsy and (still) needing php4 support is a problem. After trying to get pbuilder to create ‘official’ debs for php4 I gave up - too many esoteric dependencies.
I took a chance and installed the stock debian etch debs for php4 and they work just fine. Use your favourite debian mirror to find them in http://ftp.au.debian.org/debian/pool/main/p/php4/
Great post!
Thanks for the help!
Post new comment