Results 1 to 12 of 12
Thread: CPanel/WHM with PHP4 AND PHP5?
-
10-15-2006, 10:29 AM #1Junior Guru Wannabe
- Join Date
- Aug 2006
- Posts
- 67
CPanel/WHM with PHP4 AND PHP5?
Hello,
I have a managed dedicated server with CPanel and WHM that is currently running PHP4.
I need to keep PHP4 since some of the scripts I have installed will not run with PHP5. At the same time I want to develop new scripts on PHP5.
Is it possible to have both without any complications under Cpanel/WHM?
if yes, are there more than one ways to do it?
Thanks
-
10-15-2006, 10:46 AM #2Web Hosting Master
- Join Date
- Apr 2001
- Location
- Paradise
- Posts
- 12,052
Yes, you can, take a look to the Cpanel forums, you'll find a thread about how to set it.
█ Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers - SolusVM/XEN VPS
█ LiteSpeed Powered - R1Soft Continuous Data Protection - 24/7 Chat/Email/Helpdesk Support
█ Cpanel/WHM - Softaculous - R1soft Backup - Litespeed - Cloudlinux -Site Builder- SSH support - Account Migration
█ DowntownHost LLC - In Business since 2001- West/Center/East USA - Netherlands - Singapore
-
10-15-2006, 11:28 AM #3Web Hosting Master
- Join Date
- Sep 2005
- Posts
- 551
I found this searching google: http://forums.powervps.com/showthread.php?p=14032
-
10-15-2006, 11:53 AM #4Web Hosting Master
- Join Date
- Apr 2006
- Posts
- 569
I heard you can have both.
-
10-15-2006, 01:08 PM #5Junior Guru Wannabe
- Join Date
- Aug 2006
- Posts
- 67
Thanks.
I will not do it myself since I am an a managed server and I hope my host will do this for me.
Is this something usual with Cpanel or it is more of a hack?
-
10-15-2006, 01:17 PM #6Web Hosting Master
- Join Date
- Oct 2003
- Posts
- 9,264
zoom123,
Just a note that as php6 was just released you should just convince them to upgrade. Sticking around any longer on the php4 version is a waste of their time.
-
10-15-2006, 01:20 PM #7Web Hosting Rockstar
- Join Date
- Dec 2001
- Location
- 127.0.0.1
- Posts
- 3,642
Originally Posted by DavidSimpli Networks, LLC :: http://www.simplinetworks.com :: Proudly 100% Owned.
Providing Affordable Managed Cloud/VPS Servers & Server Management Solutions.
We offer REAL 24x7x365 in-house support - proudly serving our customers since 2005!
Want to learn more? Give us a call - +1 (844) 4SIMPLI or email sales[@]simplinetworks.com today!
-
10-15-2006, 06:10 PM #8Web Hosting Master
- Join Date
- Aug 2004
- Location
- Earth
- Posts
- 8,154
Is this something usual with Cpanel or it is more of a hack?
Run this script from > http://forums.cpanel.net/showthread....ight=php5+php4
Code:#!/bin/sh # # Copyright (C) 2005 Richard Gannon. All rights reserved. # # Author: Richard Gannon # # This script will install PHP5 as a CGI on a cPanel server using the same configure # selections as the already built PHP4. You can have PHP scripts utilize the PHP5 # engine by using the .php5 extension. # # Version 1.1 # ## PHP_VERSION=5.1.6 WGET=/usr/bin/wget GREP=/bin/grep TAR=/bin/tar AWK=/bin/awk cd /usr/src $WGET -O php.tbz2 http://php.net/get/php-${PHP_VERSION}.tar.bz2/from/this/mirror $TAR -xjvf php.tbz2 rm -f php.tbz2 $WGET http://choon.net/opensource/php/php-${PHP_VERSION}-mail-header.patch cd php-${PHP_VERSION} patch -p1 < /usr/src/php-${PHP_VERSION}-mail-header.patch rm -f /usr/src/php-${PHP_VERSION}-mail-header.patch if [ -e /usr/local/bin/php ]; then PHP=/usr/local/bin/php else PHP=/usr/bin/php fi CFG=`$PHP -i | $GREP configure | sed "s/'//g" | sed "s/\.\/configure \(.*\)--with-apxs.*apxs \(.*\)/\1 \2/"` CFGLINE="${CFG##* => } --prefix=/usr/local/php5 --exec-prefix=/usr/local/php5 --program-suffix=5 --enable-force-cgi-redirect --enable-discard-path" ./configure $CFGLINE make make install cp -f php.ini-recommended /usr/local/php5/lib/php.ini cp /usr/local/php5/bin/php5 /usr/local/cpanel/cgi-sys/php5 chown root:wheel /usr/local/cpanel/cgi-sys/php5 PHP5CONF=`$GREP php5.conf /usr/local/apache/conf/httpd.conf` if [ "$PHP5CONF" = "" ]; then echo "Action application/x-httpd-php5 \"/cgi-sys/php5\"" > /usr/local/apache/conf/php5.conf echo "AddType application/x-httpd-php5 .php5" >> /usr/local/apache/conf/php5.conf echo "Include /usr/local/apache/conf/php5.conf" >> /usr/local/apache/conf/httpd.conf fi CONFIGTEST=`/etc/init.d/httpd configtest | $GREP -m1 Syntax | $AWK '{print $2 }'` if [ "$CONFIGTEST" = "OK" ]; then echo "Restarting Apache now..." /etc/init.d/httpd restart echo "Done. Enjoy PHP5!" else echo "There may have been a problem with this installation." echo "Please check the httpd.conf for syntax with '/etc/init.d/httpd configtest'" fi exit 0
http://forums.cpanel.net/showthread....ight=php5+php4
Since your server is managed, your system administrator should be able to do it without any problems
-
10-16-2006, 12:03 AM #9Web Hosting Master
- Join Date
- Dec 2003
- Posts
- 742
If you play around with .htaccess or the httpd.conf file, you can also make it so that those intending to solely run php5 do not have to rename every php5 script to a .php5 extension (only works if said account plans to just use php5 scripts). I'll have to copy and paste the hack later.
-
10-16-2006, 01:49 AM #10Newbie
- Join Date
- Aug 2004
- Posts
- 12
I can do this in DA?
Meni.
-
10-16-2006, 11:40 AM #11Web Hosting Master
- Join Date
- Jun 2003
- Location
- UK
- Posts
- 6,616
Its possible on DA but you can't run Zend if you do it
Russ Foster - Industry Curmudgeon
Freelance Sysadmin for Hire - email vaserv@gmail.com
-
10-16-2006, 12:23 PM #12Web Hosting Master
- Join Date
- May 2001
- Location
- HK
- Posts
- 3,082
You sure?
I have PHP4 & PHP5 + Zend + eAccelerator running on a DA box with no problem