Networking, Programming and Graphics - Tutorials
ONLINEHOWTO.net Tutorials Category

Php 4.x Support on Fedora core 7 with Plesk 8.4

Type: Code Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Level: Expert Networking, Programming and Graphics - Tutorials Networking, Programming and Graphics - Tutorials Networking, Programming and Graphics - Tutorials 
Networking, Programming and Graphics - Tutorials
Date: 2008-Jul-30
Networking, Programming and Graphics - Tutorials
Visited: 1894 times
Networking, Programming and Graphics - Tutorials
Rating: Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Published: Stephen Think

This is a compile guide for using php4.x in Fedora core 7 with Plesk . Tested with php versions 4.4.4 , 4.4.6, 4.4.7 and 4.4.8 . Plesk versions 8.3 and 8.4. Before we continue i would like to make a note that this article is not meant to show you how to use php 4.x and php 5.x on the same server. My personal opinion is that it generally makes it harder for administration and also it will require one of the php instances to work as CGI or FastCGI, or fcgi , or whatever. This are proven to have slower performance than mod_php .

Another point that i would like to make is that you better think of this as temporary solution. I highly recommend to adapt your code for php 5.x rather than to stick to php 4.x . That i snot because php 4.x is insecure as many sales people will say , i know that your php 4.x code has been working fine for years and your site is still up and working.

Now lets get to the point. Here is what you will need to do.

First we have to install the required development packages so that we are able to compile php as apache 2.x module.
# we will have support for mysql, imap, ftp, GD lib, pear, regular expressions, zend, etc.
yum install flex pcre-devel.i386 pam-devel uw-imap-devel krb5-devel.i386 openssl-devel.i386 mysql-devel.i386 httpd-devel gd-devel.i386
We download the latest tarbal from http://www.php.net and we save it in /opt/php4.x/source
Note that we have to crate that directory first!
As the current version of php4 family is 4.4.8 i will use it for example
mkdir /opt/php4.4.8
mkdir /opt/php4.4.8/source
cd /opt/php4.4.8/source
wget http://us.php.net/distributions/php-4.4.8.tar.gz
tar xvf php-4.4.8.tar.gz
cd php-4.4.8
Once the source is extracted we use this configure options and if all goes smooth proceed to the installation lines (the last two).

Note: For php 4.4.4 if you get error: conflicting types for 'utf8_mime2text'
check here http://bugs.php.net/bug.php?id=39401


./configure --prefix=/opt/php4.4.8 --enable-versioning --with-layout=GNU --enable-libxml --with-libxml-dir=/usr/ --enable-reflection --enable-fastcgi --with-apxs2=/usr/sbin/apxs --with-regex=php --with-zend-vm=CALL --with-mysql=/usr --with-imap --enable-ftp --with-gd=/usr --with-pcre-regex=/usr --with-kerberos --with-imap-ssl

#if no errors show we are ready to build it
make
make install
Rate this tutorial:                    
Post Comment

Need a specific tutorial? Do not hesitate and submit a request!
Your e-mail: