summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/php
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-devtools/php
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-devtools/php')
-rw-r--r--meta-oe/recipes-devtools/php/php.inc133
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch26
-rw-r--r--meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch18
-rw-r--r--meta-oe/recipes-devtools/php/php/fix-fpm-cross-compile.patch38
-rw-r--r--meta-oe/recipes-devtools/php/php/iconv.patch27
-rw-r--r--meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch41
-rw-r--r--meta-oe/recipes-devtools/php/php/pear-makefile.patch13
-rw-r--r--meta-oe/recipes-devtools/php/php/phar-makefile.patch26
-rw-r--r--meta-oe/recipes-devtools/php/php/php-fpm-apache.conf6
-rw-r--r--meta-oe/recipes-devtools/php/php/php-fpm.conf510
-rw-r--r--meta-oe/recipes-devtools/php/php/php_exec_native.patch19
-rw-r--r--meta-oe/recipes-devtools/php/php_5.4.14.bb21
12 files changed, 878 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
new file mode 100644
index 0000000000..d5e53c0e59
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php.inc
@@ -0,0 +1,133 @@
1DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI."
2HOMEPAGE = "http://www.php.net"
3SECTION = "console/network"
4LICENSE = "PHP-3.0"
5BBCLASSEXTEND = "native"
6DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \
7 libc-client openssl"
8DEPENDS_virtclass-native = "zlib-native libxml2-native"
9
10INC_PR = "r5"
11
12# The new PHP downloads server groups PHP releases by major version so find
13# the major version of the PHP recipe.
14PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}"
15
16SRC_URI = "http://museum.php.net/php${PHP_MAJVER}/php-${PV}.tar.bz2"
17
18S = "${WORKDIR}/php-${PV}"
19
20inherit autotools pkgconfig pythonnative gettext
21
22SSTATE_SCAN_FILES += "build-defs.h"
23
24# Common EXTRA_OECONF
25COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared"
26EXTRA_OECONF = "--enable-mbstring \
27 --enable-wddx \
28 --enable-fpm \
29 --with-imap=${STAGING_DIR_HOST} \
30 --with-gettext=${STAGING_LIBDIR}/.. \
31 --with-imap-ssl=${STAGING_DIR_HOST} \
32 --with-zlib=${STAGING_LIBDIR}/.. \
33 --with-iconv=${STAGING_LIBDIR}/.. \
34 --with-libxml-dir=${STAGING_BINDIR_CROSS} \
35 ${COMMON_EXTRA_OECONF} \
36"
37EXTRA_OECONF_virtclass-native = " \
38 --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
39 --with-libxml-dir=${STAGING_BINDIR_NATIVE} \
40 ${COMMON_EXTRA_OECONF} \
41"
42
43PACKAGECONFIG ??= "mysql sqlite3"
44PACKAGECONFIG_class-native = ""
45
46PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \
47 --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \
48 --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \
49 , \
50 ,mysql5"
51
52PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \
53 --with-pdo-sqlite=${STAGING_LIBDIR}/.. \
54 , \
55 ,sqlite3"
56
57export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
58export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
59CFLAGS += " -D_GNU_SOURCE"
60
61EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
62
63acpaths = ""
64
65do_install_append_pn-php-native() {
66 rm -rf ${D}/${libdir}/php/.registry
67 rm -rf ${D}/${libdir}/php/.channels
68 rm -rf ${D}/${libdir}/php/.[a-z]*
69}
70
71# fixme
72do_install_append_pn-php() {
73 install -d ${D}/${sysconfdir}/
74 if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then
75 mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/
76 fi
77 rm -rf ${D}/${TMPDIR}
78 rm -rf ${D}/.registry
79 rm -rf ${D}/.channels
80 rm -rf ${D}/.[a-z]*
81 rm -rf ${D}/var
82 rm -f ${D}/${sysconfdir}/php-fpm.conf.default
83 sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf
84 install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf
85 install -d ${D}/${sysconfdir}/apache2/conf.d
86 install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
87 install -d ${D}${sysconfdir}/init.d
88 sed -i 's:=/usr/sbin:=${sbindir}:g' ${S}/sapi/fpm/init.d.php-fpm
89 sed -i 's:=/etc:=${sysconfdir}:g' ${S}/sapi/fpm/init.d.php-fpm
90 sed -i 's:=/var:=${localstatedir}:g' ${S}/sapi/fpm/init.d.php-fpm
91 install -m 0755 ${S}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm
92 TMP=`dirname ${D}/${TMPDIR}`
93 while test ${TMP} != ${D}; do
94 rmdir ${TMP}
95 TMP=`dirname ${TMP}`;
96 done
97}
98
99PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
100
101RDEPENDS_${PN}-pear = "${PN}"
102RDEPENDS_${PN}-cli = "${PN}"
103RDEPENDS_${PN}-dev = "${PN}"
104
105INITSCRIPT_PACKAGES = "${PN}-fpm"
106inherit update-rc.d
107
108FILES_${PN}-dbg =+ "${bindir}/.debug"
109FILES_${PN}-doc += "${libdir}/php/doc"
110FILES_${PN}-cli = "${bindir}/php"
111FILES_${PN}-cgi = "${bindir}/php-cgi"
112FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm"
113FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
114CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf"
115CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
116INITSCRIPT_NAME_${PN}-fpm = "php-fpm"
117INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60"
118FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${libdir}/php/PEAR \
119 ${libdir}/php/PEAR.php ${libdir}/php/System.php \
120 ${libdir}php/peclcmd.php ${libdir}/php/pearcmd.php \
121 ${libdir}/php/.channels ${libdir}/php/.channels/.alias \
122 ${libdir}/php/.channels\__uri.reg \
123 ${libdir}/php/.channels\pear.php.net.reg \
124 ${libdir}/php/.channels/pecl.php.net.reg \
125 ${libdir}/php/.registry ${libdir}/php/Archive/Tar.php \
126 ${libdir}/php/Console/Getopt.php ${libdir}/php/OS/Guess.php \
127 ${sysconfdir}/pear.conf"
128FILES_${PN}-dev = "${includedir}/php ${libdir}/build ${bindir}/phpize \
129 ${bindir}/php-config ${libdir}/php/.depdb \
130 ${libdir}/php/.depdblock ${libdir}/php/.filemap \
131 ${libdir}/php/.lock ${libdir}/php/test"
132FILES_${PN} = "${libdir}/php"
133FILES_${PN} += "${bindir}"
diff --git a/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
new file mode 100644
index 0000000000..9b71e9d2cc
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
@@ -0,0 +1,26 @@
1From 411ec4b31fdcc524f13fe5be80fd6769b7d16a5d Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 3 Nov 2011 14:27:15 +0100
4Subject: [PATCH] php: don't use broken wrapper for mkdir
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8
9Upstream-Status: Inappropriate
10
11 Makefile.global | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14diff --git a/Makefile.global b/Makefile.global
15index 8dad0e4..abdb5d2 100644
16--- a/Makefile.global
17+++ b/Makefile.global
18@@ -1,4 +1,4 @@
19-mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
20+mkinstalldirs = mkdir -p
21 INSTALL = $(top_srcdir)/build/shtool install -c
22 INSTALL_DATA = $(INSTALL) -m 644
23
24--
251.7.2.5
26
diff --git a/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch b/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch
new file mode 100644
index 0000000000..bf519d2934
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch
@@ -0,0 +1,18 @@
1--- /orig-acinclude.m4 2007-02-20 15:03:25.000000000 +0200
2+++ /acinclude.m4 2007-02-20 15:03:24.000000000 +0200
3@@ -2359,12 +2359,9 @@
4 AC_DEFUN([PHP_SETUP_LIBXML], [
5 AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
6 [
7- for i in $PHP_LIBXML_DIR /usr/local /usr; do
8- if test -x "$i/bin/xml2-config"; then
9- ac_cv_php_xml2_config_path="$i/bin/xml2-config"
10- break
11- fi
12- done
13+
14+ ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
15+
16 ])
17
18 if test -x "$ac_cv_php_xml2_config_path"; then
diff --git a/meta-oe/recipes-devtools/php/php/fix-fpm-cross-compile.patch b/meta-oe/recipes-devtools/php/php/fix-fpm-cross-compile.patch
new file mode 100644
index 0000000000..b009347a21
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/fix-fpm-cross-compile.patch
@@ -0,0 +1,38 @@
1From 0b44f16ea2f18a08eb1249db6621840527eab5e0 Mon Sep 17 00:00:00 2001
2From: Jerome Loyet <fat@php.net>
3Date: Wed, 23 May 2012 11:40:22 +0200
4Subject: [PATCH] - Fixed bug #61839 (Unable to cross-compile PHP with
5 --enable-fpm)
6
7---
8Upstream-Status: Applied
9http://git.php.net/?p=php-src.git;a=commit;h=0b44f16ea2f18a08eb1249db6621840527eab5e0
10
11 NEWS | 1 +
12 sapi/fpm/config.m4 | 4 ++++
13 2 files changed, 5 insertions(+)
14
15diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
16index 8962810..6c860c9 100644
17--- a/sapi/fpm/config.m4
18+++ b/sapi/fpm/config.m4
19@@ -192,6 +192,8 @@ AC_DEFUN([AC_FPM_TRACE],
20 have_ptrace=no
21 have_broken_ptrace=yes
22 AC_MSG_RESULT([no])
23+ ], [
24+ AC_MSG_RESULT([skipped (cross compiling)])
25 ])
26 fi
27
28@@ -264,6 +266,8 @@ AC_DEFUN([AC_FPM_TRACE],
29 ], [
30 proc_mem_file=""
31 AC_MSG_RESULT([no])
32+ ], [
33+ AC_MSG_RESULT([skipped (cross compiling)])
34 ])
35 fi
36
37--
381.7.11.5
diff --git a/meta-oe/recipes-devtools/php/php/iconv.patch b/meta-oe/recipes-devtools/php/php/iconv.patch
new file mode 100644
index 0000000000..f3d2a16bbf
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/iconv.patch
@@ -0,0 +1,27 @@
1diff --git a/acinclude.m4 b/acinclude.m4
2index 4c28b80..d6491a1 100644
3--- a/acinclude.m4
4+++ b/acinclude.m4
5@@ -2439,7 +2439,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
6 dnl Check libc first if no path is provided in --with-iconv
7 dnl
8
9- if test "$PHP_ICONV" = "yes"; then
10+ dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes
11+ if test "$PHP_ICONV" != "no"; then
12 dnl Reset LIBS temporarily as it may have already been included
13 dnl -liconv in.
14 LIBS_save="$LIBS"
15diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
16index d673b0a..1fbef13 100644
17--- a/ext/iconv/config.m4
18+++ b/ext/iconv/config.m4
19@@ -15,7 +15,7 @@ if test "$PHP_ICONV" != "no"; then
20
21 if test "$iconv_avail" != "no"; then
22 if test -z "$ICONV_DIR"; then
23- for i in /usr/local /usr; do
24+ for i in $PHP_ICONV /usr/local /usr; do
25 if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
26 PHP_ICONV_PREFIX="$i"
27 break
diff --git a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
new file mode 100644
index 0000000000..3695b7bc42
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
@@ -0,0 +1,41 @@
1Index: php-5.2.11/ext/imap/config.m4
2===================================================================
3--- php-5.2.11.orig/ext/imap/config.m4 2009-12-10 12:27:52.800974533 -0700
4+++ php-5.2.11/ext/imap/config.m4 2009-12-10 12:28:33.720976583 -0700
5@@ -103,7 +103,7 @@
6 PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
7 AC_DEFINE(HAVE_IMAP,1,[ ])
8
9- for i in $PHP_IMAP /usr/local /usr; do
10+ for i in $PHP_IMAP $PHP_IMAP/usr /usr/local /usr; do
11 IMAP_INC_CHK()
12 el[]IMAP_INC_CHK(/include/c-client)
13 el[]IMAP_INC_CHK(/include/imap)
14@@ -192,13 +192,7 @@
15 AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
16 fi
17
18- if test -r "$IMAP_DIR/c-client/c-client.a"; then
19- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
20- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
21- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
22- fi
23-
24- for lib in c-client4 c-client imap; do
25+ for lib in /usr/lib c-client4 c-client imap; do
26 IMAP_LIB=$lib
27 IMAP_LIB_CHK($PHP_LIBDIR)
28 IMAP_LIB_CHK(c-client)
29Index: php-5.2.11/acinclude.m4
30===================================================================
31--- php-5.2.11.orig/acinclude.m4 2009-12-10 12:37:13.134722881 -0700
32+++ php-5.2.11/acinclude.m4 2009-12-10 12:37:39.342007053 -0700
33@@ -2338,7 +2338,7 @@
34 PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
35 fi
36
37- for i in $PHP_OPENSSL_DIR; do
38+ for i in $PHP_OPENSSL_DIR $PHP_OPENSSL_DIR/usr; do
39 if test -r $i/include/openssl/evp.h; then
40 OPENSSL_INCDIR=$i/include
41 fi
diff --git a/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/meta-oe/recipes-devtools/php/php/pear-makefile.patch
new file mode 100644
index 0000000000..1928b98966
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/pear-makefile.patch
@@ -0,0 +1,13 @@
1diff --git a/pear/Makefile.frag b/pear/Makefile.frag
2index 1f6f70e..b19a77c 100644
3--- a/pear/Makefile.frag
4+++ b/pear/Makefile.frag
5@@ -11,7 +11,7 @@ PEAR_PREFIX = -dp a${program_prefix}
6 PEAR_SUFFIX = -ds a$(program_suffix)
7
8 install-pear-installer: $(SAPI_CLI_PATH)
9- @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
10+ @$(PHP_NATIVE_DIR)/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
11
12 install-pear:
13 @echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/"
diff --git a/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/meta-oe/recipes-devtools/php/php/phar-makefile.patch
new file mode 100644
index 0000000000..6fde251275
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/phar-makefile.patch
@@ -0,0 +1,26 @@
1diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
2index fc93d1d..9a8cd65 100755
3--- a/ext/phar/Makefile.frag
4+++ b/ext/phar/Makefile.frag
5@@ -6,19 +6,8 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
6
7 PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
8 PHP_PHARCMD_EXECUTABLE = ` \
9- if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \
10- $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
11- if test "x$(PHP_MODULES)" != "x"; then \
12- $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
13- for i in bz2 zlib phar; do \
14- if test -f "$(top_builddir)/modules/$$i.la"; then \
15- . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
16- fi; \
17- done; \
18- fi; \
19- else \
20- $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
21- fi;`
22+ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
23+
24 PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
25
26 $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
diff --git a/meta-oe/recipes-devtools/php/php/php-fpm-apache.conf b/meta-oe/recipes-devtools/php/php/php-fpm-apache.conf
new file mode 100644
index 0000000000..77cdd82a74
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/php-fpm-apache.conf
@@ -0,0 +1,6 @@
1# Taken from http://wiki.apache.org/httpd/PHP-FPM
2
3LoadModule proxy_module lib/apache2/modules/mod_proxy.so
4LoadModule proxy_fcgi_module lib/apache2/modules/mod_proxy_fcgi.so
5
6ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/apache2/htdocs/
diff --git a/meta-oe/recipes-devtools/php/php/php-fpm.conf b/meta-oe/recipes-devtools/php/php/php-fpm.conf
new file mode 100644
index 0000000000..21e3dfb5c1
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/php-fpm.conf
@@ -0,0 +1,510 @@
1;;;;;;;;;;;;;;;;;;;;;
2; FPM Configuration ;
3;;;;;;;;;;;;;;;;;;;;;
4
5; All relative paths in this configuration file are relative to PHP's install
6; prefix (/usr). This prefix can be dynamicaly changed by using the
7; '-p' argument from the command line.
8
9; Include one or more files. If glob(3) exists, it is used to include a bunch of
10; files from a glob(3) pattern. This directive can be used everywhere in the
11; file.
12; Relative path can also be used. They will be prefixed by:
13; - the global prefix if it's been set (-p arguement)
14; - /usr otherwise
15;include=etc/fpm.d/*.conf
16
17;;;;;;;;;;;;;;;;;;
18; Global Options ;
19;;;;;;;;;;;;;;;;;;
20
21[global]
22; Pid file
23; Note: the default prefix is /var
24; Default Value: none
25;pid = run/php-fpm.pid
26
27; Error log file
28; If it's set to "syslog", log is sent to syslogd instead of being written
29; in a local file.
30; Note: the default prefix is /var
31; Default Value: log/php-fpm.log
32;error_log = log/php-fpm.log
33
34; syslog_facility is used to specify what type of program is logging the
35; message. This lets syslogd specify that messages from different facilities
36; will be handled differently.
37; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
38; Default Value: daemon
39;syslog.facility = daemon
40
41; syslog_ident is prepended to every message. If you have multiple FPM
42; instances running on the same server, you can change the default value
43; which must suit common needs.
44; Default Value: php-fpm
45;syslog.ident = php-fpm
46
47; Log level
48; Possible Values: alert, error, warning, notice, debug
49; Default Value: notice
50;log_level = notice
51
52; If this number of child processes exit with SIGSEGV or SIGBUS within the time
53; interval set by emergency_restart_interval then FPM will restart. A value
54; of '0' means 'Off'.
55; Default Value: 0
56;emergency_restart_threshold = 0
57
58; Interval of time used by emergency_restart_interval to determine when
59; a graceful restart will be initiated. This can be useful to work around
60; accidental corruptions in an accelerator's shared memory.
61; Available Units: s(econds), m(inutes), h(ours), or d(ays)
62; Default Unit: seconds
63; Default Value: 0
64;emergency_restart_interval = 0
65
66; Time limit for child processes to wait for a reaction on signals from master.
67; Available units: s(econds), m(inutes), h(ours), or d(ays)
68; Default Unit: seconds
69; Default Value: 0
70;process_control_timeout = 0
71
72; The maximum number of processes FPM will fork. This has been design to control
73; the global number of processes when using dynamic PM within a lot of pools.
74; Use it with caution.
75; Note: A value of 0 indicates no limit
76; Default Value: 0
77; process.max = 128
78
79; Specify the nice(2) priority to apply to the master process (only if set)
80; The value can vary from -19 (highest priority) to 20 (lower priority)
81; Note: - It will only work if the FPM master process is launched as root
82; - The pool process will inherit the master process priority
83; unless it specified otherwise
84; Default Value: no set
85; process.priority = -19
86
87; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
88; Default Value: yes
89;daemonize = yes
90
91; Set open file descriptor rlimit for the master process.
92; Default Value: system defined value
93;rlimit_files = 1024
94
95; Set max core size rlimit for the master process.
96; Possible Values: 'unlimited' or an integer greater or equal to 0
97; Default Value: system defined value
98;rlimit_core = 0
99
100; Specify the event mechanism FPM will use. The following is available:
101; - select (any POSIX os)
102; - poll (any POSIX os)
103; - epoll (linux >= 2.5.44)
104; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
105; - /dev/poll (Solaris >= 7)
106; - port (Solaris >= 10)
107; Default Value: not set (auto detection)
108; events.mechanism = epoll
109
110;;;;;;;;;;;;;;;;;;;;
111; Pool Definitions ;
112;;;;;;;;;;;;;;;;;;;;
113
114; Multiple pools of child processes may be started with different listening
115; ports and different management options. The name of the pool will be
116; used in logs and stats. There is no limitation on the number of pools which
117; FPM can handle. Your system will tell you anyway :)
118
119; Start a new pool named 'www'.
120; the variable $pool can we used in any directive and will be replaced by the
121; pool name ('www' here)
122[www]
123
124; Per pool prefix
125; It only applies on the following directives:
126; - 'slowlog'
127; - 'listen' (unixsocket)
128; - 'chroot'
129; - 'chdir'
130; - 'php_values'
131; - 'php_admin_values'
132; When not set, the global prefix (or /usr) applies instead.
133; Note: This directive can also be relative to the global prefix.
134; Default Value: none
135;prefix = /path/to/pools/$pool
136
137; Unix user/group of processes
138; Note: The user is mandatory. If the group is not set, the default user's group
139; will be used.
140user = nobody
141;group = nobody
142
143; The address on which to accept FastCGI requests.
144; Valid syntaxes are:
145; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
146; a specific port;
147; 'port' - to listen on a TCP socket to all addresses on a
148; specific port;
149; '/path/to/unix/socket' - to listen on a unix socket.
150; Note: This value is mandatory.
151listen = 127.0.0.1:9000
152
153; Set listen(2) backlog. A value of '-1' means unlimited.
154; Default Value: 128 (-1 on FreeBSD and OpenBSD)
155;listen.backlog = -1
156
157; Set permissions for unix socket, if one is used. In Linux, read/write
158; permissions must be set in order to allow connections from a web server. Many
159; BSD-derived systems allow connections regardless of permissions.
160; Default Values: user and group are set as the running user
161; mode is set to 0666
162;listen.owner = nobody
163;listen.group = nobody
164;listen.mode = 0666
165
166; List of ipv4 addresses of FastCGI clients which are allowed to connect.
167; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
168; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
169; must be separated by a comma. If this value is left blank, connections will be
170; accepted from any ip address.
171; Default Value: any
172;listen.allowed_clients = 127.0.0.1
173
174; Specify the nice(2) priority to apply to the pool processes (only if set)
175; The value can vary from -19 (highest priority) to 20 (lower priority)
176; Note: - It will only work if the FPM master process is launched as root
177; - The pool processes will inherit the master process priority
178; unless it specified otherwise
179; Default Value: no set
180; priority = -19
181
182; Choose how the process manager will control the number of child processes.
183; Possible Values:
184; static - a fixed number (pm.max_children) of child processes;
185; dynamic - the number of child processes are set dynamically based on the
186; following directives. With this process management, there will be
187; always at least 1 children.
188; pm.max_children - the maximum number of children that can
189; be alive at the same time.
190; pm.start_servers - the number of children created on startup.
191; pm.min_spare_servers - the minimum number of children in 'idle'
192; state (waiting to process). If the number
193; of 'idle' processes is less than this
194; number then some children will be created.
195; pm.max_spare_servers - the maximum number of children in 'idle'
196; state (waiting to process). If the number
197; of 'idle' processes is greater than this
198; number then some children will be killed.
199; ondemand - no children are created at startup. Children will be forked when
200; new requests will connect. The following parameter are used:
201; pm.max_children - the maximum number of children that
202; can be alive at the same time.
203; pm.process_idle_timeout - The number of seconds after which
204; an idle process will be killed.
205; Note: This value is mandatory.
206pm = dynamic
207
208; The number of child processes to be created when pm is set to 'static' and the
209; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
210; This value sets the limit on the number of simultaneous requests that will be
211; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
212; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
213; CGI. The below defaults are based on a server without much resources. Don't
214; forget to tweak pm.* to fit your needs.
215; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
216; Note: This value is mandatory.
217pm.max_children = 5
218
219; The number of child processes created on startup.
220; Note: Used only when pm is set to 'dynamic'
221; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
222pm.start_servers = 2
223
224; The desired minimum number of idle server processes.
225; Note: Used only when pm is set to 'dynamic'
226; Note: Mandatory when pm is set to 'dynamic'
227pm.min_spare_servers = 1
228
229; The desired maximum number of idle server processes.
230; Note: Used only when pm is set to 'dynamic'
231; Note: Mandatory when pm is set to 'dynamic'
232pm.max_spare_servers = 3
233
234; The number of seconds after which an idle process will be killed.
235; Note: Used only when pm is set to 'ondemand'
236; Default Value: 10s
237;pm.process_idle_timeout = 10s;
238
239; The number of requests each child process should execute before respawning.
240; This can be useful to work around memory leaks in 3rd party libraries. For
241; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
242; Default Value: 0
243;pm.max_requests = 500
244
245; The URI to view the FPM status page. If this value is not set, no URI will be
246; recognized as a status page. It shows the following informations:
247; pool - the name of the pool;
248; process manager - static, dynamic or ondemand;
249; start time - the date and time FPM has started;
250; start since - number of seconds since FPM has started;
251; accepted conn - the number of request accepted by the pool;
252; listen queue - the number of request in the queue of pending
253; connections (see backlog in listen(2));
254; max listen queue - the maximum number of requests in the queue
255; of pending connections since FPM has started;
256; listen queue len - the size of the socket queue of pending connections;
257; idle processes - the number of idle processes;
258; active processes - the number of active processes;
259; total processes - the number of idle + active processes;
260; max active processes - the maximum number of active processes since FPM
261; has started;
262; max children reached - number of times, the process limit has been reached,
263; when pm tries to start more children (works only for
264; pm 'dynamic' and 'ondemand');
265; Value are updated in real time.
266; Example output:
267; pool: www
268; process manager: static
269; start time: 01/Jul/2011:17:53:49 +0200
270; start since: 62636
271; accepted conn: 190460
272; listen queue: 0
273; max listen queue: 1
274; listen queue len: 42
275; idle processes: 4
276; active processes: 11
277; total processes: 15
278; max active processes: 12
279; max children reached: 0
280;
281; By default the status page output is formatted as text/plain. Passing either
282; 'html', 'xml' or 'json' in the query string will return the corresponding
283; output syntax. Example:
284; http://www.foo.bar/status
285; http://www.foo.bar/status?json
286; http://www.foo.bar/status?html
287; http://www.foo.bar/status?xml
288;
289; By default the status page only outputs short status. Passing 'full' in the
290; query string will also return status for each pool process.
291; Example:
292; http://www.foo.bar/status?full
293; http://www.foo.bar/status?json&full
294; http://www.foo.bar/status?html&full
295; http://www.foo.bar/status?xml&full
296; The Full status returns for each process:
297; pid - the PID of the process;
298; state - the state of the process (Idle, Running, ...);
299; start time - the date and time the process has started;
300; start since - the number of seconds since the process has started;
301; requests - the number of requests the process has served;
302; request duration - the duration in µs of the requests;
303; request method - the request method (GET, POST, ...);
304; request URI - the request URI with the query string;
305; content length - the content length of the request (only with POST);
306; user - the user (PHP_AUTH_USER) (or '-' if not set);
307; script - the main script called (or '-' if not set);
308; last request cpu - the %cpu the last request consumed
309; it's always 0 if the process is not in Idle state
310; because CPU calculation is done when the request
311; processing has terminated;
312; last request memory - the max amount of memory the last request consumed
313; it's always 0 if the process is not in Idle state
314; because memory calculation is done when the request
315; processing has terminated;
316; If the process is in Idle state, then informations are related to the
317; last request the process has served. Otherwise informations are related to
318; the current request being served.
319; Example output:
320; ************************
321; pid: 31330
322; state: Running
323; start time: 01/Jul/2011:17:53:49 +0200
324; start since: 63087
325; requests: 12808
326; request duration: 1250261
327; request method: GET
328; request URI: /test_mem.php?N=10000
329; content length: 0
330; user: -
331; script: /home/fat/web/docs/php/test_mem.php
332; last request cpu: 0.00
333; last request memory: 0
334;
335; Note: There is a real-time FPM status monitoring sample web page available
336; It's available in: /usr/share/fpm/status.html
337;
338; Note: The value must start with a leading slash (/). The value can be
339; anything, but it may not be a good idea to use the .php extension or it
340; may conflict with a real PHP file.
341; Default Value: not set
342;pm.status_path = /status
343
344; The ping URI to call the monitoring page of FPM. If this value is not set, no
345; URI will be recognized as a ping page. This could be used to test from outside
346; that FPM is alive and responding, or to
347; - create a graph of FPM availability (rrd or such);
348; - remove a server from a group if it is not responding (load balancing);
349; - trigger alerts for the operating team (24/7).
350; Note: The value must start with a leading slash (/). The value can be
351; anything, but it may not be a good idea to use the .php extension or it
352; may conflict with a real PHP file.
353; Default Value: not set
354;ping.path = /ping
355
356; This directive may be used to customize the response of a ping request. The
357; response is formatted as text/plain with a 200 response code.
358; Default Value: pong
359;ping.response = pong
360
361; The access log file
362; Default: not set
363;access.log = log/$pool.access.log
364
365; The access log format.
366; The following syntax is allowed
367; %%: the '%' character
368; %C: %CPU used by the request
369; it can accept the following format:
370; - %{user}C for user CPU only
371; - %{system}C for system CPU only
372; - %{total}C for user + system CPU (default)
373; %d: time taken to serve the request
374; it can accept the following format:
375; - %{seconds}d (default)
376; - %{miliseconds}d
377; - %{mili}d
378; - %{microseconds}d
379; - %{micro}d
380; %e: an environment variable (same as $_ENV or $_SERVER)
381; it must be associated with embraces to specify the name of the env
382; variable. Some exemples:
383; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
384; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
385; %f: script filename
386; %l: content-length of the request (for POST request only)
387; %m: request method
388; %M: peak of memory allocated by PHP
389; it can accept the following format:
390; - %{bytes}M (default)
391; - %{kilobytes}M
392; - %{kilo}M
393; - %{megabytes}M
394; - %{mega}M
395; %n: pool name
396; %o: ouput header
397; it must be associated with embraces to specify the name of the header:
398; - %{Content-Type}o
399; - %{X-Powered-By}o
400; - %{Transfert-Encoding}o
401; - ....
402; %p: PID of the child that serviced the request
403; %P: PID of the parent of the child that serviced the request
404; %q: the query string
405; %Q: the '?' character if query string exists
406; %r: the request URI (without the query string, see %q and %Q)
407; %R: remote IP address
408; %s: status (response code)
409; %t: server time the request was received
410; it can accept a strftime(3) format:
411; %d/%b/%Y:%H:%M:%S %z (default)
412; %T: time the log has been written (the request has finished)
413; it can accept a strftime(3) format:
414; %d/%b/%Y:%H:%M:%S %z (default)
415; %u: remote user
416;
417; Default: "%R - %u %t \"%m %r\" %s"
418;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
419
420; The log file for slow requests
421; Default Value: not set
422; Note: slowlog is mandatory if request_slowlog_timeout is set
423;slowlog = log/$pool.log.slow
424
425; The timeout for serving a single request after which a PHP backtrace will be
426; dumped to the 'slowlog' file. A value of '0s' means 'off'.
427; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
428; Default Value: 0
429;request_slowlog_timeout = 0
430
431; The timeout for serving a single request after which the worker process will
432; be killed. This option should be used when the 'max_execution_time' ini option
433; does not stop script execution for some reason. A value of '0' means 'off'.
434; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
435; Default Value: 0
436;request_terminate_timeout = 0
437
438; Set open file descriptor rlimit.
439; Default Value: system defined value
440;rlimit_files = 1024
441
442; Set max core size rlimit.
443; Possible Values: 'unlimited' or an integer greater or equal to 0
444; Default Value: system defined value
445;rlimit_core = 0
446
447; Chroot to this directory at the start. This value must be defined as an
448; absolute path. When this value is not set, chroot is not used.
449; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
450; of its subdirectories. If the pool prefix is not set, the global prefix
451; will be used instead.
452; Note: chrooting is a great security feature and should be used whenever
453; possible. However, all PHP paths will be relative to the chroot
454; (error_log, sessions.save_path, ...).
455; Default Value: not set
456;chroot =
457
458; Chdir to this directory at the start.
459; Note: relative path can be used.
460; Default Value: current directory or / when chroot
461;chdir = /var/www
462
463; Redirect worker stdout and stderr into main error log. If not set, stdout and
464; stderr will be redirected to /dev/null according to FastCGI specs.
465; Note: on highloaded environement, this can cause some delay in the page
466; process time (several ms).
467; Default Value: no
468;catch_workers_output = yes
469
470; Limits the extensions of the main script FPM will allow to parse. This can
471; prevent configuration mistakes on the web server side. You should only limit
472; FPM to .php extensions to prevent malicious users to use other extensions to
473; exectute php code.
474; Note: set an empty value to allow all extensions.
475; Default Value: .php
476;security.limit_extensions = .php .php3 .php4 .php5
477
478; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
479; the current environment.
480; Default Value: clean env
481;env[HOSTNAME] = $HOSTNAME
482;env[PATH] = /usr/local/bin:/usr/bin:/bin
483;env[TMP] = /tmp
484;env[TMPDIR] = /tmp
485;env[TEMP] = /tmp
486
487; Additional php.ini defines, specific to this pool of workers. These settings
488; overwrite the values previously defined in the php.ini. The directives are the
489; same as the PHP SAPI:
490; php_value/php_flag - you can set classic ini defines which can
491; be overwritten from PHP call 'ini_set'.
492; php_admin_value/php_admin_flag - these directives won't be overwritten by
493; PHP call 'ini_set'
494; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
495
496; Defining 'extension' will load the corresponding shared extension from
497; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
498; overwrite previously defined php.ini values, but will append the new value
499; instead.
500
501; Note: path INI options can be relative and will be expanded with the prefix
502; (pool, global or /usr)
503
504; Default Value: nothing is defined by default except the values in php.ini and
505; specified at startup with the -d argument
506;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
507;php_flag[display_errors] = off
508;php_admin_value[error_log] = /var/log/fpm-php.www.log
509;php_admin_flag[log_errors] = on
510;php_admin_value[memory_limit] = 32M
diff --git a/meta-oe/recipes-devtools/php/php/php_exec_native.patch b/meta-oe/recipes-devtools/php/php/php_exec_native.patch
new file mode 100644
index 0000000000..31be1b70b7
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/php_exec_native.patch
@@ -0,0 +1,19 @@
1---
2 sapi/cli/config.m4 | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5--- php-5.4.14.orig/sapi/cli/config.m4
6+++ php-5.4.14/sapi/cli/config.m4
7@@ -34,11 +34,11 @@ if test "$PHP_CLI" != "no"; then
8 BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
9 ;;
10 esac
11
12 dnl Set executable for tests
13- PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
14+ PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php"
15 PHP_SUBST(PHP_EXECUTABLE)
16
17 dnl Expose to Makefile
18 PHP_SUBST(SAPI_CLI_PATH)
19 PHP_SUBST(BUILD_CLI)
diff --git a/meta-oe/recipes-devtools/php/php_5.4.14.bb b/meta-oe/recipes-devtools/php/php_5.4.14.bb
new file mode 100644
index 0000000000..4e0efb1ede
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php_5.4.14.bb
@@ -0,0 +1,21 @@
1require php.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97"
4
5PR = "${INC_PR}.0"
6
7SRC_URI += "file://acinclude-xml2-config.patch \
8 file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch"
9
10SRC_URI_append_pn-php += "file://iconv.patch \
11 file://imap-fix-autofoo.patch \
12 file://pear-makefile.patch \
13 file://phar-makefile.patch \
14 file://php_exec_native.patch \
15 file://fix-fpm-cross-compile.patch \
16 file://php-fpm.conf \
17 file://php-fpm-apache.conf \
18"
19
20SRC_URI[md5sum] = "cfdc044be2c582991a1fe0967898fa38"
21SRC_URI[sha256sum] = "5450f3843bc651eb3fb00601f0cce1930aaaf65c7c966c02fe4a46f9c81be20a"