LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-05-2012, 09:49 AM   #1
tetrahost
LQ Newbie
 
Registered: Jul 2012
Location: Bangladesh
Distribution: CentOS & Redhat
Posts: 2

Rep: Reputation: Disabled
How to have Multiple PHP Version!


Guys, we are having the latest PHP version on our server which is PHP 5.3 and for some client we need have PHP 5.2 as well. Can you please let me know how i can enable 5.2 on the same server? An detail instruction will be appreciated

Im using Linux Server with cPanel/Apache.
 
Old 07-05-2012, 11:02 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Using google search
 
Old 07-06-2012, 02:39 AM   #3
tetrahost
LQ Newbie
 
Registered: Jul 2012
Location: Bangladesh
Distribution: CentOS & Redhat
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks lithos, i will follow the tutorial now.
 
Old 07-06-2012, 09:01 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,047
Blog Entries: 4

Rep: Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656
It is not at all uncommon to have multiple versions of a language-environment on the same machine. You simply have to know how to keep them apart.

You need to put the proper executable ahead of the others in the search-path, and you need to adjust any library-location settings that the executable might refer to. (And you might well need to rebuild that library in a new location under the new version of the language, since many packages conceal quite a bit of complexity under their covers.)

The most common strategy (in Unix/Linux) is to make necessary environment-variable settings in a .bash_profile file for a particular user. It is often advantageous to have that script execute a common (probably home-grown) script that actually issues the right settings so that the latter can be reissued from a script or command-line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to upgrade php from version 5.1.6 to version 5.3.6 on Centos Manpasand Linux - Server 2 08-09-2011 01:54 AM
How to upgrade php from version 5.2.10 to version 5.3.3 on Centos ashlule1 Linux - Newbie 3 10-18-2010 02:55 AM
Upgrade from PHP Version 4.3.9 to PHP 5.2 on CentOS nuttynibbles Linux - Software 10 06-15-2010 02:35 PM
Compiling PHP 5.1.6 from source - php -v and phpinfo() version discrepancy nicky77 Linux - Software 7 03-05-2010 02:44 PM


All times are GMT -5. The time now is 08:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration