Differences between revisions 34 and 37 (spanning 3 versions)
Revision 34 as of 2017-02-22 00:10:02
Size: 7487
Editor: ?rubinlinux
Comment: Add note about PHP_INI_SCAN_DIR to override --with-config-file-scan-dir
Revision 37 as of 2018-12-14 13:08:39
Size: 7671
Editor: ?matv
Comment: oldstable update / new chapter
Deletions are marked like this. Additions are marked like this.
Line 37: Line 37:
|| [[DebianStretch|Stretch 9]] || [[DebianPkg:stretch/php7.0|7.0.14-2]] ||
|| [[DebianUnstable|unstable
]] || [[DebianPkg:unstable/php7.0|7.0.14-2]] ||
|| [[DebianStretch|Stretch 9]] || [[DebianPkg:stretch/php7.0|7.0]] ||
|| [[DebianUnstable|Buster
10]] || [[DebianPkg:testing/php7.3|7.3]] ||
|| [[DebianUnstable|
unstable]] || [[DebianPkg:unstable/php7.3|7.3]] ||
Line 50: Line 51:
{{{apt-cache search php}}} {{{
$
apt search php
}}}
Line 114: Line 117:
== Jessie 8 errata == == Errata ==
Line 116: Line 119:
Jessie 8 is now Stable. No errata has been logged here for it. === Stretch 9 errata ===
Line 118: Line 121:
== Wheezy 7 errata == Stretch 9 is now stable. No errata has been logged here for it.
Line 120: Line 123:
Wheezy 7 is now OldStable. No errata has been logged here for it. === Jessie 8 errata ===

Jessie 8 is now oldstable. No errata has been logged here for it.

=== Wheezy 7 errata ===

Wheezy 7 is now oldoldStable. No errata has been logged here for it.

Translation(s): none


PHP and Debian

note: this page is a work in progress.

Overview

From the package description:

  PHP is an HTML-embedded scripting language. Much of its syntax is borrowed
  from C, Java and Perl with a couple of unique PHP-specific features thrown
  in. The goal of the language is to allow web developers to write dynamically
  generated pages quickly.

This page contains information and links helpful for users and packagers of PHP software in Debian. It also contains any errata for the latest stable release of Debian. It is not meant to supercede documentation provided in the PHP packages, nor is it meant as a general reference for programming in PHP. For those see the Further Information section.

The first place you should go for information

/usr/share/doc/php*. Most notably, README.Debian and NEWS.Debian, just like any other package. Note that if you are visiting this page while following the directions in that file, abort now because you're in an infinite loop :)

How PHP is packaged in Debian

Available versions

Please check the Debian PTS for specific version information.

Release

PHP version

squeeze 6

5.3.3

wheezy 7

5.4.45

Jessie 8

5.6.29

Stretch 9

7.0

Buster 10

7.3

unstable

7.3

PHP 4 was provided up to DebianEtch (php 4). It was removed and replaced by php5 in DebianLenny. PHP 7.0 was added in Stretch (php7.0).

Available packages

Up until Debian Jessie, for every N where N is a php major version, a metapackage phpN exists which will require at least one functioning php server engine installed (i.e. libapache2-mod-php5, php5-cgi, etc).

Since Debian 9 (Stretch), for every M.N where M is a php major version and N is a php minor version, a metapackage php exists which will require a default phpM.N package which will require at least one functioning PHP server engine (i.e. libapache2-mod-php7.0, php7.0-fpm or php7.0-cgi)

Beyond this, there's always:

$ apt search php

...will give you a long list of php related packages. For more specifics on the package naming schemes, you should check the PHP draft policy in Further Information.

Developer access

See PHP/GitUsage.

Configuration layout

Debian Jessie and below

For each major release N of PHP (where N is 4 or 5), each of the 4 SAPI's (apache/apache2/cgi/cli) have a different central configuration file /etc/phpN/$SAPI/php.ini.

Additionally, each SAPI is configured with the compile-time option

        --with-config-file-scan-dir=/etc/phpN/$SAPI/conf.d

Any file found in this directory ending in .ini will be treated as a configuration file by the PHP SAPI.

Debian Stretch and up

For each major.minor release M.N of PHP (where M is 7 and N is 0, 1, ...), each of the SAPI's (apache2/cgi/fpm/cli/phpdbg/...) have a different central configuration file /etc/php/M.N/$SAPI/php.ini

Additionally, each SAPI is configured with the compile-time option

        --with-config-file-scan-dir=/etc/php/M.N/$SAPI/conf.d

Any file found in this directory ending in .ini will be treated as a configuration file by the PHP SAPI.

The environment variable PHP_INI_SCAN_DIR can be set to override the compile-time option.

For packagers of PHP applications/modules/libraries

You should consider taking a look at the PHP draft policy. There's also a mailing list for web applications packagers, debian-webapps@lists.debian.org . While the list is technically for webapp packaging-related issues, you should feel welcome to post purely PHP-packaging-related questions as well, as there is a significant overlap in the audience and you're more likely to get a response from here than from mailing the PHP packagers.

The extensions are expected to install their configuration to /etc/php/M.N/mods-available for each M.N tuple the extension has been compiled with and enable the extension as appropriate using /usr/lib/php/php-maintscript-helper.

The easiest way how to package PECL extension is to use dh-php package and helpers included within this package.

For those interested in helping with PHP in Debian

The first thing you should do is send an email to the Debian PHP maintainer's list, pkg-php-maint@lists.alioth.debian.org. Help is often needed and always appreciated.

Notes on PHP and security

It's highly recommended that you read README.Debian.security in /usr/share/doc/php*.

In short, security support for PHP places a high load on the package maintainers, because of the volume of security-related issues and the difficulty of working with the upstream authors in finding the fixes. As such, PHP security issues are typically triaged with different priorities based on the particulars of the issue.

  • issues involving features that are broken as designed (safe mode, register globals, etc) are completely ignored
  • issues that require a malicious local user (unless there are compelling reasons otherwise) are ignored.
  • issues involving unsafe application usage (applications not filtering input before passing to certain functions) are usually given a low priority or sometimes even ignored in favor of reporting bugs against the offending applications
  • issues involving remote code execution (buffer overflows, code inclusion, etc) are given the highest priority

The Debian PHP maintainers work fairly closely with the Debian security (esp. secure-testing) teams, as well as the Ubuntu PHP maintainers, so you can be generally assured that properly reported bugs tagged as security-relevant will be handled as promptly and transparently as possible.

Errata

Stretch 9 errata

Stretch 9 is now stable. No errata has been logged here for it.

Jessie 8 errata

Jessie 8 is now oldstable. No errata has been logged here for it.

Wheezy 7 errata

Wheezy 7 is now oldoldStable. No errata has been logged here for it.

Notes on Floating Point Rounding

See PHP/Rounding for some discussion of why floating point rounding does not behave as expected.

Further Information


CategoryPermalink