Results 1 to 3 of 3
-
02-07-2008, 12:54 PM #1New Member
- Join Date
- Feb 2008
- Posts
- 3
Specific PHP version for vhost on vps
Hi guys (and girls),
So... I'm new here, and sadly I come to you with somewhat of a problem. I'm currently hosted on a friends VPS, and he has been good enough to give me his root access account details so I can mess with things if I need to. Good thing he has, too... Because I'm about to need to really mess with some things.
I've hit a brick wall, however.
The VPS is currently running php 4.3, but the CMS software that I am going to use to run my site requires PHP 5. Now, I don't want to arbitrarily update to php5 across the whole VPS, cause I dont know if thats going to knock out scripts on other vhosts. I read about the "run php5 as cgi" thing, but that doesnt really work for me, as the cms I am using has some quite in-depth url rewriting going on, and I dont want to have to make all of the php files for it end with .php5, in case that screws something up.
So, in my research, I came accross this:
wiki.apache.org/httpd/PHP4AndPHP5
The article on the apache wiki refers to a way of setting up a private server, or a VPS in this case, so that an individual vhost will use php5 as opposed to the default php4. "Great", I think... But then after loggin in to the shell and downloading the php-5.2.5 binary, I realised I dont have the first clue how I can install this, without it conflicting with the current PHP4 install, and so that it pick up on things like mySQL, and all the other libraries (gd, libxslt etc).
So, I guess my question is, does anyone know how I can accomplish this? I'm sorry if this isnt the right forum, I put it in the place that made most sense to me... Any help would be gratefully received, as I'm completely dumbfounded right now!
Cheers
David
-
02-07-2008, 02:45 PM #2Aspiring Evangelist
- Join Date
- Aug 2007
- Location
- Greece
- Posts
- 390
You can install one of them as a cgi and then add an AddHandler in the .htaccess file.
You can install via yum or apt-get.NOT a webhost!helping here just for the fun of it!
G(r)eek inside.
-
02-07-2008, 03:10 PM #3Newbie
- Join Date
- Jul 2005
- Posts
- 19
You could run another instance of apache with php5 module. Just copy your httpd.conf to httpd.php5.conf and change the listening port to something other than 80. Then delete all other virtualhosts that you wont use with php5 and change the virtualhost lines to <VirtualHost xxx.xxx.xxx.xxx:port>. Then load the php5 modules instead of php4 ones and start apache with /usr/local/apache/bin/httpd -f /usr/local/apache/conf/httpd.php5.conf