PHP Installation

php_logoNote: Selinux can cause problems with loading the php module. You may have to disable Selinux.

Prerequisites:

PHP requires the following packages:

  • http-devel-2.2.2-1.2.i386
  • flex-2.5.4.a-41.fc5.i386
  • mysql packages – all of them!!!!
  • libxml2
  • gd-devel (required by WordPress)

Do not use the Fedora Core distro of PHP because it is configured without MYSQL support. download the latest release from www.php.net and compare against that pages checksum like so:

/usr/bin/md5sum php-4.4.3.tar.gz and compare it to the checksum

Installation Procedures:

  • gunzip php-4.4.3.tar.gz
  • tar -xvf php-4.4.3.tar
  • cd php-5.1.2 (for example)
  • ./configure –prefix=/usr/local/php5 –with-apxs2=/usr/sbin/apxs -with-libxml-dir=/usr/lib –with-zlib –with-zlib-dir=/usr/lib –with-mysql=/usr –with-gd –with-png-dir=/usr –with-jpeg-dir=/usr –with-freetype-dir=/usr
  • make
  • make install

Notes:

  • the entry ” –with-mysql=/usr” is correct for FDC5
  • the apx2 entry. this is required if you are running apache2, if not then use apxs.

Test Section:

to test if php is working correctly create a file called test.php and put the following in it:

< ?php
phpinfo ();
?>

Then in your webbrowser: http:xxxxxxxxx/test.php

Leave a Reply


Bad Behavior has blocked 110 access attempts in the last 7 days.