PHP-4.3.6

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

Installation of PHP

Install PHP by running the following commands:

./configure --prefix=/usr --sysconfdir=/etc \
    --with-apxs2 --with-config-file-path=/etc \
    --with-zlib --with-bz2 --enable-ftp --with-gettext \
    --with-iconv --with-mysql=/usr --with-ncurses &&
make &&
make install &&
cp php.ini-recommended /etc/php.ini
[Note]

Note

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.

Configuring PHP

Config files

/etc/php.ini, /etc/pear.conf

Configuration Information

To enable PHP support in the Apache web server, a new AddType directive must be added to the httpd.conf file:

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.

Contents

The PHP package contains pear, php, php-config, phpextdist and phpize.

Description

php

php is a command line interface that enables you to parse and execute PHP code.