%general-entities; ]> $LastChangedBy$ $Date$ php-&php-version;.tar php PHP-&php-version; PHP Introduction to PHP 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. Package Information Download (HTTP): Download (FTP): Download MD5 sum: &php-md5sum; Download size: &php-size; Estimated disk space required: &php-buildsize; Estimated build time: &php-time; Additional Downloads Required patch for Berkeley DB: Pre-built documentation (optional): PHP Dependencies Required Recommended Optional System Utilities and Libraries , , , , , , (deprecated alternative to ), OSSP mm, Net-SNMP, Dmalloc, recode and an MTA Optional Graphics Utilities and Libraries , , , , X ( or ), ClibPDF, GD, t1lib and FDF Toolkit Optional Web Utilities , , mnoGoSearch, Hyperwave, Caudium and WDDX Optional Data Management Utilities and Libraries , , , , , , QDBM, cdb, SQLite, Mini SQL, Empress, Birdstep, DBMaker, Adabas, FrontBase and Monetra Optional Security/Encryption Utilities and Libraries , , or , libmcrypt and mhash Installation of PHP 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-&php-version;-db43-1.patch 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. Remove the --disable-libxml switch if you have installed otherwise pear will not be built. 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 \ --enable-mbstring \ --with-ncurses \ --with-readline \ --disable-libxml && make To test the results, issue: make test. Note that many of the tests are known to fail. Now, as the root user: make install && cp -v php.ini-recommended /etc/php.ini The pre-built HTML documentation is packaged in two forms: a tarball containing many individual files, useful for quick loading into your browser, and a tarball of one large file, which is useful for using the search utility of your browser. If you downloaded any of the documentation, the instructions below can be issued by the root user to install it (note these instructions assume English docs, modify the tarball names below if necessary). For the Single HTML tarball: install -v -m644 ../php_manual_en.html.gz \ /usr/share/doc/php-&php-version; && gunzip -v /usr/share/doc/php-&php-version;/php_manual_en.html.gz For the Many HTML files tarball: install -v -m755 -d /usr/share/doc/php-&php-version; && tar -xvf ../php_manual_en.tar.gz -C /usr/share/doc/php-&php-version; && chown -v -R root:root /usr/share/doc/php-&php-version;/html Command Explanations --with-apxs2: This parameter builds the Apache HTTPD 2.0 module. --with-config-file-path=/etc: This parameter puts the php.ini configuration file in /etc. --with-zlib: This parameter adds support for Zlib compression. --enable-bcmath: Enables bc style precision math functions. --with-bz2: Adds support for Bzip2 compression functions. --enable-calendar: This parameter provides support for calendar conversion. --enable-dba: This parameter enables support for database (dbm-style) abstraction layer functions. --enable-exif: Enables functions to access metadata from images. --enable-ftp: This parameter enables FTP functions. --with-gettext: Enables functions that use Gettext text translation. --enable-mbstring: This parameter enables multibyte string support. --with-ncurses: Provides ncurses terminal independent cursor handling. --with-readline: This parameter enables command line Readline support. --disable-libxml: This parameter allows building PHP without Libxml2 installed. Configuring PHP Config Files /etc/php.ini, /etc/pear.conf /etc/php.ini /etc/pear.conf Configuration Information You may have noticed the following from the output of the make install command: You may want to add: /usr/lib/php to your php.ini include_path If desired, add the entry using the following command as the root user: sed -i 's@php/includes"@&\ninclude_path = ".:/usr/lib/php"@' \ /etc/php.ini To enable PHP support in the Apache web server, a new LoadModule (which 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. You'll need to restart the Apache web server after making any modifications to the httpd.conf file. Contents Installed Programs Installed Library Installed Directories pear, php, php-config, phpextdist, and phpize libphp5.so /usr/include/php and /usr/lib/php Short Descriptions php is a command line interface that enables you to parse and execute PHP code. php pear is the PHP Extension and Application Repository (PEAR) package manager. pear