100% HOW TO GUIDE upgrade Plesk2.5.3 / php-4.2.2/ apache 1.3.26

..............-= UPDATED WORKING 100% on plesk 2.5.3 =-................
------------------------
Added revision 1.3.26 fix (let display the good ver. of apache when you see in phpinfo)
------------------------

Upgrade PHP 4.2.2 – plesk standard version
(/usr/local/psa/home/vhosts)

PHP 4.2.2, and it includes "Highly improved performance" and "Lots of fixes and new functions"...so I figured it was worth installing. Here are the steps for the benefit of others that would like to upgrade.

1. Backup httpd.conf and libphp4.so in case anything goes wrong.
code:

cd /usr/local/psa/apache
cp conf/httpd.conf conf/httpd.conf.mybackup
cp libexec/libphp4.so libexec/libphp4.so.mybackup


2. Get current PHP info. Create a PHP file (phpinfo.php, for example) in the httpdocs folder of one of your domains. This file should contain:
code:

<? phpinfo(); ?>

When you view this file through your browser (ie., http://www.yourdomain.com/phpinfo.php ), it'll show you lots of information about the PHP installation on your server. Save the output to a local file so you can compare it to similar output after the upgrade.

3. Download and compile IMAP. This is used by Webmail, so it's required by PHP...
code:

cd /usr/local/src
wget ftp://ftp.cac.washington.edu/imap/imap.tar.Z
uncompress imap.tar.Z
tar xvf imap.tar
cd imap-2002.RC2
make slx



Also, copy the IMAP client header and lib files to appropriate places, as described at http://www.php.net/manual/en/ref.imap.php

code:

mkdir /usr/lib/libc-client.a
cp /usr/local/src/imap-2002.RC2/c-client/c-client.a /usr/lib/libc-client.a
cp /usr/local/src/imap-2002.RC2/src/c-client/mail.h /usr/include
cp /usr/local/src/imap-2002.RC2/src/c-client/rfc822.h /usr/include
cp /usr/local/src/imap-2002.RC2/c-client/linkage.h /usr/include
export LDFLAGS="-L/usr/kerberos/lib -lkrb5 -lgssapi_krb5 -lpam"


4. Install libiodbc, another component required by PHP.
code:

rpm -U http://www.iodbc.org/dist/libiodbc-...386-glibc21.rpm
rpm -U http://www.iodbc.org/dist/libiodbc-...386-glibc21.rpm


5. Do apache revision correction
cp /usr/local/psa/apache/include/httpd.h httpd.h.mybackup
pico /usr/local/psa/apache/include/httpd.h
Ctrl+W (to do a search) type : 1.3 then hit ENTER
Replace : SERVER_BASEREVISION "1.3.xx" by
SERVER_BASEREVISION "1.3.26"
Then now do a CTRL+W again type : 10322100 hit enter
Replace : APACHE_RELEASE 10322100 by
APACHE_RELEASE 10326100
CTRL+X (to quit) then hit ‘Y’ (for yes) then hit enter


6. Download and compile PHP.
code:

cd /usr/local/src
wget http://rs1.php.net/do_download.php?...hp-4.2.2.tar.gz
tar xvfz php-4.2.2.tar.gz
cd php-4.2.2
./configure --with-apxs=/usr/local/psa/apache/bin/apxs \
--prefix=/usr/local/psa/apache --with-system-regex \
--with-config-file-path=/usr/local/psa/apache/conf \
--disable-debug --disable-pear --enable-sockets \
--enable-track-vars --without-gd \
--with-mysql=/usr/local/psa/mysql --with-iodbc=/usr/lib \
--with-imap=/usr/local/src/imap-2002.RC2
make

The configuration options here are based on what was displayed in the phpinfo before the upgrade. Feel free to add other options as you feel necessary.


7. Replace the PHP module used by Apache.
code:

/usr/local/psa/apache/bin/apachectl stop
cp -f /usr/local/src/php-4.2.2/.libs/libphp4.so /usr/local/psa/apache/libexec/
/usr/local/psa/apache/bin/apachectl start


8. View phpinfo again by visiting http://www.yourdomain.com/phpinfo.php ... It should now display the new version and other info for PHP.

9. Clean up any unnecessary files in /usr/local/src


If you come across any errors in this procedure, please let me know. There may be better ways to do some of the things I've listed...just mention it and I'll update the procedure. This will update Plesk2.5.3 to the latest PHP4.2.2 and latest apache 1.3.26 whit revision of apache corrected in phpinfo.

Thanks for all help to do this guide, this will be usefull for a lot I think.


If you find any error let me know ;-) Expect this help someone, you may have less search to do, all is there :-)




__________________
-= Newbie but learning Every day =-
-= I'M sleep whit my server =-
-= 115% uptime, may be sometime =-

 

 

 

 

Top