..............-= UPDATED WORKING 100% on plesk 2.5.5 =-................
Upgrade PHP 4.2.2 – plesk standard version -
****REVISED 1 september 2002****
This procedure work #1 then is safe if you just take care then do proper
file backup before proceding at any change cp this file under another name..
Alway play safe...:-)
NOTE: I have 1 script that got problem to date whit php4.2.2 then work fine whit 4.1.2
, i'm currently in way to find why this script report someting wrong, but i think is because the
script use older programing that use fonctions not supported in php4.2.2 or a bug
in Php4.2.2.. Because i cant figure why this script act like this then no one look to have
an answer even the programmer of the script :-(.. So anyway else this Php4.2.2 look runing
great...
1. Backup httpd.conf and libphp4.so in case anything goes wrong.
cp /usr/local/psa/apache/conf/httpd.conf /usr/local/psa/apache/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:
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...
cd /usr/src
wget ftp://ftp.cac.washington.edu/imap/imap-2002.RC4.tar.Z
uncompress imap.tar.Z
tar xvf imap.tar
cd imap-2002.RC4
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
cp /usr/src/imap-2002.RC4/c-client/c-client.a /usr/lib/libc-client.a
cp /usr/src/imap-2002.RC4/src/c-client/mail.h /usr/include
cp /usr/src/imap-2002.RC4/src/c-client/rfc822.h /usr/include
cp /usr/src/imap-2002.RC4/c-client/linkage.h /usr/include
export LDFLAGS="-L/usr/kerberos/lib -lkrb5 -lgssapi_krb5 -lpam"
4. Install libiodbc, another component required by PHP.
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
NOTE: not needed but add a touch ;-)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.
cd /usr/src
wget http://us3.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
--with-gd
--with-mysql=/usr/local/psa/mysql
--with-iodbc=/usr/lib
--with-imap=/usr/src/imap-2002.RC4
--without-kerberos
--with-jpeg-dir=/usr/lib
--with-png-dir=/usr/lib
--with-zlib-dir=/usr/include
--with-mcrypt=/usr/local/lib
Note: this configure string use some option..
you may need some librairy you dont have on your system
You may want to remove the line gd,zlib,mcrypt,png,jpeg or setup as you need
Feel free to add/remove other options as you feel necessary :-)
7. Replace the PHP module used by Apache. /usr/local/psa/apache/bin/apachectl stop
cp -f /usr/src/php-4.2.2/.libs/libphp4.so /usr/local/psa/apache/libexec/libphp4.so
/usr/local/psa/apache/bin/apachectl start
If for some reason apache whont start just do:
cp -f /usr/local/psa/apache/libexec/libphp4.so.mybackup /usr/local/psa/apache/libexec/libphp4.so
then :
/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/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/2.5.5 to the latest PHP4.2.2 and latest apache 1.3.26 whit revision of apache corrected in phpinfo.
Thanks for all help, this will be usefull for a lot I think. As for newbie like me ;-)