Install PHP 5.2 and 5.5 together

decibel83

Verified User
Joined
Mar 4, 2007
Messages
13
Hi.
Is there a way to have PHP 5.2 and 5.5 together with suPHP enabled?
This for having safe mode on PHP 5.2 for old sites compatibility.
I found some guides about PHP 6 and 5 on the same DirectAdmin server, but not 5.2/5.5.
Could you help me please?
Thank you very much!
Bye.
 
Thanks you very much!
I see that the guide covers PHP 5.4 and not 5.5, is there some particular things to do to also use it?
And it uses custombuild 2, which I know is beta, isn't it?
Is it possible to use custombuild 1.2?
 
You may install any number of PHP versions (5.2, 5.3, 5.4, 5.5, 5.6) either with CB 1.2 or CB 2.0, it does not really matter. The fact is that you should install at least one of them with CustomBuild, so to have all those templates and ready structure in Apache.
 
You may install any number of PHP versions (5.2, 5.3, 5.4, 5.5, 5.6) either with CB 1.2 or CB 2.0, it does not really matter. The fact is that you should install at least one of them with CustomBuild, so to have all those templates and ready structure in Apache.

Thank you very much for your hint, but I cannot understand exactly how it works.
Could you help me to better understand the basics of this?
 
Hey, if the guide is too complicated for you, then use this one (while you're with CB 1.2): http://forum.directadmin.com/showthread.php?t=35175&p=175097#post175097

The guide is not complicated, but I wish to understand the backgrounds of the procedure, just because I wish to know what I'm doing and in this way I could manage any problem I will meet.

Just replace php53 with php55 in the guide.

I've already read this guide, but if I understand well, in that way the PHP 5.2 is the default, but I want to have 5.5 as default and 5.2 activated with the relative handler in the VirtualHost.
So one thing I cannot understand is how DirectAdmin sets the default version of PHP, and what are the meanings of the aliases in versions.txt: for example, where DIrectAdmin uses php53, php54, php55, php6 aliases?
 
A default is that one which is used to parse files with .php, .phtml extensions:

Code:
<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|php55|php56|php6|phtml|phps)$">
[B]AddHandler x-httpd-php52 .inc .php .php3 .php4 .php5 .php52 .phtml[/B]
AddHandler x-httpd-php53 .php53
AddHandler x-httpd-php54 .php54
AddHandler x-httpd-php55 .php55
AddHandler x-httpd-php56 .php56
</FilesMatch>

You may change it to


Code:
<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|php55|php56|php6|phtml|phps)$">
AddHandler x-httpd-php52 .php52
AddHandler x-httpd-php53 .php53
AddHandler x-httpd-php54 .php54
[B]AddHandler x-httpd-php55 .php55 .inc .php .php3 .php4 .php5 .phtml[/B]
AddHandler x-httpd-php56 .php56
</FilesMatch>

or any other php version you have installed.
 
Code:
<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|php55|php56|php6|phtml|phps)$">
AddHandler x-httpd-php52 .php52
AddHandler x-httpd-php53 .php53
AddHandler x-httpd-php54 .php54
[B]AddHandler x-httpd-php55 .php55 .inc .php .php3 .php4 .php5 .phtml[/B]
AddHandler x-httpd-php56 .php56
</FilesMatch>
[/QUOTE]

Yes, thank you very much.
So if I understand well, x-httpd-php52, x-httpd-php53, x-httpd-php54, x-httpd-php55 are the relative to the aliases in versions.txt?
 
Back
Top