[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ next ]


PHP Policy Draft
Chapter 2 - PHP Interpreters and Engines


2.1 Packages and naming scheme

The PHP engine is provided in one of three types of packages, each providing a different environment for execution.

The first and most commonly used type of package is the "server-side" family of libraries/plugins (such as libapache2-mod-php4) for interpreting PHP pages by web servers. There also exists a "cli" and "cgi" version of the interpreter, as well as a prebuilt set of bundled modules provided along with the PHP source code.

For each version of PHP, the following naming conventions are followed:

phpPHPVERSION

A meta-package depending on one of any of the "server-side" modules, such as libapache2-mod-php4. This is the most common package to have installed for using PHP with web pages.

phpPHPVERSION-cli

Provides the command-line PHP interpreter for use in scripting.

phpPHPVERSION-cgi

Provides the command-line CGI interpreter for use with webservers that provide CGI functionality but do not have built-in support for PHP.

phpPHPVERSION-PHPMODULENAME

One of a small collection of prebuilt php modules such as php4-mysql, which are included with PHP by the upstream authors.


2.2 File and directory layout


2.2.1 PHP executable binaries

The "cli" packages provide the interpreter binary provided in /usr/bin as phpPHPVERSION. For example, /usr/bin/php4.

The "cgi" packages similarly provide the binaries as /usr/bin/phpPHPVERSION-cgi.

In both cases, PHP interpreters use the debian alternatives system for determining what binary will provide /usr/bin/php and /usr/bin/php-cgi


2.2.2 Default include path

The default PHP include path is: .:/etc/php:/usr/local/share/php/5.0:/usr/share/php5:/usr/share/php/5.0:/usr/share/php:/usr/local/share/php

XXX: this still needs to be solidified.

/etc/php is for use by the local administrator. /usr/local/share/php and similar directories are also for local use, but also serve as the root repository for packages locally installed via pear.

/usr/share/php is for all PHP libraries packaged as part of Debian.

/usr/share/phpPHPVERSION and /usr/share/php/PHPVERSION are used for PHP libraries installed via the debian package management system that are dependant on a particular version of PHP.


2.2.3 Configuration files

Each PHP engine has a seperate configuration file located at /etc/phpPHPVERSION/PHPSAPI/php.ini

Additionally, each engine provides a directory at /etc/phpPHPVERSION/PHPSAPI/conf.d where 3rd party PHP libraries and modules can provide additional configuration information.

XXX this second part is not yet true.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ next ]


PHP Policy Draft

$Revision: 73 $

Alexis Sukrieh
Pascal Hakim
Neil McGovern
Sean Finney