These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for go back to php4 on the new forum.
This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
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:
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 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?
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.
--
Check out the forum guidelines!
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.