go back to php4

Can I go back to php4? Some software I’m installing won’t use php5…

If so, where do I start with that?

So, first things first…

PHP 4 has been deprecated by the PHP developers. Going back is not a safe option. In fact, it is very likely to be more and more dangerous every day. There will be no more security fixes for PHP 4 (and there haven’t been for several months). So, let’s be very clear: If you do install PHP 4, it should be a stop gap measure used only until your apps have been upgraded, or you migrate to apps that are being updated and support PHP 5.

OK, now that the dire warning is out of the way, on to the advice.

You’ve neglected to mention your OS/version, so I’ll assume CentOS 5.

You can install the php4 packages that we provide in the Virtualmin repos with the following command:

yum install php4 php4-domxml php4-gd php4-mysql php4-snmp php4-xmlrpc php4-mbstring

That gives you the most common libraries, as well. You might need others. Depends on your app.

If you’re using Virtualmin Professional and the FastCGI or CGI execution type (the default is FastCGI), you can then switch to this PHP version for only the sites that need the old version, and keep using PHP 5 for the sites that work with the current version.

If you’re using mod_php (the default in Virtualmin GPL), you’ll have to choose one version to load, and comment out the other…that’s in /etc/httpd/conf.d/php.conf and /etc/httpd/conf.d/php4.conf.

I’m on Centos 5 and Virtualmin Pro.

I just have one site that needs PHP4 and it will only be temporary while they finish testing the updated PHP version software. From what I’m reading above, I can do this for the one.

It is using SQL tables too (in case that makes a difference). Can I run that downgrade in Virtualmin or is there a different yum command I’ll need to use?

never mind. I have to run the yum install THEN do the Fast CGI stuff. Thanks for the help.