How to install PHP 5.2 and 5.3 together

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
I hope, 5.x does not limit only with 5.2.x and 5.3.x. As 5.4.x is coming soon. Of course this feature will be useful not for all. Otherwise it would be already implemented.
 

NoBaloney2

NoBaloney Internet Svcs.
Joined
Jun 17, 2007
Messages
498
Location
California
why does it matter when 5.2 is eol
Perhaps because you may need it to keep one or more clients happy rather than lose them, when they require 5.2. I'm not saying this is a good idea, only that it may end up being a business decision.

Jeff
 

urbee

Verified User
Joined
Mar 27, 2009
Messages
124
Ok i'm having soo much issues with this.

I've got php 5.3.8 set as cli and 5.2.x as cgi (suphp). When i try to use 5.3 i get

"Warning: Unknown: open_basedir restriction in effect. File(/home/user/domains/domain.com/public_html/index.php) is not within the allowed path(s): (đ‡) in Unknown on line 0"

But open_basedir is not enabled anywhere and i cannot disable it!

Any ideas?
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
And what about

Code:
# cat /usr/local/directadmin/data/users/<user>/httpd.conf
and

Code:
# cat /usr/local/directadmin/data/templates/custom/virtual_host2.conf
???
 

urbee

Verified User
Joined
Mar 27, 2009
Messages
124
No custom vhost exists, and the httpd.conf from the user folder doesnt make any difference. I tried disabling open_basedir inthere but does not help!

It would be awsome as hell if smtalk made a script to configure this automaticly cause i believe i did something wrong :p
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
PM me if you want me to look at your server. I'll give you as low price as it is possible.
 

urbee

Verified User
Joined
Mar 27, 2009
Messages
124
Funny thing also:

php -i |grep open_basedir
open_basedir => no value => no value
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,300
Location
LT, EU
I hope, 5.x does not limit only with 5.2.x and 5.3.x. As 5.4.x is coming soon. Of course this feature will be useful not for all. Otherwise it would be already implemented.
You will have an ability to use any combination :) Even PHP 6.0 (if it will be allowed in the options.conf). We already have CustomBuild 2.0-alpha coded :) The final version of it should be released in December.
 

mmx

Verified User
Joined
May 8, 2005
Messages
114
Location
Montreal, QC, Canada
I've been wondering about the following scenarios (5.2/5.3):

  1. CGI/CGI: can 5.2 and 5.3 both work as CGI? Can custombuild 1.2 handle this type of installation?
  2. CGI/CLI: if I go this route, which has been documented pretty well in this thread, will 5.3 CLI be able to function safely without chown'ing users' files back to owner:apache?
  3. CGI/FPM: is this possible to implement?
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
CGI/CGI: can 5.2 and 5.3 both work as CGI?
Yes

Can custombuild 1.2 handle this type of installation?
No

CGI/CLI: if I go this route, which has been documented pretty well in this thread, will 5.3 CLI be able to function safely without chown'ing users' files back to owner:apache?
I'm not sure, I understand you right here.

CGI/FPM: is this possible to implement?
It seems to be possible.
 

stars

Verified User
Joined
Nov 3, 2010
Messages
65
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
 

Ankh_

New member
Joined
Feb 7, 2012
Messages
3
Same problem here:
Code:
mv: cannot stat `/usr/local/php6': No such file or directory
This should be right:
Code:
[root@zeus custombuild]# php -v
PHP 5.2.17 (cli) (built: Feb  7 2012 12:03:42)
 

bigmen

Verified User
Joined
Apr 5, 2010
Messages
8
Hello,

I would like have two versions:

- PHP 5.3 as FASTCGI
- PHP 5.4 as CLI

But also i would like have PHP 5.3 as default version. I tried this but it's not working:

cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build update
mkdir -p custom/suphp
cp -pf configure/suphp/configure.php5 custom/suphp/configure.php6
perl -pi -e 's/\/usr\/local\/php5/\/usr\/local\/php6/' custom/suphp/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.4
./build set php5_cgi yes
./build set php6_cgi no
./build set php6_cli yes
./build php n
Any idea? :)
 

bigmen

Verified User
Joined
Apr 5, 2010
Messages
8
Hmm, i have some troubles:

php1_release=5.3
php2_release=5.4
php1_mode=fastcgi
php2_mode=fastcgi
Does it work?

./build update
./build clean
./build apache d
./build php d
./build rewrite_confs

After that HTTP won't start :/ :
/usr/lib/apache/mod_fcgid.so: undefined symbol: unixd_config
 
Top