PHP is the PHP Hypertext Preprocessor. Primarily used in dynamic web sites, it allows for programming code to be directly embedded into the HTML markup.
Download (HTTP): http://us2.php.net/distributions/php-5.0.3.tar.bz2
Download (FTP): ftp://ftp.isu.edu.tw/pub/Unix/Web/PHP/distributions/php-5.0.3.tar.bz2
Download MD5 sum: fd26455febdddee0977ce226b9108d9c
Download size: 4.4 MB
Estimated disk space required: 101 MB
Estimated build time: 1.29 SBU
Required patch for Berkeley DB: http://www.linuxfromscratch.org/blfs/downloads/6.0/php-5.0.3-db43-1.patch
libxml2-2.6.17, libxslt-1.1.12, OpenSSL-0.9.7e, ClibPDF, libjpeg-6b, libtiff-3.7.1, cURL-7.13.1, QDBM, cdb, GDBM-1.8.3, Berkeley DB-4.3.27, FAM-2.7.0, GD, libpng-1.2.8, X (X.org-6.8.2 or XFree86-4.4.0), FreeType-2.1.9, t1lib, GMP-4.1.4 MySQL-4.1.8a, PCRE-5.0, PostgreSQL-7.4.6, Aspell-0.60, pkgconfig-0.15.0, HTML Tidy-050305, OpenLDAP-2.2.20, Cyrus SASL-2.1.20, MIT krb5-1.4 or Heimdal-0.6.3, libmcrypt, mhash, Net-SNMP, SQLite, Dmalloc, mnoGoSearch, Mini SQL, Empress, Birdstep, DBMaker, Adabas, FrontBase, Caudium, WDDX, FDF Toolkit, Hyperwave, Monetra, expat-1.95.8 and MTA
You can use PHP for server-side scripting, command line scripting or client-side GUI applications. The book provides instructions for setting up PHP for server-side scripting as it is the most common form.
If you have Berkeley DB installed and wish to utilize it, apply the following patch:
patch -Np1 -i ../php-5.0.3-db43-1.patch
Install PHP by running the following commands:
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-apxs2 \
--with-config-file-path=/etc \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--enable-dba \
--enable-exif \
--enable-ftp \
--with-gettext \
--with-iconv \
--with-ncurses \
--with-readline \
--disable-libxml &&
make &&
make install &&
cp php.ini-recommended /etc/php.ini
Remove the --disable-libxml switch if you have libxml2-2.6.17 installed otherwise pear will not be built.
PHP has many more configure options that will enable support for certain things. You can use ./configure --help to see a full list of the available options. Also, use of the PHP web site is highly recommended, as their online docs are very good.
To enable PHP support in the Apache web server, a new LoadModule (this one should be handled automatically by the make install command) and AddType directives must be added to the httpd.conf file:
LoadModule php5_module lib/apache/libphp5.so AddType application/x-httpd-php .php
Also, it can be useful to add an entry for index.php to the DirectoryIndex directive of the httpd.conf file.
The PHP package contains pear, php, php-config, phpextdist and phpize.
Last updated on 2005-02-12 09:53:54 -0700