- php 5.6.0RC1

https://fedoraproject.org/wiki/Changes/Php56
- add php-dbg subpackage
- update php.ini and opcache.ini from upstream production template
- move zts-php to php-cli

* bootstrap build *
This commit is contained in:
Remi Collet 2014-06-19 10:30:29 +02:00
parent a791086e41
commit 70b90e2425
13 changed files with 256 additions and 923 deletions

1
.gitignore vendored
View File

@ -25,3 +25,4 @@ php-5.4.*.bz2
/php-5.5.11-strip.tar.xz /php-5.5.11-strip.tar.xz
/php-5.5.12-strip.tar.xz /php-5.5.12-strip.tar.xz
/php-5.5.13-strip.tar.xz /php-5.5.13-strip.tar.xz
/php-5.6.0RC1-strip.tar.xz

View File

@ -1,55 +0,0 @@
From ab32d36ec65c17b3f890d488d30eb3a8ba012812 Mon Sep 17 00:00:00 2001
From: Anatol Belski <ab@php.net>
Date: Tue, 4 Feb 2014 10:34:11 +0100
Subject: [PATCH] pcre tests go with 8.34 upgrade
---
ext/pcre/tests/bug37911.phpt | 2 +-
ext/pcre/tests/grep2.phpt | 10 ++++++++--
ext/pcre/tests/match_flags3.phpt | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ext/pcre/tests/bug37911.phpt b/ext/pcre/tests/bug37911.phpt
index f788119..2b7481a 100644
--- a/ext/pcre/tests/bug37911.phpt
+++ b/ext/pcre/tests/bug37911.phpt
@@ -37,5 +37,5 @@ array(3) {
string(4) "blub"
}
-Warning: preg_replace_callback(): Numeric named subpatterns are not allowed in %sbug37911.php on line 14
+Warning: preg_replace_callback(): Compilation failed: group name must start with a non-digit at offset %d in %sbug37911.php on line %d
NULL
diff --git a/ext/pcre/tests/grep2.phpt b/ext/pcre/tests/grep2.phpt
index 0cf8d4a..1a8476c 100644
--- a/ext/pcre/tests/grep2.phpt
+++ b/ext/pcre/tests/grep2.phpt
@@ -40,6 +40,12 @@ array(1) {
string(1) "1"
}
bool(true)
-array(0) {
+array(3) {
+ [5]=>
+ string(1) "a"
+ ["xyz"]=>
+ string(2) "q6"
+ [6]=>
+ string(3) "h20"
}
-bool(true)
+bool(false)
diff --git a/ext/pcre/tests/match_flags3.phpt b/ext/pcre/tests/match_flags3.phpt
index f22205e..84deb0b 100644
--- a/ext/pcre/tests/match_flags3.phpt
+++ b/ext/pcre/tests/match_flags3.phpt
@@ -42,5 +42,5 @@ array(1) {
}
}
-Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line 14
+Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %smatch_flags3.php on line %d
bool(false)
--
1.8.4.3

View File

@ -1,511 +0,0 @@
diff -up php-5.5.2RC1/ext/zip/config.m4.systzip php-5.5.2RC1/ext/zip/config.m4
--- php-5.5.2RC1/ext/zip/config.m4.systzip 2013-07-31 10:41:15.000000000 +0200
+++ php-5.5.2RC1/ext/zip/config.m4 2013-08-08 09:24:07.577567241 +0200
@@ -13,65 +13,116 @@ fi
PHP_ARG_WITH(pcre-dir, pcre install prefix,
[ --with-pcre-dir ZIP: pcre install prefix], no, no)
+PHP_ARG_WITH(libzip, libzip,
+[ --with-libzip[=DIR] ZIP: use libzip], no, no)
+
if test "$PHP_ZIP" != "no"; then
+ if test "$PHP_LIBZIP" != "no"; then
+
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+ dnl system libzip, depends on libzip
+ AC_MSG_CHECKING(for libzip)
+ if test -r $PHP_LIBZIP/include/zip.h; then
+ LIBZIP_CFLAGS="-I$PHP_LIBZIP/include"
+ LIBZIP_LIBDIR="$PHP_LIBZIP/$PHP_LIBDIR"
+ AC_MSG_RESULT(from option: found in $PHP_LIBZIP)
+
+ elif test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libzip; then
+ LIBZIP_CFLAGS=`$PKG_CONFIG libzip --cflags`
+ LIBZIP_LIBDIR=`$PKG_CONFIG libzip --variable=libdir`
+ AC_MSG_RESULT(from pkgconfig: found in $LIBZIP_LIBDIR)
- if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
- if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
- elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
else
- AC_MSG_ERROR([Can not find zlib headers under "$PHP_ZLIB_DIR"])
+ for i in /usr/local /usr; do
+ if test -r $i/include/zip.h; then
+ LIBZIP_CFLAGS="-I$i/include"
+ LIBZIP_LIBDIR="$i/$PHP_LIBDIR"
+ AC_MSG_RESULT(in default path: found in $i)
+ break
+ fi
+ done
fi
+
+ if test -z "$LIBZIP_LIBDIR"; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(Please reinstall the libzip distribution)
+ fi
+
+ dnl Could not think of a simple way to check libzip for overwrite support
+ PHP_CHECK_LIBRARY(zip, zip_open,
+ [
+ PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_LIBDIR, ZIP_SHARED_LIBADD)
+ AC_DEFINE(HAVE_LIBZIP,1,[ ])
+ ], [
+ AC_MSG_ERROR(could not find usable libzip)
+ ], [
+ -L$LIBZIP_LIBDIR
+ ])
+
+ AC_DEFINE(HAVE_ZIP,1,[ ])
+ PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c, $ext_shared,, $LIBZIP_CFLAGS)
+ PHP_SUBST(ZIP_SHARED_LIBADD)
else
- for i in /usr/local /usr; do
- if test -f "$i/include/zlib/zlib.h"; then
- PHP_ZLIB_DIR="$i"
- PHP_ZLIB_INCDIR="$i/include/zlib"
- elif test -f "$i/include/zlib.h"; then
- PHP_ZLIB_DIR="$i"
- PHP_ZLIB_INCDIR="$i/include"
+
+ dnl bundled libzip, depends on zlib
+ if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
+ if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
+ PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
+ elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
+ PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
+ else
+ AC_MSG_ERROR([Can not find zlib headers under "$PHP_ZLIB_DIR"])
fi
- done
- fi
+ else
+ for i in /usr/local /usr; do
+ if test -f "$i/include/zlib/zlib.h"; then
+ PHP_ZLIB_DIR="$i"
+ PHP_ZLIB_INCDIR="$i/include/zlib"
+ elif test -f "$i/include/zlib.h"; then
+ PHP_ZLIB_DIR="$i"
+ PHP_ZLIB_INCDIR="$i/include"
+ fi
+ done
+ fi
- dnl # zlib
- AC_MSG_CHECKING([for the location of zlib])
- if test "$PHP_ZLIB_DIR" = "no"; then
- AC_MSG_ERROR([zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located])
- else
- AC_MSG_RESULT([$PHP_ZLIB_DIR])
- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, ZIP_SHARED_LIBADD)
- PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR)
- fi
+ dnl # zlib
+ AC_MSG_CHECKING([for the location of zlib])
+ if test "$PHP_ZLIB_DIR" = "no"; then
+ AC_MSG_ERROR([zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located])
+ else
+ AC_MSG_RESULT([$PHP_ZLIB_DIR])
+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, ZIP_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR)
+ fi
- dnl This is PECL build, check if bundled PCRE library is used
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS=$INCLUDES
- AC_EGREP_CPP(yes,[
+ dnl This is PECL build, check if bundled PCRE library is used
+ old_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS=$INCLUDES
+ AC_EGREP_CPP(yes,[
#include <main/php_config.h>
#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
yes
#endif
- ],[
- PHP_PCRE_REGEX=yes
- ],[
- AC_EGREP_CPP(yes,[
+ ],[
+ PHP_PCRE_REGEX=yes
+ ],[
+ AC_EGREP_CPP(yes,[
#include <main/php_config.h>
#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE)
yes
#endif
- ],[
- PHP_PCRE_REGEX=pecl
- ],[
- PHP_PCRE_REGEX=no
+ ],[
+ PHP_PCRE_REGEX=pecl
+ ],[
+ PHP_PCRE_REGEX=no
+ ])
])
- ])
- CPPFLAGS=$old_CPPFLAGS
+ CPPFLAGS=$old_CPPFLAGS
- PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \
+ PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \
lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c \
lib/zip_strerror.c lib/zip_close.c lib/zip_error_get.c \
lib/zip_file_error_get.c lib/zip_free.c lib/zip_rename.c \
@@ -98,10 +149,11 @@ yes
lib/zip_source_open.c lib/zip_source_pkware.c lib/zip_source_pop.c \
lib/zip_source_read.c lib/zip_source_stat.c"
- AC_DEFINE(HAVE_ZIP,1,[ ])
- PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared)
- PHP_ADD_BUILD_DIR($ext_builddir/lib, 1)
- PHP_SUBST(ZIP_SHARED_LIBADD)
+ AC_DEFINE(HAVE_ZIP,1,[ ])
+ PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared)
+ PHP_ADD_BUILD_DIR($ext_builddir/lib, 1)
+ PHP_SUBST(ZIP_SHARED_LIBADD)
+ fi
dnl so we always include the known-good working hack.
PHP_ADD_MAKEFILE_FRAGMENT
diff -up php-5.5.2RC1/ext/zip/libzip-missing-0.10.h.systzip php-5.5.2RC1/ext/zip/libzip-missing-0.10.h
--- php-5.5.2RC1/ext/zip/libzip-missing-0.10.h.systzip 2013-08-08 09:34:53.338910267 +0200
+++ php-5.5.2RC1/ext/zip/libzip-missing-0.10.h 2013-08-08 09:26:21.244072278 +0200
@@ -0,0 +1,219 @@
+/* Copied from libzip 0.10 */
+
+/* state of change of a file in zip archive */
+
+enum zip_state { ZIP_ST_UNCHANGED, ZIP_ST_DELETED, ZIP_ST_REPLACED,
+ ZIP_ST_ADDED, ZIP_ST_RENAMED };
+
+/* error source for layered sources */
+
+enum zip_les { ZIP_LES_NONE, ZIP_LES_UPPER, ZIP_LES_LOWER, ZIP_LES_INVAL };
+
+typedef zip_int64_t (*zip_source_layered_callback)(struct zip_source *, void *,
+ void *, zip_uint64_t,
+ enum zip_source_cmd);
+
+struct zip_error {
+ int zip_err; /* libzip error code (ZIP_ER_*) */
+ int sys_err; /* copy of errno (E*) or zlib error code */
+ char *str; /* string representation or NULL */
+};
+
+/* zip archive, part of API */
+
+struct zip {
+ char *zn; /* file name */
+ FILE *zp; /* file */
+ struct zip_error error; /* error information */
+
+ unsigned int flags; /* archive global flags */
+ unsigned int ch_flags; /* changed archive global flags */
+
+ char *default_password; /* password used when no other supplied */
+
+ struct zip_cdir *cdir; /* central directory */
+ char *ch_comment; /* changed archive comment */
+ int ch_comment_len; /* length of changed zip archive
+ * comment, -1 if unchanged */
+ zip_uint64_t nentry; /* number of entries */
+ zip_uint64_t nentry_alloc; /* number of entries allocated */
+ struct zip_entry *entry; /* entries */
+ int nfile; /* number of opened files within archive */
+ int nfile_alloc; /* number of files allocated */
+ struct zip_file **file; /* opened files within archive */
+};
+
+/* file in zip archive, part of API */
+
+struct zip_file {
+ struct zip *za; /* zip archive containing this file */
+ struct zip_error error; /* error information */
+ int eof;
+ struct zip_source *src; /* data source */
+};
+
+/* zip archive directory entry (central or local) */
+
+struct zip_dirent {
+ unsigned short version_madeby; /* (c) version of creator */
+ unsigned short version_needed; /* (cl) version needed to extract */
+ unsigned short bitflags; /* (cl) general purpose bit flag */
+ unsigned short comp_method; /* (cl) compression method used */
+ time_t last_mod; /* (cl) time of last modification */
+ unsigned int crc; /* (cl) CRC-32 of uncompressed data */
+ unsigned int comp_size; /* (cl) size of commpressed data */
+ unsigned int uncomp_size; /* (cl) size of uncommpressed data */
+ char *filename; /* (cl) file name (NUL-terminated) */
+ unsigned short filename_len; /* (cl) length of filename (w/o NUL) */
+ char *extrafield; /* (cl) extra field */
+ unsigned short extrafield_len; /* (cl) length of extra field */
+ char *comment; /* (c) file comment */
+ unsigned short comment_len; /* (c) length of file comment */
+ unsigned short disk_number; /* (c) disk number start */
+ unsigned short int_attrib; /* (c) internal file attributes */
+ unsigned int ext_attrib; /* (c) external file attributes */
+ unsigned int offset; /* (c) offset of local header */
+};
+
+/* zip archive central directory */
+
+struct zip_cdir {
+ struct zip_dirent *entry; /* directory entries */
+ int nentry; /* number of entries */
+
+ unsigned int size; /* size of central direcotry */
+ unsigned int offset; /* offset of central directory in file */
+ char *comment; /* zip archive comment */
+ unsigned short comment_len; /* length of zip archive comment */
+};
+
+struct zip_source {
+ struct zip_source *src;
+ union {
+ zip_source_callback f;
+ zip_source_layered_callback l;
+ } cb;
+ void *ud;
+ enum zip_les error_source;
+ int is_open;
+};
+
+/* entry in zip archive directory */
+
+struct zip_entry {
+ enum zip_state state;
+ struct zip_source *source;
+ char *ch_filename;
+ char *ch_extra;
+ int ch_extra_len;
+ char *ch_comment;
+ int ch_comment_len;
+};
+
+void _zip_dirent_finalize(struct zip_dirent *zde)
+{
+ free(zde->filename);
+ zde->filename = NULL;
+ free(zde->extrafield);
+ zde->extrafield = NULL;
+ free(zde->comment);
+ zde->comment = NULL;
+}
+
+void _zip_cdir_free(struct zip_cdir *cd)
+{
+ int i;
+
+ if (!cd)
+ return;
+
+ for (i=0; i<cd->nentry; i++)
+ _zip_dirent_finalize(cd->entry+i);
+ free(cd->comment);
+ free(cd->entry);
+ free(cd);
+}
+
+void _zip_error_fini(struct zip_error *err)
+{
+ free(err->str);
+ err->str = NULL;
+}
+
+void _zip_error_init(struct zip_error *err)
+{
+ err->zip_err = ZIP_ER_OK;
+ err->sys_err = 0;
+ err->str = NULL;
+}
+
+void _zip_unchange_data(struct zip_entry *ze)
+{
+ if (ze->source) {
+ zip_source_free(ze->source);
+ ze->source = NULL;
+ }
+
+ ze->state = ze->ch_filename ? ZIP_ST_RENAMED : ZIP_ST_UNCHANGED;
+}
+
+void _zip_entry_free(struct zip_entry *ze)
+{
+ free(ze->ch_filename);
+ ze->ch_filename = NULL;
+ free(ze->ch_extra);
+ ze->ch_extra = NULL;
+ ze->ch_extra_len = -1;
+ free(ze->ch_comment);
+ ze->ch_comment = NULL;
+ ze->ch_comment_len = -1;
+
+ _zip_unchange_data(ze);
+}
+
+void
+_zip_error_set(struct zip_error *err, int ze, int se)
+{
+ if (err) {
+ err->zip_err = ze;
+ err->sys_err = se;
+ }
+}
+
+void _zip_free(struct zip *za)
+{
+ int i;
+
+ if (za == NULL)
+ return;
+
+ if (za->zn)
+ free(za->zn);
+
+ if (za->zp)
+ fclose(za->zp);
+
+ free(za->default_password);
+ _zip_cdir_free(za->cdir);
+ free(za->ch_comment);
+
+ if (za->entry) {
+ for (i=0; i<za->nentry; i++) {
+ _zip_entry_free(za->entry+i);
+ }
+ free(za->entry);
+ }
+
+ for (i=0; i<za->nfile; i++) {
+ if (za->file[i]->error.zip_err == ZIP_ER_OK) {
+ _zip_error_set(&za->file[i]->error, ZIP_ER_ZIPCLOSED, 0);
+ za->file[i]->za = NULL;
+ }
+ }
+
+ free(za->file);
+ free(za);
+ return;
+}
+
+
diff -up php-5.5.2RC1/ext/zip/php_zip.c.systzip php-5.5.2RC1/ext/zip/php_zip.c
--- php-5.5.2RC1/ext/zip/php_zip.c.systzip 2013-07-31 10:41:15.000000000 +0200
+++ php-5.5.2RC1/ext/zip/php_zip.c 2013-08-08 09:33:59.367735224 +0200
@@ -30,8 +30,20 @@
#include "ext/pcre/php_pcre.h"
#include "ext/standard/php_filestat.h"
#include "php_zip.h"
+
+#if defined(HAVE_LIBZIP)
+#include <zip.h>
+
+#if LIBZIP_VERSION_MAJOR == 0 && LIBZIP_VERSION_MINOR == 10
+#include "libzip-missing-0.10.h"
+#else
+#error "Only libzip 0.10 supported for now"
+#endif
+
+#else
#include "lib/zip.h"
#include "lib/zipint.h"
+#endif
/* zip_open is a macro for renaming libzip zipopen, so we need to use PHP_NAMED_FUNCTION */
static PHP_NAMED_FUNCTION(zif_zip_open);
@@ -1631,6 +1643,10 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
}
idx = zip_stat(intern, s, 0, &sb);
+ /* We don't care about the NOENT status error here. */
+ if (intern->error.zip_err == ZIP_ER_NOENT) {
+ _zip_error_set(&intern->error, ZIP_ER_OK, 0);
+ }
if (idx >= 0) {
RETVAL_FALSE;
} else {
@@ -1853,6 +1869,10 @@ static ZIPARCHIVE_METHOD(addFromString)
}
cur_idx = zip_name_locate(intern, (const char *)name, 0);
+ /* We don't care about the NOENT status error here. */
+ if (intern->error.zip_err == ZIP_ER_NOENT) {
+ _zip_error_set(&intern->error, ZIP_ER_OK, 0);
+ }
/* TODO: fix _zip_replace */
if (cur_idx >= 0) {
if (zip_delete(intern, cur_idx) == -1) {
@@ -2877,5 +2897,9 @@ static PHP_MINFO_FUNCTION(zip)
php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
- php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION);
+#if defined(HAVE_LIBZIP)
+ php_info_print_table_row(2, "Compiled against libzip version", LIBZIP_VERSION);
+#else
+ php_info_print_table_row(2, "Bundled libzip version", LIBZIP_VERSION);
+#endif
php_info_print_table_end();
}
diff -up php-5.5.2RC1/ext/zip/php_zip.h.systzip php-5.5.2RC1/ext/zip/php_zip.h
--- php-5.5.2RC1/ext/zip/php_zip.h.systzip 2013-07-31 10:41:15.000000000 +0200
+++ php-5.5.2RC1/ext/zip/php_zip.h 2013-08-08 09:24:07.579567249 +0200
@@ -28,7 +28,11 @@ extern zend_module_entry zip_module_entr
#include "TSRM.h"
#endif
+#if defined(HAVE_LIBZIP)
+#include <zip.h>
+#else
#include "lib/zip.h"
+#endif
#define PHP_ZIP_VERSION_STRING "1.11.0"
diff -up php-5.5.2RC1/ext/zip/tests/bug38943.phpt.systzip php-5.5.2RC1/ext/zip/tests/bug38943.phpt
--- php-5.5.2RC1/ext/zip/tests/bug38943.phpt.systzip 2013-07-31 10:41:15.000000000 +0200
+++ php-5.5.2RC1/ext/zip/tests/bug38943.phpt 2013-08-08 09:24:07.579567249 +0200
@@ -27,7 +27,7 @@ array(1) {
[0]=>
int(1)
}
-object(myZip)#1 (%d) {
+object(myZip)#%d (%d) {
["test":"myZip":private]=>
int(0)
["testp"]=>
diff -up php-5.5.2RC1/ext/zip/tests/pecl12414.phpt.systzip php-5.5.2RC1/ext/zip/tests/pecl12414.phpt
--- php-5.5.2RC1/ext/zip/tests/pecl12414.phpt.systzip 2013-07-31 10:41:15.000000000 +0200
+++ php-5.5.2RC1/ext/zip/tests/pecl12414.phpt 2013-08-08 09:24:07.579567249 +0200
@@ -5,6 +5,8 @@ Bug #12414 ( extracting files from damag
/*$ */
if(!extension_loaded('zip')) die('skip');
?>
+--XFAIL--
+Doesn't work with system libzip (zip_readfile could not read from ...)
--FILE--
<?php
$filename = 'MYLOGOV2.GFX';
diff -up php-5.5.2RC1/ext/zip/zip_stream.c.systzip php-5.5.2RC1/ext/zip/zip_stream.c
--- php-5.5.2RC1/ext/zip/zip_stream.c.systzip 2013-07-31 10:41:15.000000000 +0200
+++ php-5.5.2RC1/ext/zip/zip_stream.c 2013-08-08 09:24:07.580567252 +0200
@@ -6,7 +6,11 @@
#if HAVE_ZIP
#ifdef ZEND_ENGINE_2
+#if defined(HAVE_LIBZIP)
+#include <zip.h>
+#else
#include "lib/zip.h"
+#endif
#include "php_streams.h"
#include "ext/standard/file.h"

43
php-5.6.0-noNO.patch Normal file
View File

@ -0,0 +1,43 @@
--- ext/standard/tests/strings/setlocale_variation2.phpt.orig 2014-06-11 16:10:00.259326468 +0200
+++ ext/standard/tests/strings/setlocale_variation2.phpt 2014-06-11 16:16:14.396138997 +0200
@@ -52,6 +52,7 @@
//try different locale names
$failure_locale = array();
$success_count = 0;
+$expected = 0;
echo "-- Test setlocale() with all available locale in the system --\n";
// gather all locales installed in the system(stored $all_system_locales),
@@ -61,6 +62,10 @@
if(setlocale(LC_ALL,$value )){
$success_count++;
}
+ else if ($value == 'no_NO.ISO-8859-1') {
+ // ignore this one, see rhbz #971416
+ $expected++;
+ }
else{
//failure values are put in to an array $failure_locale
$failure_locale[] = $value;
@@ -69,11 +74,11 @@
echo "No of locales found on the machine = ".count($all_system_locales)."\n";
echo "No of setlocale() success = ".$success_count."\n";
-echo "Expected no of failures = 0\n";
+echo "Expected no of failures = $expected\n";
echo "Test ";
// check if there were any failure of setlocale() function earlier, if any
// failure then dump the list of failing locales
-if($success_count != count($all_system_locales)){
+if(($success_count + $expected) != count($all_system_locales)){
echo "FAILED\n";
echo "Names of locale() for which setlocale() failed ...\n";
var_dump($failure_locale);
@@ -89,6 +94,6 @@
-- Test setlocale() with all available locale in the system --
No of locales found on the machine = %d
No of setlocale() success = %d
-Expected no of failures = 0
+Expected no of failures = %d
Test PASSED
Done

39
php-5.6.0-oldpcre.patch Normal file
View File

@ -0,0 +1,39 @@
diff -up ./ext/pcre/tests/bug37911.phpt.pcre834 ./ext/pcre/tests/bug37911.phpt
--- ./ext/pcre/tests/bug37911.phpt.pcre834 2014-03-26 14:10:18.285452752 +0100
+++ ./ext/pcre/tests/bug37911.phpt 2014-03-26 14:10:40.028526763 +0100
@@ -37,5 +37,5 @@ array(3) {
string(4) "blub"
}
-Warning: preg_replace_callback(): Compilation failed: group name must start with a non-digit at offset %d in %sbug37911.php on line %d
+Warning: preg_replace_callback(): Numeric named subpatterns are not allowed in %sbug37911.php on line %d
NULL
diff -up ./ext/pcre/tests/grep2.phpt.pcre834 ./ext/pcre/tests/grep2.phpt
--- ./ext/pcre/tests/grep2.phpt.pcre834 2014-03-26 14:08:26.583072531 +0100
+++ ./ext/pcre/tests/grep2.phpt 2014-03-26 14:09:09.345218089 +0100
@@ -40,12 +40,6 @@ array(1) {
string(1) "1"
}
bool(true)
-array(3) {
- [5]=>
- string(1) "a"
- ["xyz"]=>
- string(2) "q6"
- [6]=>
- string(3) "h20"
+array(0) {
}
-bool(false)
+bool(true)
diff -up ./ext/pcre/tests/match_flags3.phpt.pcre834 ./ext/pcre/tests/match_flags3.phpt
--- ./ext/pcre/tests/match_flags3.phpt.pcre834 2014-03-26 14:06:48.792739665 +0100
+++ ./ext/pcre/tests/match_flags3.phpt 2014-03-26 14:07:31.820886128 +0100
@@ -42,5 +42,5 @@ array(1) {
}
}
-Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %smatch_flags3.php on line %d
+Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line %d
bool(false)
diff -up ./ext/standard/tests/strings/setlocale_variation2.phpt.pcre834 ./ext/standard/tests/strings/setlocale_variation2.phpt

View File

@ -1,32 +0,0 @@
From 4fcb9a9d1b1063a65fbeb27395de4979c75bd962 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Tue, 3 Jun 2014 11:05:00 +0200
Subject: [PATCH] Fix bug #67326 fileinfo: cdf_read_short_sector insufficient
boundary check
Upstream fix https://github.com/file/file/commit/6d209c1c489457397a5763bca4b28e43aac90391.patch
Only revelant part applied
---
ext/fileinfo/libmagic/cdf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index 4712e84..16649f1 100644
--- a/ext/fileinfo/libmagic/cdf.c
+++ b/ext/fileinfo/libmagic/cdf.c
@@ -365,10 +365,10 @@ cdf_read_short_sector(const cdf_stream_t *sst, void *buf, size_t offs,
size_t ss = CDF_SHORT_SEC_SIZE(h);
size_t pos = CDF_SHORT_SEC_POS(h, id);
assert(ss == len);
- if (pos > CDF_SEC_SIZE(h) * sst->sst_len) {
+ if (pos + len > CDF_SEC_SIZE(h) * sst->sst_len) {
DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %"
SIZE_T_FORMAT "u\n",
- pos, CDF_SEC_SIZE(h) * sst->sst_len));
+ pos + len, CDF_SEC_SIZE(h) * sst->sst_len));
return -1;
}
(void)memcpy(((char *)buf) + offs,
--
1.9.2

View File

@ -80,7 +80,7 @@ error_log = /var/log/php-fpm/error.log
; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes ; Default Value: yes
daemonize = no daemonize = yes
; Set open file descriptor rlimit for the master process. ; Set open file descriptor rlimit for the master process.
; Default Value: system defined value ; Default Value: system defined value

View File

@ -1,68 +0,0 @@
From 20568e502814fffc41d91a22edaf75ff5ae19d5c Mon Sep 17 00:00:00 2001
From: Anatol Belski <ab@php.net>
Date: Tue, 3 Jun 2014 20:43:58 +0200
Subject: [PATCH] Fixed regression introduced by patch for bug #67072
This applies to 5.4 and 5.5 only as a legacy fix.
---
ext/standard/tests/serialize/005.phpt | 8 ++---
ext/standard/var_unserializer.c | 68 ++++++++++++++++++-----------------
ext/standard/var_unserializer.re | 6 +++-
3 files changed, 44 insertions(+), 38 deletions(-)
diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt
index 2df2701..07d47bd 100644
--- a/ext/standard/tests/serialize/005.phpt
+++ b/ext/standard/tests/serialize/005.phpt
@@ -156,11 +156,9 @@ object(TestNAOld)#%d (0) {
}
===NANew===
unserializer(TestNANew)
-
-Warning: Erroneous data format for unserializing 'TestNANew' in %s005.php on line %d
-
-Notice: unserialize(): Error at offset 19 of 20 bytes in %s005.php on line %d
-bool(false)
+TestNew::__wakeup()
+object(TestNANew)#1 (0) {
+}
===NANew2===
unserializer(TestNANew2)
TestNew::unserialize()
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index 003bac9..29d2e0f 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -396,7 +396,11 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
(*p) += 2;
- if (ce->serialize == NULL) {
+ /* The internal class check here is a BC fix only, userspace classes implementing the
+ Serializable interface have eventually an inconsistent behavior at this place when
+ unserialized from a manipulated string. Additionaly the interal classes can possibly
+ crash PHP so they're still disabled here. */
+ if (ce->serialize == NULL || ZEND_INTERNAL_CLASS != ce->type) {
object_init_ex(*rval, ce);
} else {
/* If this class implements Serializable, it should not land here but in object_custom(). The passed string
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index b3f5d29..cd4d53b 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -400,7 +400,11 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
(*p) += 2;
- if (ce->serialize == NULL) {
+ /* The internal class check here is a BC fix only, userspace classes implementing the
+ Serializable interface have eventually an inconsistent behavior at this place when
+ unserialized from a manipulated string. Additionaly the interal classes can possibly
+ crash PHP so they're still disabled here. */
+ if (ce->serialize == NULL || ZEND_INTERNAL_CLASS != ce->type) {
object_init_ex(*rval, ce);
} else {
/* If this class implements Serializable, it should not land here but in object_custom(). The passed string
--
1.9.2

View File

@ -1,166 +0,0 @@
From 1fe9f1e4f572d7b4d5a3872f41ea61e71fb563bf Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Thu, 5 Jun 2014 13:39:46 +0200
Subject: [PATCH] Fix regression introduce in fix for bug #67118
The fix was correct but break some code (at least in Horde)
This is a temporary workaround to fix regressioni in 5.4, 5.5 and 5.6
This make php_date_initialize more consistent
- on success return 1 + time initiliazed
- on failure return 0 + time = zero
which is check by DATE_CHECK_INITIALIZED by later method call
Will restore consistency with other date classes in master.
---
ext/date/php_date.c | 6 +++---
ext/date/tests/bug67118.phpt | 18 +++++++++---------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index a2bf001..595b0b0 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2441,6 +2441,8 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message);
}
if (err && err->error_count) {
+ timelib_time_dtor(dateobj->time);
+ dateobj->time = 0;
return 0;
}
@@ -2548,9 +2550,7 @@ PHP_METHOD(DateTime, __construct)
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
- if (!php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC)) {
- ZVAL_NULL(getThis());
- }
+ php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
}
zend_restore_error_handling(&error_handling TSRMLS_CC);
}
diff --git a/ext/date/tests/bug67118.phpt b/ext/date/tests/bug67118.phpt
index 6371757..973b4eb 100644
--- a/ext/date/tests/bug67118.phpt
+++ b/ext/date/tests/bug67118.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #67118 php-cgi crashes regularly on IIS 7
+Bug #67118 crashes in DateTime when this used after failed __construct
--INI--
date.timezone=Europe/Berlin
--FILE--
@@ -12,16 +12,16 @@
$tz = new DateTimeZone($tz);
}
- @parent::__construct($time, $tz);
+ try {
+ @parent::__construct($time, $tz);
+ } catch (Exception $e) {
+ echo "Bad date" . $this->format("Y") . "\n";
+ }
}
};
new mydt("Funktionsansvarig rådgivning och juridik", "UTC");
--EXPECTF--
-Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Funktionsansvarig rådgivning och juridik) at position 0 (F): The timezone could not be found in the database' in %sbug67118.php:%d
-Stack trace:
-#0 %sbug67118.php(%d): DateTime->__construct('Funktionsansvar...', Object(DateTimeZone))
-#1 %sbug67118.php(%d): mydt->__construct('Funktionsansvar...', 'UTC')
-#2 {main}
- thrown in %sbug67118.php on line %d
+Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug67118.php on line %d
+Bad date
--
1.9.2
From 15d8c80ead75be976c18a66b0933cf52f3e6579f Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Thu, 5 Jun 2014 14:00:00 +0200
Subject: [PATCH] add test for previous fix
---
ext/date/tests/bug67118_2.phpt | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 ext/date/tests/bug67118_2.phpt
diff --git a/ext/date/tests/bug67118_2.phpt b/ext/date/tests/bug67118_2.phpt
new file mode 100644
index 0000000..b517a3b
--- /dev/null
+++ b/ext/date/tests/bug67118_2.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Regression introduce in fix for Bug #67118
+--INI--
+date.timezone=Europe/Paris
+--FILE--
+<?php
+class Foo extends DateTime {
+ public function __construct($time = null) {
+ $tz = new DateTimeZone('UTC');
+ try {
+ echo "First try\n";
+ parent::__construct($time, $tz);
+ return;
+ } catch (Exception $e) {
+ echo "Second try\n";
+ parent::__construct($time.'C', $tz);
+ }
+ }
+}
+$date = '12 Sep 2007 15:49:12 UT';
+var_dump(new Foo($date));
+?>
+Done
+--EXPECTF--
+First try
+Second try
+object(Foo)#1 (3) {
+ ["date"]=>
+ string(26) "2007-09-12 15:49:12.000000"
+ ["timezone_type"]=>
+ int(3)
+ ["timezone"]=>
+ string(3) "UTC"
+}
+Done
\ No newline at end of file
--
1.9.2
From 127651e9aeb4294c6be8c450fc1e7344570045f3 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Thu, 5 Jun 2014 17:33:40 +0200
Subject: [PATCH] fix test for 5.4/5.5
---
ext/date/tests/bug67118_2.phpt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/date/tests/bug67118_2.phpt b/ext/date/tests/bug67118_2.phpt
index b517a3b..b4904a1 100644
--- a/ext/date/tests/bug67118_2.phpt
+++ b/ext/date/tests/bug67118_2.phpt
@@ -26,10 +26,10 @@ First try
Second try
object(Foo)#1 (3) {
["date"]=>
- string(26) "2007-09-12 15:49:12.000000"
+ string(%d) "2007-09-12 15:49:%s"
["timezone_type"]=>
int(3)
["timezone"]=>
string(3) "UTC"
}
-Done
\ No newline at end of file
+Done
--
1.9.2

126
php.ini
View File

@ -78,9 +78,9 @@
; compatibility with older or less security conscience applications. We ; compatibility with older or less security conscience applications. We
; recommending using the production ini in production and testing environments. ; recommending using the production ini in production and testing environments.
; php.ini-development is very similar to its production variant, except it's ; php.ini-development is very similar to its production variant, except it is
; much more verbose when it comes to errors. We recommending using the ; much more verbose when it comes to errors. We recommend using the
; development version only in development environments as errors shown to ; development version only in development environments, as errors shown to
; application users can inadvertently leak otherwise secure information. ; application users can inadvertently leak otherwise secure information.
; This is php.ini-production INI file. ; This is php.ini-production INI file.
@ -423,7 +423,7 @@ memory_limit = 128M
; E_NOTICE - run-time notices (these are warnings which often result ; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was ; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and ; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an ; relying on the fact it is automatically initialized to an
; empty string) ; empty string)
; E_STRICT - run-time notices, enable to have PHP suggest changes ; E_STRICT - run-time notices, enable to have PHP suggest changes
; to your code which will ensure the best interoperability ; to your code which will ensure the best interoperability
@ -456,8 +456,8 @@ error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; it could be very dangerous in production environments. Depending on the code ; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak ; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse. ; out of your application such as database usernames and passwords or worse.
; It's recommended that errors be logged on production servers rather than ; For production environments, we recommend logging errors rather than
; having the errors sent to STDOUT. ; sending them to STDOUT.
; Possible Values: ; Possible Values:
; Off = Do not display any errors ; Off = Do not display any errors
; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
@ -471,8 +471,8 @@ display_errors = Off
; The display of errors which occur during PHP's startup sequence are handled ; The display of errors which occur during PHP's startup sequence are handled
; separately from display_errors. PHP's default behavior is to suppress those ; separately from display_errors. PHP's default behavior is to suppress those
; errors from clients. Turning the display of startup errors on can be useful in ; errors from clients. Turning the display of startup errors on can be useful in
; debugging configuration problems. But, it's strongly recommended that you ; debugging configuration problems. We strongly recommend you
; leave this setting off on production servers. ; set this to 'off' for production servers.
; Default Value: Off ; Default Value: Off
; Development Value: On ; Development Value: On
; Production Value: Off ; Production Value: Off
@ -573,7 +573,7 @@ html_errors = On
; http://php.net/error-log ; http://php.net/error-log
; Example: ; Example:
;error_log = php_errors.log ;error_log = php_errors.log
; Log errors to syslog (Event Log on Windows). ; Log errors to syslog.
;error_log = syslog ;error_log = syslog
;windows.show_crt_warning ;windows.show_crt_warning
@ -680,13 +680,29 @@ default_mimetype = "text/html"
; PHP's default character set is set to empty. ; PHP's default character set is set to empty.
; http://php.net/default-charset ; http://php.net/default-charset
;default_charset = "UTF-8" default_charset = "UTF-8"
; PHP internal character encoding is set to empty.
; If empty, default_charset is used.
; http://php.net/internal-encoding
;internal_encoding =
; PHP input character encoding is set to empty.
; http://php.net/input-encoding
;input_encoding =
; PHP output character encoding is set to empty.
; mbstring or iconv output handler is used.
; See also output_buffer.
; http://php.net/output-encoding
;output_encoding =
; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is ; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
; to disable this feature. If post reading is disabled through ; to disable this feature and it will be removed in a future version.
; enable_post_data_reading, $HTTP_RAW_POST_DATA is *NOT* populated. ; If post reading is disabled through enable_post_data_reading,
; $HTTP_RAW_POST_DATA is *NOT* populated.
; http://php.net/always-populate-raw-post-data ; http://php.net/always-populate-raw-post-data
;always_populate_raw_post_data = On ;always_populate_raw_post_data = -1
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ; ; Paths and Directories ;
@ -770,8 +786,8 @@ enable_dl = Off
;fastcgi.logging = 0 ;fastcgi.logging = 0
; cgi.rfc2616_headers configuration option tells PHP what type of headers to ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If it's set 0 PHP sends Status: header that ; use when sending HTTP response code. If set to 0, PHP sends Status: header that
; is supported by Apache. When this option is set to 1 PHP will send ; is supported by Apache. When this option is set to 1, PHP will send
; RFC2616 compliant header. ; RFC2616 compliant header.
; Default is zero. ; Default is zero.
; http://php.net/cgi.rfc2616-headers ; http://php.net/cgi.rfc2616-headers
@ -892,9 +908,22 @@ cli_server.color = On
;filter.default_flags = ;filter.default_flags =
[iconv] [iconv]
;iconv.input_encoding = ISO-8859-1 ; Use of this INI entry is deprecated, use global input_encoding instead.
;iconv.internal_encoding = ISO-8859-1 ; If empty, default_charset or input_encoding or iconv.input_encoding is used.
;iconv.output_encoding = ISO-8859-1 ; The precedence is: default_charset < intput_encoding < iconv.input_encoding
;iconv.input_encoding =
; Use of this INI entry is deprecated, use global internal_encoding instead.
; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
;iconv.internal_encoding =
; Use of this INI entry is deprecated, use global output_encoding instead.
; If empty, default_charset or output_encoding or iconv.output_encoding is used.
; The precedence is: default_charset < output_encoding < iconv.output_encoding
; To use an output encoding conversion, iconv's output handler must be set
; otherwise output encoding conversion cannot be performed.
;iconv.output_encoding =
[intl] [intl]
;intl.default_locale = ;intl.default_locale =
@ -964,7 +993,7 @@ mail.add_x_header = On
; The path to a log file that will log all mail() calls. Log entries include ; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers. ; the full path of the script, line number, To address and headers.
;mail.log = ;mail.log =
; Log mail to syslog (Event Log on Windows). ; Log mail to syslog;
;mail.log = syslog ;mail.log = syslog
[SQL] [SQL]
@ -1320,9 +1349,9 @@ session.save_handler = files
; ;
; where N is an integer. Instead of storing all the session files in ; where N is an integer. Instead of storing all the session files in
; /path, what this will do is use subdirectories N-levels deep, and ; /path, what this will do is use subdirectories N-levels deep, and
; store the session data in those directories. This is useful if you ; store the session data in those directories. This is useful if
; or your OS have problems with lots of files in one directory, and is ; your OS has problems with many files in one directory, and is
; a more efficient layout for servers that handle lots of sessions. ; a more efficient layout for servers that handle many sessions.
; ;
; NOTE 1: PHP will not create this directory structure automatically. ; NOTE 1: PHP will not create this directory structure automatically.
; You can use the script in the ext/session dir for that purpose. ; You can use the script in the ext/session dir for that purpose.
@ -1361,7 +1390,7 @@ session.use_cookies = 1
; This option forces PHP to fetch and use a cookie for storing and maintaining ; This option forces PHP to fetch and use a cookie for storing and maintaining
; the session id. We encourage this operation as it's very helpful in combating ; the session id. We encourage this operation as it's very helpful in combating
; session hijacking when not specifying and managing your own session id. It is ; session hijacking when not specifying and managing your own session id. It is
; not the end all be all of session hijacking defense, but it's a good start. ; not the be-all and end-all of session hijacking defense, but it's a good start.
; http://php.net/session.use-only-cookies ; http://php.net/session.use-only-cookies
session.use_only_cookies = 1 session.use_only_cookies = 1
@ -1461,7 +1490,7 @@ session.cache_limiter = nocache
session.cache_expire = 180 session.cache_expire = 180
; trans sid support is disabled by default. ; trans sid support is disabled by default.
; Use of trans sid may risk your users security. ; Use of trans sid may risk your users' security.
; Use this option with caution. ; Use this option with caution.
; - User may send URL contains active session ID ; - User may send URL contains active session ID
; to other person via. email/irc/etc. ; to other person via. email/irc/etc.
@ -1626,23 +1655,33 @@ mssql.secure_connection = Off
[mbstring] [mbstring]
; language for internal character representation. ; language for internal character representation.
; This affects mb_send_mail() and mbstrig.detect_order.
; http://php.net/mbstring.language ; http://php.net/mbstring.language
;mbstring.language = Japanese ;mbstring.language = Japanese
; Use of this INI entry is deprecated, use global internal_encoding instead.
; internal/script encoding. ; internal/script encoding.
; Some encoding cannot work as internal encoding. ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*)
; (e.g. SJIS, BIG5, ISO-2022-*) ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
; http://php.net/mbstring.internal-encoding ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
;mbstring.internal_encoding = UTF-8 ;mbstring.internal_encoding =
; Use of this INI entry is deprecated, use global input_encoding instead.
; http input encoding. ; http input encoding.
; mbstring.encoding_traslation = On is needed to use this setting.
; If empty, default_charset or input_encoding or mbstring.input is used.
; The precedence is: default_charset < intput_encoding < mbsting.http_input
; http://php.net/mbstring.http-input ; http://php.net/mbstring.http-input
;mbstring.http_input = UTF-8 ;mbstring.http_input =
; http output encoding. mb_output_handler must be ; Use of this INI entry is deprecated, use global output_encoding instead.
; registered as output buffer to function ; http output encoding.
; http://php.net/mbstring.http-output ; mb_output_handler must be registered as output buffer to function.
;mbstring.http_output = pass ; If empty, default_charset or output_encoding or mbstring.http_output is used.
; The precedence is: default_charset < output_encoding < mbstring.http_output
; To use an output encoding conversion, mbstring's output handler must be set
; otherwise output encoding conversion cannot be performed.
;mbstring.http_output =
; enable automatic encoding translation according to ; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are ; mbstring.internal_encoding setting. Input chars are
@ -1653,7 +1692,7 @@ mssql.secure_connection = Off
;mbstring.encoding_translation = Off ;mbstring.encoding_translation = Off
; automatic encoding detection order. ; automatic encoding detection order.
; auto means ; "auto" detect order is changed accoding to mbstring.language
; http://php.net/mbstring.detect-order ; http://php.net/mbstring.detect-order
;mbstring.detect_order = auto ;mbstring.detect_order = auto
@ -1674,6 +1713,7 @@ mssql.secure_connection = Off
;mbstring.func_overload = 0 ;mbstring.func_overload = 0
; enable strict encoding detection. ; enable strict encoding detection.
; Default: Off
;mbstring.strict_detection = On ;mbstring.strict_detection = On
; This directive specifies the regex pattern of content types for which mb_output_handler() ; This directive specifies the regex pattern of content types for which mb_output_handler()
@ -1771,6 +1811,24 @@ ldap.max_links = -1
; absolute path. ; absolute path.
;curl.cainfo = ;curl.cainfo =
[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
;openssl.cafile=
; If openssl.cafile is not specified or if the CA file is not found, the
; directory pointed to by openssl.capath is searched for a suitable
; certificate. This value must be a correctly hashed certificate directory.
; Most users should not specify a value for this directive as PHP will
; attempt to use the OS-managed cert stores in its absence. If specified,
; this value may still be overridden on a per-stream basis via the "capath"
; SSL stream context option.
;openssl.capath=
; Local Variables: ; Local Variables:
; tab-width: 4 ; tab-width: 4
; End: ; End:

116
php.spec
View File

@ -1,20 +1,27 @@
# API/ABI check # API/ABI check
%global apiver 20121113 %global apiver 20131106
%global zendver 20121212 %global zendver 20131226
%global pdover 20080721 %global pdover 20080721
# Extension version # Extension version
%global opcachever 7.0.4-dev %global opcachever 7.0.4-dev
# Use for first build of PHP (before pecl/zip and pecl/jsonc)
%global php_bootstrap 1
# Adds -z now to the linker flags # Adds -z now to the linker flags
%global _hardened_build 1 %global _hardened_build 1
# version used for php embedded library soname # version used for php embedded library soname
%global embed_version 5.5 %global embed_version 5.6
%global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock) %global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock)
# Regression tests take a long time, you can skip 'em with this # Regression tests take a long time, you can skip 'em with this
%{!?runselftest: %{expand: %%global runselftest 1}} %if %{php_bootstrap}
%global runselftest 0
%else
%{!?runselftest: %global runselftest 1}
%endif
# Use the arch-specific mysql_config binary to avoid mismatch with the # Use the arch-specific mysql_config binary to avoid mismatch with the
# arch detection heuristic used by bindir/mysql_config. # arch detection heuristic used by bindir/mysql_config.
@ -50,13 +57,8 @@
%global with_libgd 1 %global with_libgd 1
%endif %endif
%if 0%{?fedora} == 17 || 0%{?fedora} == 18 || 0%{?fedora} == 19 || 0%{?rhel} == 7
%global with_zip 1
%global with_libzip 1
%else
%global with_zip 0 %global with_zip 0
%global with_libzip 0 %global with_libzip 0
%endif
%if 0%{?fedora} < 18 && 0%{?rhel} < 7 %if 0%{?fedora} < 18 && 0%{?rhel} < 7
%global db_devel db4-devel %global db_devel db4-devel
@ -64,12 +66,12 @@
%global db_devel libdb-devel %global db_devel libdb-devel
%endif %endif
#global rcver RC3 %global rcver RC1
Summary: PHP scripting language for creating dynamic web sites Summary: PHP scripting language for creating dynamic web sites
Name: php Name: php
Version: 5.5.13 Version: 5.6.0
Release: 3%{?dist} Release: 0.0.%{rcver}%{?dist}
# All files licensed under PHP version 3.01, except # All files licensed under PHP version 3.01, except
# Zend is licensed under Zend # Zend is licensed under Zend
# TSRM is licensed under BSD # TSRM is licensed under BSD
@ -111,8 +113,6 @@ Patch40: php-5.4.0-dlopen.patch
Patch42: php-5.3.1-systzdata-v10.patch Patch42: php-5.3.1-systzdata-v10.patch
# See http://bugs.php.net/53436 # See http://bugs.php.net/53436
Patch43: php-5.4.0-phpize.patch Patch43: php-5.4.0-phpize.patch
# Use system libzip instead of bundled one
Patch44: php-5.5.2-system-libzip.patch
# Use -lldap_r for OpenLDAP # Use -lldap_r for OpenLDAP
Patch45: php-5.4.8-ldap_r.patch Patch45: php-5.4.8-ldap_r.patch
# Make php_config.h constant across builds # Make php_config.h constant across builds
@ -121,15 +121,14 @@ Patch46: php-5.4.9-fixheader.patch
Patch47: php-5.4.9-phpinfo.patch Patch47: php-5.4.9-phpinfo.patch
# Upstream fixes (100+) # Upstream fixes (100+)
Patch100: php-reg67072.patch
Patch101: php-bug67326.patch
Patch102: php-reg67118.patch
# Security fixes (200+) # Security fixes (200+)
# Fixes for tests (300+) # Fixes for tests (300+)
# Revert changes for pcre 8.34 # Revert changes for pcre < 8.34
Patch301: php-5.5.10-pcre834.patch Patch301: php-5.6.0-oldpcre.patch
# see https://bugzilla.redhat.com/971416
Patch302: php-5.6.0-noNO.patch
BuildRequires: bzip2-devel, curl-devel >= 7.9 BuildRequires: bzip2-devel, curl-devel >= 7.9
@ -141,8 +140,7 @@ BuildRequires: pcre-devel >= 6.6
BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++ BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++
BuildRequires: libtool-ltdl-devel BuildRequires: libtool-ltdl-devel
%if %{with_libzip} %if %{with_libzip}
BuildRequires: libzip-devel >= 0.10 BuildRequires: libzip-devel >= 0.11
BuildRequires: libzip-devel < 0.11
%endif %endif
%if %{with_dtrace} %if %{with_dtrace}
BuildRequires: systemtap-sdt-devel BuildRequires: systemtap-sdt-devel
@ -162,12 +160,13 @@ Requires: php-cli%{?_isa} = %{version}-%{release}
# To ensure correct /var/lib/php/session ownership: # To ensure correct /var/lib/php/session ownership:
Requires(pre): httpd Requires(pre): httpd
%if 0%{?fedora} < 20
# Don't provides extensions, which are not shared library, as .so # Don't provides extensions, which are not shared library, as .so
%{?filter_provides_in: %filter_provides_in %{_libdir}/php/modules/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_libdir}/php/modules/.*\.so$}
%{?filter_provides_in: %filter_provides_in %{_libdir}/php-zts/modules/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_libdir}/php-zts/modules/.*\.so$}
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
%{?filter_setup} %{?filter_setup}
%endif
%description %description
@ -194,6 +193,15 @@ The php-cli package contains the command-line interface
executing PHP scripts, /usr/bin/php, and the CGI interface. executing PHP scripts, /usr/bin/php, and the CGI interface.
%package dbg
Group: Development/Languages
Summary: The interactive PHP debugger
Requires: php-common%{?_isa} = %{version}-%{release}
%description dbg
The php-dbg package contains the interactive PHP debugger.
%package fpm %package fpm
Group: Development/Languages Group: Development/Languages
Summary: PHP FastCGI Process Manager Summary: PHP FastCGI Process Manager
@ -253,8 +261,9 @@ Provides: php-sockets, php-sockets%{?_isa}
Provides: php-spl, php-spl%{?_isa} Provides: php-spl, php-spl%{?_isa}
Provides: php-standard = %{version}, php-standard%{?_isa} = %{version} Provides: php-standard = %{version}, php-standard%{?_isa} = %{version}
Provides: php-tokenizer, php-tokenizer%{?_isa} Provides: php-tokenizer, php-tokenizer%{?_isa}
# Temporary circular dep (to remove for bootstrap) %if ! %{php_bootstrap}
Requires: php-pecl-jsonc%{?_isa} Requires: php-pecl-jsonc%{?_isa}
%endif
%if %{with_zip} %if %{with_zip}
Provides: php-zip, php-zip%{?_isa} Provides: php-zip, php-zip%{?_isa}
Obsoletes: php-pecl-zip < 1.11 Obsoletes: php-pecl-zip < 1.11
@ -277,8 +286,9 @@ Requires: pcre-devel%{?_isa}
Provides: php-zts-devel = %{version}-%{release} Provides: php-zts-devel = %{version}-%{release}
Provides: php-zts-devel%{?_isa} = %{version}-%{release} Provides: php-zts-devel%{?_isa} = %{version}-%{release}
%endif %endif
# Temporary circular dep (to remove for bootstrap) %if ! %{php_bootstrap}
Requires: php-pecl-jsonc-devel%{?_isa} Requires: php-pecl-jsonc-devel%{?_isa}
%endif
%description devel %description devel
The php-devel package contains the files needed for building PHP The php-devel package contains the files needed for building PHP
@ -712,6 +722,9 @@ support for using the enchant library to PHP.
%prep %prep
%setup -q -n php-%{version}%{?rcver} %setup -q -n php-%{version}%{?rcver}
# ensure than current httpd use prefork MPM.
httpd -V | grep -q 'threaded:.*yes' && exit 1
%patch5 -p1 -b .includedir %patch5 -p1 -b .includedir
%patch6 -p1 -b .embed %patch6 -p1 -b .embed
%patch7 -p1 -b .recode %patch7 -p1 -b .recode
@ -722,23 +735,22 @@ support for using the enchant library to PHP.
%patch40 -p1 -b .dlopen %patch40 -p1 -b .dlopen
%patch42 -p1 -b .systzdata %patch42 -p1 -b .systzdata
%patch43 -p1 -b .headers %patch43 -p1 -b .headers
%if %{with_libzip}
%patch44 -p1 -b .systzip
%endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
%patch45 -p1 -b .ldap_r %patch45 -p1 -b .ldap_r
%endif %endif
%patch46 -p1 -b .fixheader %patch46 -p1 -b .fixheader
%patch47 -p1 -b .phpinfo %patch47 -p1 -b .phpinfo
%patch100 -p1 -b .reg67072 # upstream patches
%patch101 -p1 -b .bug67326
%patch102 -p1 -b .reg67118
# security patches
# Fixes for tests
%if 0%{?fedora} < 21 %if 0%{?fedora} < 21
# Only revert when system libpcre < 8.34 # Only apply when system libpcre < 8.34
%patch301 -p1 -R -b .pcre84 %patch301 -p1 -b .pcre834
%endif %endif
%patch302 -p0 -b .971416
# Prevent %%doc confusion over LICENSE files # Prevent %%doc confusion over LICENSE files
@ -766,9 +778,11 @@ mkdir build-cgi build-apache build-embedded \
# ----- Manage known as failed test ------- # ----- Manage known as failed test -------
# affected by systzdata patch # affected by systzdata patch
rm -f ext/date/tests/timezone_location_get.phpt rm ext/date/tests/timezone_location_get.phpt
# fails sometime # fails sometime
rm -f ext/sockets/tests/mcast_ipv?_recv.phpt rm ext/sockets/tests/mcast_ipv?_recv.phpt
# cause stack exhausion
rm Zend/tests/bug54268.phpt
# Safety check for API version change. # Safety check for API version change.
pver=$(sed -n '/#define PHP_VERSION /{s/.* "//;s/".*$//;p}' main/php_version.h) pver=$(sed -n '/#define PHP_VERSION /{s/.* "//;s/".*$//;p}' main/php_version.h)
@ -803,7 +817,7 @@ fi
# Check for some extension version # Check for some extension version
ver=$(sed -n '/#define PHP_ZENDOPCACHE_VERSION /{s/.* "//;s/".*$//;p}' ext/opcache/ZendAccelerator.h) ver=$(sed -n '/#define PHP_ZENDOPCACHE_VERSION /{s/.* "//;s/".*$//;p}' ext/opcache/ZendAccelerator.h)
if test "$ver" != "%{opcachever}"; then if test "$ver" != "%{opcachever}"; then
: Error: Upstream PHAR version is now ${ver}, expecting %{opcachever}. : Error: Upstream OPCACHE version is now ${ver}, expecting %{opcachever}.
: Update the opcachever macro and rebuild. : Update the opcachever macro and rebuild.
exit 1 exit 1
fi fi
@ -914,6 +928,7 @@ pushd build-cgi
build --libdir=%{_libdir}/php \ build --libdir=%{_libdir}/php \
--enable-pcntl \ --enable-pcntl \
--enable-opcache \ --enable-opcache \
--enable-phpdbg \
--with-imap=shared --with-imap-ssl \ --with-imap=shared --with-imap-ssl \
--enable-mbstring=shared \ --enable-mbstring=shared \
--enable-mbregex \ --enable-mbregex \
@ -1140,11 +1155,8 @@ popd
%check %check
%if %runselftest %if %runselftest
# Increase stack size (required by bug54268.phpt)
ulimit -s 32712
cd build-apache cd build-apache
# Run tests, using the CLI SAPI # Run tests, using the CLI SAPI
export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
export SKIP_ONLINE_TESTS=1 export SKIP_ONLINE_TESTS=1
@ -1249,7 +1261,6 @@ install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-php.conf
%if %{with_zts} %if %{with_zts}
cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-php.conf cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-php.conf
%endif %endif
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
%endif %endif
@ -1294,15 +1305,16 @@ for mod in pgsql odbc ldap snmp xmlrpc imap \
simplexml bz2 calendar ctype exif ftp gettext gmp iconv \ simplexml bz2 calendar ctype exif ftp gettext gmp iconv \
sockets tokenizer opcache \ sockets tokenizer opcache \
pdo pdo_pgsql pdo_odbc pdo_sqlite \ pdo pdo_pgsql pdo_odbc pdo_sqlite \
sqlite3 interbase pdo_firebird \ %if %{with_zip}
zip \
%endif
interbase pdo_firebird \
sqlite3 \
enchant phar fileinfo intl \ enchant phar fileinfo intl \
mcrypt tidy pdo_dblib mssql pspell curl wddx \ mcrypt tidy pdo_dblib mssql pspell curl wddx \
posix shmop sysvshm sysvsem sysvmsg recode xml \ posix shmop sysvshm sysvsem sysvmsg recode xml \
%if %{with_libmysql} %if %{with_libmysql}
mysql mysqli pdo_mysql \ mysql mysqli pdo_mysql \
%endif
%if %{with_zip}
zip \
%endif %endif
; do ; do
case $mod in case $mod in
@ -1464,6 +1476,9 @@ exit 0
%files cli %files cli
%{_bindir}/php %{_bindir}/php
%if %{with_zts}
%{_bindir}/zts-php
%endif
%{_bindir}/php-cgi %{_bindir}/php-cgi
%{_bindir}/phar.phar %{_bindir}/phar.phar
%{_bindir}/phar %{_bindir}/phar
@ -1476,6 +1491,10 @@ exit 0
%{_mandir}/man1/phpize.1* %{_mandir}/man1/phpize.1*
%doc sapi/cgi/README* sapi/cli/README %doc sapi/cgi/README* sapi/cli/README
%files dbg
%{_bindir}/phpdbg
%doc sapi/phpdbg/{README.md,CREDITS}
%files fpm %files fpm
%doc php-fpm.conf.default %doc php-fpm.conf.default
%doc fpm_LICENSE %doc fpm_LICENSE
@ -1505,8 +1524,6 @@ exit 0
%{_bindir}/zts-php-config %{_bindir}/zts-php-config
%{_includedir}/php-zts %{_includedir}/php-zts
%{_bindir}/zts-phpize %{_bindir}/zts-phpize
# usefull only to test other module during build
%{_bindir}/zts-php
%{_libdir}/php-zts/build %{_libdir}/php-zts/build
%endif %endif
%{_mandir}/man1/php-config.1* %{_mandir}/man1/php-config.1*
@ -1557,6 +1574,13 @@ exit 0
%changelog %changelog
* Thu Jun 19 2014 Remi Collet <rcollet@redhat.com> 5.6.0-0.1.RC1
- php 5.6.0RC1
https://fedoraproject.org/wiki/Changes/Php56
- add php-dbg subpackage
- update php.ini and opcache.ini from upstream production template
- move zts-php to php-cli
* Thu Jun 5 2014 Remi Collet <rcollet@redhat.com> 5.5.13-3 * Thu Jun 5 2014 Remi Collet <rcollet@redhat.com> 5.5.13-3
- fix regression introduce in fix for #67118 - fix regression introduce in fix for #67118

View File

@ -1 +1 @@
76f198cf4f9a601141e995e8d7596583 php-5.5.13-strip.tar.xz 634264f034944644e2192fba206d5ffa php-5.6.0RC1-strip.tar.xz