How to install PHP 5.2 and 5.3 together

They can. Your error says that mod_fcgid is compiled for Apache 2.2, but you are running 2.4, so it errors. Please contact me if you'd like me to take a look at it.
 
I got problem with this - I wanted 5.2 as cgi suphp and 5.3 as cli so I ran:

Code:
cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build update
cp -pf configure/ap2/configure.php5 custom/ap2/configure.php6
perl -pi -e 's/php53/phprep/' versions.txt
perl -pi -e 's/php6/php53/' versions.txt
perl -pi -e 's/phprep/php6/' versions.txt
./build set php5_ver 5.2
./build set php6_cgi no
./build set php6_cli yes
./build set php5_cgi yes
./build set php5_cli no
./build php n

but when I ran:

Code:
mv -f /usr/local/php6 /usr/local/php6_old
ln -s /usr/local/php5 /usr/local/php6

I got error: "no such file or directory", and also my apache don't start throwing:

Code:
Starting httpd: httpd: 
Syntax error on line 18 of /etc/httpd/conf/httpd.conf: 
Syntax error on line 1 of /etc/httpd/conf/extra/httpd-phpmodules.conf: 
Cannot load /usr/lib/apache/libphp6.so into server: /usr/lib/apache/libphp6.so: 
cannot open shared object file: No such file or directory


Did you fixed this issue ?


To smtalk, can you be sure the step above working 100% ?
 
Please use CustomBuild 2.0 for PHP 5.3+5.4.

Do you know where i could find a decent guide to get me to this?
i'm updating from 5.3.x to 5.4.x and want to give my customers a way to test their site with 5.4 while 5.3 is still default.

used options in custombuild 2.0 at the moment:

Code:
#PHP settings.
#Default version of PHP is always php1_release. Possible values for php1/php2_release: 5.3, 5.4, 5.5, no. php1/php2_mode: mod_php, fastcgi, php-fpm or suphp)
php1_release=5.3
php2_release=5.4
php1_mode=suphp
php2_mode=mod_php
htscanner=no
php_ini=no
php_timezone=Europe/Brussels
#Possible values - production or development
php_ini_type=production
ioncube=yes
x-mail-header=yes
zend=yes

#HTTP server. Possible values: apache, nginx
webserver=apache

#Apache settings
#Possible value: 2.4
apache_ver=2.4
mod_ruid2=yes
secure_htaccess=no
harden-symlinks-patch=yes
use_hostname_for_alias=no
redirect_host=directadmin.breeze.be
redirect_host_https=no

And how can my customer choose which php version to run?
 
I got problem with this - I wanted 5.2 as cgi suphp and 5.3 as cli so I ran:

Code:
cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build update
cp -pf configure/ap2/configure.php5 custom/ap2/configure.php6
perl -pi -e 's/php53/phprep/' versions.txt
perl -pi -e 's/php6/php53/' versions.txt
perl -pi -e 's/phprep/php6/' versions.txt
./build set php5_ver 5.2
./build set php6_cgi no
./build set php6_cli yes
./build set php5_cgi yes
./build set php5_cli no
./build php n

but when I ran:

Code:
mv -f /usr/local/php6 /usr/local/php6_old
ln -s /usr/local/php5 /usr/local/php6

I got error: "no such file or directory", and also my apache don't start throwing:

Code:
Starting httpd: httpd: 
Syntax error on line 18 of /etc/httpd/conf/httpd.conf: 
Syntax error on line 1 of /etc/httpd/conf/extra/httpd-phpmodules.conf: 
Cannot load /usr/lib/apache/libphp6.so into server: /usr/lib/apache/libphp6.so: 
cannot open shared object file: No such file or directory

Hi


Is the problem resolved?

Please help me dear smtalk :(


regards
 
Last edited:
Hello everyone.

Sorry for digging up old thread but I think it's the best place for this question.

I actually have installed PHP 5.2 (cli) and PHP 5.3 (cgi/suphp). I need to change configuration:
PHP 5.2 (cli) + PHP 5.3 (mod_fcgid) - the only one solution I found is to use custombuild 2.0, but I can't install PHP 5.2 with that script.
Is possible to install PHP 5.2 (cli) + PHP 5.3 (mod_fcgid)?
I need to enable cache system (Opcache/XCache) on 5.3, so i need fastcgi without suPHP.

Best regards :)
 
Here is bellow just an idea how to do it, no specific steps will be posted:

I don't know a way how to do it with only CB 2.0 without manual modifications of configs, probably Martynas knows.

If you already have PHP 5.2. there is no need to install it the second time (unless you change Apache 2.2 to Apache 2.4 for example). All you need is to backup current settings of apache and install PHP 5.3 (mod_fcgid) with custombuild 2.0, soon after you might need manually update your apache configuration to allow to use PHP 5.2. That's it.
 
install both 5.2.x and 5.3.x

Hi

in my Dedicated server I install PHP 5.3.28
I need to install both version of php
5.2.X
and
5.3.X
please help me to do that.

SERVER INFO:
php -v
PHP 5.3.28 (cli)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.5.3, Copyright (c) 2002-2014, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies



thanks
 
Back
Top