Home
      CentOS / Blue Quartz
      Online Store
      Main Cobalt Page
      Recent Updates
      Commercial Software
      Tech Support
      How To / Install Notes
      Free Downloads
      Cobalt Related Links
      About Us
      Site News
 
[RaQ 3/4/550] How to Install PHP v4.2.3
 
Step #1 Make a "temp install" directory. 

mkdir /root/php_install
Go into said directory
cd /root/php_install

Step #2 Download PHP 4.2.3 from www.php.net
Step #3 Extract the files from the archive.

tar xfvpz php-4.2.3.tar.gz

Step #4 Go into the PHP directory

cd php-4.2.3

Step #4a This is where it get's tricky. In order to use some features, such as "libpng & libjpeg", you need to make symbolic links. These two links should work for you.

ln -s /usr/lib/libjpeg.so.62 /usr/lib/libjpeg.so
ln -s /usr/lib/libpng.so.3.1.2.1 /usr/lib/libpng.so 

Step #5 This is where you need to pay attention. If it fails this part, do NOT continue. I would recommend doing some research to why it had failed.

./configure --disable-debug --enable-ftp --enable-magic-quotes --enable-mbstring --enable-safe-mode --enable-mm=shared --enable-track-vars --enable-xml --prefix=/usr --enable-wddx=shared --enable-sockets --with-apxs=/usr/sbin/apxs --with-config-file-path=/etc/httpd/4.2.3/ --with-exec-dir=/usr/bin --with-gettext=/usr --with-imap --with-interbase=shared --with-iconv --with-ldap --with-mysql=shared --with-pgsql=shared --with-jpeg-dir=/usr --with-png-dir=/usr --with-regex=system --with-zlib --with-libdir=/usr/lib --with-ttf --with-pdflib=shared

This is ONE LONG LINE!!!  Make sure you paste the entire line in!

Step #7 Now, the hard part. To compile your software. The following command, and then hit enter.

make

Step #8 By now, hopefully the system compiled properly. If not, once again, it is time to do some serious research.  The "make" should have create a bunch more files. Now it is time to do the install (follow the commands, line by line. You should be fine!!)

mkdir /usr/lib/apache/php/4.2.3
mkdir /etc/httpd/4.2.3
cd modules
cp * /usr/lib/apache/php/4.2.3
cd ../.libs/
cp libphp4.so /etc/httpd/modules/libphp4.2.3.so 
cd ..
cp php.ini-dist /etc/httpd/4.2.3/php.ini

Step #9 Now you need to edit your httpd.conf file. For this, you will need to edit 1 file, and make 1 change. Using your favorite editor:

pico /etc/httpd/conf/httpd.conf

Search for the following line.
LoadModule php4_module modules/libphp4.so

Comment out that line (in case you have problems with your new php)
#LoadModule php4_module modules/libphp4.so

Add a line underneath it that looks like this:
LoadModule php4_module modules/libphp4.2.3.so

Save the file. 

Step #10 Restart your apache server. Watch for any errors. If it doesn't start, then your web server is done, all you need to do is comment out the new line, and uncomment out the old line. See, that is why I made you do that.

/etc/rc.d/init.d/httpd restart




Copyright (c) 2006.
NuOnce Networks, Inc.