AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
Hello,

I'll be rally grateful if some one can give us instructions on how to install PHP 5.

On our servers we have 2 versions of PHP php-4.3.3 and php-4.3.7. Each version found in two different locations:
/usr/src/fp-5.0-upgrade/buildapache/php-4.3.3/
/home/cpapachebuild/buildapache/php-4.3.7/

I downloaded php-5.0.0.tar.gz distribution to /home/cpapachebuild/buildapache/php-4.3.7/
Now what are the steps to get PHP 5 installed on the servers?

Can I delete the old versions of PHP? If yes, what are the consequences?

Thank you!
 

Sinewy

Well-Known Member
May 15, 2004
364
1
168
Sydney, Australia
cPanel Access Level
DataCenter Provider
AndyReed said:
Hello,

I'll be rally grateful if some one can give us instructions on how to install PHP 5.

On our servers we have 2 versions of PHP php-4.3.3 and php-4.3.7. Each version found in two different locations:
/usr/src/fp-5.0-upgrade/buildapache/php-4.3.3/
/home/cpapachebuild/buildapache/php-4.3.7/

I downloaded php-5.0.0.tar.gz distribution to /home/cpapachebuild/buildapache/php-4.3.7/
Now what are the steps to get PHP 5 installed on the servers?

Can I delete the old versions of PHP? If yes, what are the consequences?

Thank you!
Firstly, run /scripts/easyapache in SSH on both machines. choose option 5, this should bring you to php 4.3.8.

then:

cd /home/cpapachebuild/buildapache/
wget http://www.xmlsoft.org/sources/libxml2-2.6.11.tar.gz
tar zxf libxml2-2.6.11.tar.gz
cd libxml2-2.6.11
./configure
make
make install

now that you have libxml2 (needed by php 5),

cd /home/cpapachebuild/buildapache/
pico buildscript OR nano buildscript

Find the line which says:

XMLVER=2.5.8

and replace it with:

XMLVER=2.6.11

then find the line which says:

PHPVER=4.3.8

change that to:

PHPVER=5.0.0

then find:

if [ "1" = "1" ]; then
PHPVER=4.3.8
fi


replace that with:

if [ "1" = "1" ]; then
PHPVER=5.0.0
fi

Now find this:

cd $TOPLEVEL

./fetchfile libxml2-$XMLVER.tar.gz
if [ ! -e "libxml2-$XMLVER.tar.gz" ]; then
echo "Unable to fetch libxml2-$XMLVER.tar.gz"
exit
fi

and make sure the line above cd $TOPLEVEL is:

if [ "1" = "1" ]; then

make sure the line IS NOT indented like cd $TOPLEVEL is.

Hit Ctrl x to exit, it'll prompt to save or not, hit y then enter and enter again.

now type:

./buildscript

After that completes, it may say httpd cannot start, please contact sysadmin. Not to worry, type the following in:

pico /usr/local/apache/conf/httpd.conf OR nano /usr/local/apache/conf/httpd.conf

find the line which says:

AddModule mod_php4.c

and replace with:

#AddModule mod_php4.c

then find the line which says: (should be above the AddModule lines)

LoadModule php4_module libexec/libphp4.so

replace with:

#LoadModule php4_module libexec/libphp4.so

again hit ctrl x, type y hit enter, enter again. now type httpd start or httpd restart.

You can remove the source files for any older versions of PHP once you have 5.0.0 working.
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
I am sorry, but I lost you here. What d you mean when you said:

--------------------------------------------------
Now find this:

cd $TOPLEVEL

./fetchfile libxml2-$XMLVER.tar.gz
if [ ! -e "libxml2-$XMLVER.tar.gz" ]; then
echo "Unable to fetch libxml2-$XMLVER.tar.gz"
exit
fi

and make sure the line above cd $TOPLEVEL is:

if [ "1" = "1" ]; then

make sure the line IS NOT indented like cd $TOPLEVEL is.

-----------------------------------------------------

Do you mean I should replace cd $TOPLEVEL with if [ "1" = "1" ]; then


Thank you!
 

Sinewy

Well-Known Member
May 15, 2004
364
1
168
Sydney, Australia
cPanel Access Level
DataCenter Provider
AndyReed said:
I am sorry, but I lost you here. What d you mean when you said:

--------------------------------------------------
Now find this:

cd $TOPLEVEL

./fetchfile libxml2-$XMLVER.tar.gz
if [ ! -e "libxml2-$XMLVER.tar.gz" ]; then
echo "Unable to fetch libxml2-$XMLVER.tar.gz"
exit
fi

and make sure the line above cd $TOPLEVEL is:

if [ "1" = "1" ]; then

make sure the line IS NOT indented like cd $TOPLEVEL is.

-----------------------------------------------------

Do you mean I should replace cd $TOPLEVEL with if [ "1" = "1" ]; then


Thank you!
what you need to do is find that paragraph i mentioned, look at the line above, it should be one of the following:

if [ "1" = "1" ]; then
OR
if [ "0" = "1" ]; then

you need to make it:

if [ "1" = "1" ]; then

that's all it means. sorry for my bad wording :\
 

liquidcherry

Well-Known Member
Jan 20, 2004
60
0
156
sorry to interrupt....

if he finds
if [ "1" = "1" ]; then

he dont have to change it,right?
only when he finds

if [ "0" = "1" ]; then

he have to change it to

if [ "1" = "1" ]; then


right?


(not trying to be picky,i will use your whole conversation to make it right on my own) :cool:

Frank
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
Sinewy ,

Thank you very much for your time and really appreciate your help.
Every thing works perfect.

Muchas gracias amigo :)
 

networxhosting

Well-Known Member
PartnerNOC
Apr 22, 2003
80
0
156
Hamilton, Ontario, CANADA
I thought i would post to share the solutions to my problems. I was having similar issues with httpd not starting at ALL, turned out it was because we had ZendOptimizer installed. After commenting out the zend optimizer lines from php.ini, all worked 100%

(also updated libxml2 from source)
 

hostultra

Well-Known Member
Aug 21, 2002
167
0
166
Will installing PHP5 break any scripts that were written for PHP4 ?
I dont want to upgrade if half my customers are going to start complaining about their scripts suddenly stopped working.
 
Feb 29, 2004
12
0
151
I attempted to upgrade to PHP 5.0 today and the apache build failed; I think retried to built it with 4.3.8 at which point it failed again. I am now unable to rebuild apache, so my sites have been down all day.

Any help / suggestions would be VERY GREATLY APPRECIATED :)

Regards,
Stepphen
 
Feb 29, 2004
12
0
151
networxhosting said:
Make sure that your remove the php5 from httpd.conf

I had the same problem when going back to php 4.3.8, as apache still had php5 modules loading in the config
I am so unfamilar with all that, I would be afraid of screwing it up. If you could do it to for me I would be willing to pay you far your time and help :)

Thanks sooo much!
 

kahoz

Well-Known Member
Nov 7, 2003
78
0
156
Portugal
how do i activate long arrays ?

what is the name of the directive ? :confused:

edit: it is register_long_arrays, thanks anyway :)
 
Last edited:
Feb 29, 2004
12
0
151
networxhosting said:
Hey Stephen,

We would be glad to help.

Please see your private messages for our Contact information
Mike was able to resolve all of the problems we were having. Thanks again. I would highly recommend networxhosting!
 

kahoz

Well-Known Member
Nov 7, 2003
78
0
156
Portugal
hi.

well i got two bulletin boards installed in the server (invision/phpbb), the first one doesen't work on the control panel entrace, and the other doesen't want to install, both show blank pages :mad:

any idea ?

thanks in advance.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,755
316
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider