Debian php5 + php4

yatoula

New member
Joined
Sep 7, 2009
Messages
138
Location
France (Metz)
Hi,
my server work with debian lenny, php5 and i want to install php 4 and php 5 because i have a old website.
how to add php4 and also let php5.
Thank you
 
please help me, i have old site i want to used php4, my server is configure with php5 , debian lenny .
I don't now to install ...
Thanks
 
go in /usr/local/directadmin/custombuild
edit options.conf
set PHP-CGI=YES
Save and Exit
./build clean
./build php d

then you should have both version installed
 
Code:
#PHP settings. default_php possible values - 4 or 5, php5_ver - 5.2 or 5.3
default_php=5
php5_ver=5.2
php4_cli=no
php4_cgi=no
php5_cli=no
php5_cgi=yes
zend=yes

#Possible values - 5.0, 5.1
mysql=5.0
mysql_inst=no
mysql_backup=yes

#Possible values - 1.3, 2.0 or 2.2
apache_ver=2.2

#Web applications
phpmyadmin=no
atmail=no
squirrelmail=no
roundcube=no
uebimiau=no

#Mail options
exim=no
mail-header-patch=yes
dovecot=yes

#Statistics
awstats=no
webalizer=yes

#FTP options
proftpd=no

#Jailed shell (beta)
jail=no

#CustomBuild options
custombuild=1.1
autover=no
bold=yes
clean=yes
clean_old_tarballs=no
clean_old_webapps=yes

#Cron settings
cron=no
[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#CustomBuild 1.2 settings
php6_cli=no
php6_cgi=no
php_ini=no
#Possible values - recommended or dist
php_ini_type=recommended
cleanapache=no
fileserver=1
eximconf=no
???
 
Once you've done that, how do you specify the specific version of PHP you want to use?

Jeff
 
Aha! Thanks. That's what I wasn't sure of. What is the default when you set up both? Is it possible to change the default?

Thanks.

Jeff
 
Hi jla,

ive setup both php and php5 as default, maybe yatoula is not enough expert for ask to your questions since i had to install almost everything ^^
 
@SeLLeRoNe:

If you have more to add, please do so.

Thanks to both of you. Remember we're here to help each other.

Thanks!

Jeff
 
I dont understand what he want to do, but, atm PHP5 is default.. i never used both togheter configured via htaccess so, i honestly cant give more hits on it ^^
 
You must install both PHP version as CGI, and than put this code in your htaccess file to pick which version you will use

For PHP 4
<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
AddHandler x-httpd-php4 .php
</FilesMatch>

For PHP 5 put that or nothing to load default version
<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
AddHandler x-httpd-php5 .php
</FilesMatch>
 
I recall something like this, but I always thought you had to create one as an apache mod and the other as cgi-bin (suPhp).

Also, can we set a default if there isn't that code in .htaccess, or perhaps some other code?

What I'd like to be able to offer is something like:

use .php for php4 or use .php5 for php5 (or perhaps the reverse).

Jeff
 
Back
Top