mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 10:10:50 +00:00
Compare commits
110
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba2fe0c96b | ||
|
|
b14bfacb92 | ||
|
|
4bd28cf296 | ||
|
|
ac0f7f7342 | ||
|
|
ebbef8503f | ||
|
|
64513c8571 | ||
|
|
81f414ef23 | ||
|
|
043ac320a0 | ||
|
|
5b529bbc94 | ||
|
|
22a8ea2a0a | ||
|
|
474895915e | ||
|
|
8cfb648761 | ||
|
|
e01f88df7c | ||
|
|
09d7ffabcd | ||
|
|
7768f5e2de | ||
|
|
ed5aabe8b7 | ||
|
|
1e1695e8de | ||
|
|
37e1d7c776 | ||
|
|
2115878aaa | ||
|
|
821f13fd79 | ||
|
|
062f93c93e | ||
|
|
5cd94db8bb | ||
|
|
c3fa86867b | ||
|
|
22e8a3c347 | ||
|
|
2bd299f731 | ||
|
|
aaae3637e0 | ||
|
|
76f421dd3a | ||
|
|
9c37d95627 | ||
|
|
8b642af484 | ||
|
|
2688023c7f | ||
|
|
0be5b9e6b0 | ||
|
|
008eb1461c | ||
|
|
77bf9245d2 | ||
|
|
35e3d597f5 | ||
|
|
8b104d7893 | ||
|
|
99194d1831 | ||
|
|
e324f82d3c | ||
|
|
9510611cdd | ||
|
|
398f56dbc8 | ||
|
|
87a9fc3b85 | ||
|
|
c8e55a6fd4 | ||
|
|
01f42b836c | ||
|
|
cb981e39c2 | ||
|
|
4e39968e4d | ||
|
|
710284cbc4 | ||
|
|
fc6cbc3eaa | ||
|
|
ac4d9fd055 | ||
|
|
3e267ca91b | ||
|
|
63934ea71e | ||
|
|
a492fe213a | ||
|
|
cdf72523f3 | ||
|
|
c529e9f602 | ||
|
|
6229e42ae5 | ||
|
|
1e4273d881 | ||
|
|
8b2bfaab66 | ||
|
|
04c0497ed7 | ||
|
|
48f835efbf | ||
|
|
8b20e86491 | ||
|
|
d83a75bb00 | ||
|
|
631ed7288c | ||
|
|
ad148c5ac2 | ||
|
|
ca51458081 | ||
|
|
e2b7392b96 | ||
|
|
2885f62816 | ||
|
|
600b6277f8 | ||
|
|
6b39c81957 | ||
|
|
276d19feaa | ||
|
|
eac822e897 | ||
|
|
d20bebfe13 | ||
|
|
35f832a007 | ||
|
|
5b2c30d7e6 | ||
|
|
86aecd8801 | ||
|
|
84f565ec71 | ||
|
|
3306577797 | ||
|
|
c72c4c5271 | ||
|
|
ab5dcc83a1 | ||
|
|
869ca9b733 | ||
|
|
25ba60b147 | ||
|
|
7f4327bc24 | ||
|
|
2842aa2a07 | ||
|
|
17ed2f21cf | ||
|
|
7b8861204e | ||
|
|
6c30014600 | ||
|
|
8f5c34cd39 | ||
|
|
4072b27870 | ||
|
|
cd2912af5e | ||
|
|
47461368ca | ||
|
|
13a33f7c7b | ||
|
|
f46da1da7d | ||
|
|
077b7705af | ||
|
|
f19c94b555 | ||
|
|
615ca3c99d | ||
|
|
dfc07f038b | ||
|
|
4758164ac5 | ||
|
|
84881c654e | ||
|
|
efd0e7222b | ||
|
|
783778b9d3 | ||
|
|
7bcd55c264 | ||
|
|
1e31ac079b | ||
|
|
77c202a2e6 | ||
|
|
975d144027 | ||
|
|
2db6d8e415 | ||
|
|
b6a41ad5ba | ||
|
|
a18a11cf80 | ||
|
|
d2b47e8065 | ||
|
|
7448b03300 | ||
|
|
25f324fad7 | ||
|
|
b2622ed838 | ||
|
|
cab354debd | ||
|
|
d660d6d31b |
No files matched your search
+1
-1
@@ -23,7 +23,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.1
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.3
|
||||
PHP_BUILD_CRT: vc15
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
|
||||
@@ -1,6 +1,64 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
15 Mar 2018, PHP 7.2.4RC1
|
||||
26 Apr 2018, PHP 7.2.5
|
||||
|
||||
- Core:
|
||||
. Fixed bug #75722 (Convert valgrind detection to configure option).
|
||||
(Michael Heimpold)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #76131 (mismatch arginfo for date_create). (carusogabriel)
|
||||
|
||||
- Exif:
|
||||
. Fixed bug#76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value).
|
||||
(Stas)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #68440 (ERROR: failed to reload: execvp() failed: Argument list
|
||||
too long). (Jacob Hipps)
|
||||
. Fixed incorrect write to getenv result in FPM reload. (Jakub Zelenka)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #52070 (imagedashedline() - dashed line sometimes is not visible).
|
||||
(cmb)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #76153 (Intl compilation fails with icu4c 61.1). (Anatol)
|
||||
|
||||
- iconv:
|
||||
. Fixed bug #76249 (stream filter convert.iconv leads to infinite loop on
|
||||
invalid sequence). (Stas)
|
||||
|
||||
- ldap:
|
||||
. Fixed bug #76248 (Malicious LDAP-Server Response causes Crash). (Stas)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #75944 (Wrong cp1251 detection). (dmk001)
|
||||
. Fixed bug #76113 (mbstring does not build with Oniguruma 6.8.1).
|
||||
(chrullrich, cmb)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #76088 (ODBC functions are not available by default on Windows).
|
||||
(cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #76094 (Access violation when using opcache). (Laruence)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #76129 (fix for CVE-2018-5712 may not be complete). (Stas)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #76131 (mismatch arginfo for splarray constructor).
|
||||
(carusogabriel)
|
||||
|
||||
- standard:
|
||||
. Fixed bug #74139 (mail.add_x_header default inconsistent with docs). (cmb)
|
||||
. Fixed bug #75996 (incorrect url in header for mt_rand). (tatarbj)
|
||||
|
||||
29 Mar 2018, PHP 7.2.4
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76025 (Segfault while throwing exception in error_handler).
|
||||
@@ -8,6 +66,10 @@ PHP NEWS
|
||||
. Fixed bug #76044 ('date: illegal option -- -' in ./configure on FreeBSD).
|
||||
(Anatol)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #75605 (Dumpable FPM child processes allow bypassing opcache
|
||||
access controls). (Jakub Zelenka)
|
||||
|
||||
- FTP:
|
||||
. Fixed ftp_pasv arginfo. (carusogabriel)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #43450 (Memory leak on some functions with implicit object __toString() call)
|
||||
--SKIPIF--
|
||||
<?php if (!function_exists('memory_get_usage')) die('memory_get_usage() not installed'); ?>
|
||||
<?php if (!function_exists('memory_get_usage')) die('skip memory_get_usage() not installed'); ?>
|
||||
--INI--
|
||||
opcache.enable_cli=0
|
||||
--FILE--
|
||||
|
||||
@@ -69301,7 +69301,7 @@ ZEND_API int zend_vm_call_opcode_handler(zend_execute_data* ex)
|
||||
LOAD_OPLINE();
|
||||
#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
|
||||
#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)
|
||||
handler = (opcode_handler_t)zend_vm_get_opcode_handler_func(opline->opcode, opline);
|
||||
handler = (opcode_handler_t)zend_vm_get_opcode_handler_func(zend_user_opcodes[opline->opcode], opline);
|
||||
handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
if (EXPECTED(opline != &hybrid_halt_op)) {
|
||||
#else
|
||||
|
||||
@@ -2599,7 +2599,7 @@ function gen_vm($def, $skel) {
|
||||
out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
|
||||
if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID) {
|
||||
out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
|
||||
out($f, "\thandler = (opcode_handler_t)zend_vm_get_opcode_handler_func(opline->opcode, opline);\n");
|
||||
out($f, "\thandler = (opcode_handler_t)zend_vm_get_opcode_handler_func(zend_user_opcodes[opline->opcode], opline);\n");
|
||||
out($f, "\thandler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
|
||||
out($f, "\tif (EXPECTED(opline != &hybrid_halt_op)) {\n");
|
||||
out($f,"#else\n");
|
||||
|
||||
+3
-20
@@ -2237,6 +2237,9 @@ AC_DEFUN([PHP_SETUP_ICU],[
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
|
||||
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -3249,23 +3252,3 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW], [
|
||||
|
||||
dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive.
|
||||
m4_include([build/ax_check_compile_flag.m4])
|
||||
|
||||
dnl PHP_CHECK_VALGRIND
|
||||
AC_DEFUN([PHP_CHECK_VALGRIND], [
|
||||
AC_MSG_CHECKING([for valgrind])
|
||||
|
||||
SEARCH_PATH="/usr/local /usr"
|
||||
SEARCH_FOR="/include/valgrind/valgrind.h"
|
||||
for i in $SEARCH_PATH ; do
|
||||
if test -r $i/$SEARCH_FOR; then
|
||||
VALGRIND_DIR=$i
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$VALGRIND_DIR"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
else
|
||||
AC_MSG_RESULT(found in $VALGRIND_DIR)
|
||||
AC_DEFINE(HAVE_VALGRIND, 1, [ ])
|
||||
fi
|
||||
])
|
||||
+31
-3
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=2
|
||||
PHP_RELEASE_VERSION=4
|
||||
PHP_EXTRA_VERSION="RC1"
|
||||
PHP_RELEASE_VERSION=5
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
@@ -753,7 +753,35 @@ if test "x$php_crypt_r" = "x1"; then
|
||||
PHP_CRYPT_R_STYLE
|
||||
fi
|
||||
|
||||
PHP_CHECK_VALGRIND
|
||||
dnl Check valgrind support
|
||||
PHP_ARG_WITH(valgrind, [whether to enable valgrind support],
|
||||
[ --with-valgrind=DIR Enable valgrind support], yes, no)
|
||||
|
||||
if test "$PHP_VALGRIND" != "no"; then
|
||||
|
||||
AC_MSG_CHECKING([for valgrind header])
|
||||
|
||||
if test "$PHP_VALGRIND" = "yes"; then
|
||||
SEARCH_PATH="/usr/local /usr"
|
||||
else
|
||||
SEARCH_PATH="$PHP_VALGRIND"
|
||||
fi
|
||||
|
||||
SEARCH_FOR="/include/valgrind/valgrind.h"
|
||||
for i in $SEARCH_PATH ; do
|
||||
if test -r $i/$SEARCH_FOR; then
|
||||
VALGRIND_DIR=$i
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$VALGRIND_DIR"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
else
|
||||
AC_MSG_RESULT(found in $VALGRIND_DIR)
|
||||
AC_DEFINE(HAVE_VALGRIND, 1, [ ])
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
dnl General settings.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -1012,13 +1012,13 @@ PHP_FUNCTION(variant_date_from_timestamp)
|
||||
tzset();
|
||||
ttstamp = timestamp;
|
||||
tmv = localtime(&ttstamp);
|
||||
#if ZEND_ENABLE_ZVAL_LONG64
|
||||
|
||||
/* Invalid after 23:59:59, December 31, 3000, UTC */
|
||||
if (!tmv) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid timestamp " ZEND_LONG_FMT, timestamp);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(&systime, 0, sizeof(systime));
|
||||
|
||||
systime.wDay = tmv->tm_mday;
|
||||
|
||||
@@ -3,7 +3,6 @@ Bug #72498 variant_date_from_timestamp null dereference
|
||||
--SKIPIF--
|
||||
<?php # vim:ft=php
|
||||
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present";
|
||||
if (PHP_INT_SIZE != 8) print "skip 64-bit only";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+796
-791
File diff suppressed because it is too large.
Load diff
+5
-5
@@ -162,7 +162,7 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, time)
|
||||
ZEND_ARG_INFO(0, object)
|
||||
ZEND_ARG_INFO(0, timezone)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create_from_format, 0, 0, 2)
|
||||
@@ -2042,9 +2042,9 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
prop = date_interval_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
|
||||
|
||||
|
||||
if (prop != &EG(uninitialized_zval)) {
|
||||
if (type == 2) {
|
||||
retval = 1;
|
||||
@@ -2062,7 +2062,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2435,7 +2435,7 @@ static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp
|
||||
|
||||
*is_temp = 1;
|
||||
ht = zend_array_dup(props);
|
||||
|
||||
|
||||
ZVAL_LONG(&zv, tzobj->type);
|
||||
zend_hash_str_update(ht, "timezone_type", sizeof("timezone_type")-1, &zv);
|
||||
|
||||
|
||||
+1
-1
@@ -2112,7 +2112,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
case TAG_FMT_UNDEFINED:
|
||||
if (value) {
|
||||
if (tag == TAG_MAKER_NOTE) {
|
||||
length = MIN(length, (int) strlen(value));
|
||||
length = (int) php_strnlen(value, length);
|
||||
}
|
||||
|
||||
/* do not recompute length here */
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value)
|
||||
--DESCRIPTION--
|
||||
This test is meant to exhibit memory issues with the `-m` option. Since a lot of
|
||||
notices and warnings are to be expected anyway, we suppress these, since the are
|
||||
not relevant for this test.
|
||||
--INI--
|
||||
error_reporting=E_ALL & ~E_WARNING & ~E_NOTICE
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('exif')) die('skip exif extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
exif_read_data(__DIR__ . '/bug76130_1.jpg');
|
||||
exif_read_data(__DIR__ . '/bug76130_2.jpg');
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,7 @@ if (2147483647 == PHP_INT_MAX) {
|
||||
die('skip ot supported on this system');
|
||||
}
|
||||
if (disk_free_space(__DIR__) < 10*1024*1024*1024) {
|
||||
die('not enough disk space');
|
||||
die('skip Not enough disk space');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -1338,7 +1338,6 @@ void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color
|
||||
} else {
|
||||
wid = 1;
|
||||
}
|
||||
wid = (int)(thick * sin(atan2(dy, dx)));
|
||||
vert = 1;
|
||||
|
||||
d = 2 * dy - dx;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #52070 (imagedashedline() - dashed line sometimes is not visible)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreate(1200, 800);
|
||||
$background_color = imagecolorallocate($im, 40, 40, 40);
|
||||
$color = imagecolorallocate($im, 255, 255, 255);
|
||||
imagedashedline($im, 800, 400, 300, 400, $color);
|
||||
imagedashedline($im, 800, 400, 300, 800, $color);
|
||||
imagedashedline($im, 800, 400, 400, 800, $color);
|
||||
imagedashedline($im, 800, 400, 500, 800, $color);
|
||||
imagedashedline($im, 800, 400, 600, 800, $color);
|
||||
imagedashedline($im, 800, 400, 700, 800, $color);
|
||||
imagedashedline($im, 800, 400, 800, 800, $color);
|
||||
include_once __DIR__ . '/func.inc';
|
||||
test_image_equals_file(__DIR__ . '/bug52070.png', $im);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
The images are equal.
|
||||
===DONE===
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -2642,6 +2642,9 @@ static int php_iconv_stream_filter_append_bucket(
|
||||
tcnt = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
php_error_docref(NULL, E_WARNING, "iconv stream filter (\"%s\"=>\"%s\"): invalid multibyte sequence", self->from_charset, self->to_charset);
|
||||
goto out_failure;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #76249 (stream filter convert.iconv leads to infinite loop on invalid sequence)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$fh = fopen('php://memory', 'rw');
|
||||
fwrite($fh, "abc");
|
||||
rewind($fh);
|
||||
stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, []);
|
||||
$a = stream_get_contents($fh);
|
||||
var_dump(strlen($a));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
|
||||
int(3)
|
||||
DONE
|
||||
+21
-12
@@ -9,6 +9,7 @@ if test "$PHP_INTL" != "no"; then
|
||||
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
|
||||
PHP_SUBST(INTL_SHARED_LIBADD)
|
||||
PHP_REQUIRE_CXX()
|
||||
INTL_COMMON_FLAGS="$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
||||
if test "$icu_version" -ge "4002"; then
|
||||
icu_spoof_src=" spoofchecker/spoofchecker_class.c \
|
||||
spoofchecker/spoofchecker.c\
|
||||
@@ -20,7 +21,6 @@ if test "$PHP_INTL" != "no"; then
|
||||
PHP_NEW_EXTENSION(intl, php_intl.c \
|
||||
intl_error.c \
|
||||
intl_convert.c \
|
||||
intl_convertcpp.cpp \
|
||||
collator/collator.c \
|
||||
collator/collator_class.c \
|
||||
collator/collator_sort.c \
|
||||
@@ -32,8 +32,6 @@ if test "$PHP_INTL" != "no"; then
|
||||
collator/collator_is_numeric.c \
|
||||
collator/collator_error.c \
|
||||
common/common_error.c \
|
||||
common/common_enum.cpp \
|
||||
common/common_date.cpp \
|
||||
converter/converter.c \
|
||||
formatter/formatter.c \
|
||||
formatter/formatter_main.c \
|
||||
@@ -53,17 +51,12 @@ if test "$PHP_INTL" != "no"; then
|
||||
dateformat/dateformat_attr.c \
|
||||
dateformat/dateformat_data.c \
|
||||
dateformat/dateformat_format.c \
|
||||
dateformat/dateformat_format_object.cpp \
|
||||
dateformat/dateformat_parse.c \
|
||||
dateformat/dateformat_create.cpp \
|
||||
dateformat/dateformat_attrcpp.cpp \
|
||||
dateformat/dateformat_helpers.cpp \
|
||||
msgformat/msgformat.c \
|
||||
msgformat/msgformat_attr.c \
|
||||
msgformat/msgformat_class.c \
|
||||
msgformat/msgformat_data.c \
|
||||
msgformat/msgformat_format.c \
|
||||
msgformat/msgformat_helpers.cpp \
|
||||
msgformat/msgformat_parse.c \
|
||||
grapheme/grapheme_string.c \
|
||||
grapheme/grapheme_util.c \
|
||||
@@ -73,6 +66,18 @@ if test "$PHP_INTL" != "no"; then
|
||||
transliterator/transliterator.c \
|
||||
transliterator/transliterator_class.c \
|
||||
transliterator/transliterator_methods.c \
|
||||
uchar/uchar.c \
|
||||
idn/idn.c \
|
||||
$icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
|
||||
|
||||
PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
|
||||
common/common_enum.cpp \
|
||||
common/common_date.cpp \
|
||||
dateformat/dateformat_format_object.cpp \
|
||||
dateformat/dateformat_create.cpp \
|
||||
dateformat/dateformat_attrcpp.cpp \
|
||||
dateformat/dateformat_helpers.cpp \
|
||||
msgformat/msgformat_helpers.cpp \
|
||||
timezone/timezone_class.cpp \
|
||||
timezone/timezone_methods.cpp \
|
||||
calendar/calendar_class.cpp \
|
||||
@@ -83,10 +88,14 @@ if test "$PHP_INTL" != "no"; then
|
||||
breakiterator/breakiterator_methods.cpp \
|
||||
breakiterator/rulebasedbreakiterator_methods.cpp \
|
||||
breakiterator/codepointiterator_internal.cpp \
|
||||
breakiterator/codepointiterator_methods.cpp \
|
||||
uchar/uchar.c \
|
||||
idn/idn.c \
|
||||
$icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,cxx)
|
||||
breakiterator/codepointiterator_methods.cpp"
|
||||
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS"
|
||||
if test "$ext_shared" = "no"; then
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
|
||||
else
|
||||
PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS, shared_objects_intl, yes)
|
||||
fi
|
||||
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/collator)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/converter)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/common)
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ if (PHP_INTL != "no") {
|
||||
ADD_FLAG("LIBS_INTL", "iculx.lib");
|
||||
}
|
||||
|
||||
ADD_FLAG("CFLAGS_INTL", "/EHsc");
|
||||
ADD_FLAG("CFLAGS_INTL", "/EHsc /D U_USING_ICU_NAMESPACE=1");
|
||||
AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
|
||||
} else {
|
||||
WARNING("intl not enabled; libraries and/or headers not found");
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--TEST--
|
||||
numfmt_format() icu >= 56.1
|
||||
numfmt_format() icu >= 56.1 && icu < 61.1
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
--TEST--
|
||||
numfmt_format() icu >= 61.1
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '61.1') < 0) die('skip for ICU >= 61.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Format a number using misc locales/patterns.
|
||||
*/
|
||||
|
||||
/*
|
||||
* TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
|
||||
* currency and percent formatting.
|
||||
*/
|
||||
|
||||
function ut_main()
|
||||
{
|
||||
$styles = array(
|
||||
NumberFormatter::PATTERN_DECIMAL => '##.#####################',
|
||||
NumberFormatter::DECIMAL => '',
|
||||
NumberFormatter::CURRENCY => '',
|
||||
NumberFormatter::PERCENT => '',
|
||||
NumberFormatter::SCIENTIFIC => '',
|
||||
NumberFormatter::SPELLOUT => '@@@@@@@',
|
||||
NumberFormatter::ORDINAL => '',
|
||||
NumberFormatter::DURATION => '',
|
||||
NumberFormatter::PATTERN_RULEBASED => '#####.###',
|
||||
1234999, // bad one
|
||||
);
|
||||
|
||||
$integer = array(
|
||||
NumberFormatter::ORDINAL => '',
|
||||
NumberFormatter::DURATION => '',
|
||||
);
|
||||
$locales = array(
|
||||
'en_US',
|
||||
'ru_UA',
|
||||
'de',
|
||||
'fr',
|
||||
'en_UK'
|
||||
);
|
||||
|
||||
$str_res = '';
|
||||
$number = 1234567.891234567890000;
|
||||
|
||||
foreach( $locales as $locale )
|
||||
{
|
||||
$str_res .= "\nLocale is: $locale\n";
|
||||
foreach( $styles as $style => $pattern )
|
||||
{
|
||||
$fmt = ut_nfmt_create( $locale, $style, $pattern );
|
||||
|
||||
if(!$fmt) {
|
||||
$str_res .= "Bad formatter!\n";
|
||||
continue;
|
||||
}
|
||||
$str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
|
||||
}
|
||||
}
|
||||
return $str_res;
|
||||
}
|
||||
|
||||
include_once( 'ut_common.inc' );
|
||||
|
||||
// Run the test
|
||||
ut_run();
|
||||
|
||||
?>
|
||||
--EXPECTREGEX--
|
||||
Locale is: en_US
|
||||
'1234567.8912345\d+'
|
||||
'1,234,567.891'
|
||||
'\$1,234,567.89'
|
||||
'123,456,789%'
|
||||
'1.2345678912345\d+E6'
|
||||
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five( six)? seven( nine)?'
|
||||
'1,234,567(th|ᵗʰ)'
|
||||
'342:56:07'
|
||||
'#####.###'
|
||||
'USD1,234,567.89'
|
||||
|
||||
Locale is: ru_UA
|
||||
'1234567.8912345\d+'
|
||||
'1 234 567,891'
|
||||
'1 234 567,89 ?(грн\.|₴)'
|
||||
'123 456 789 ?%'
|
||||
'1.2345678912345\d+E6'
|
||||
'один миллион двести тридцать четыре тысячи пятьсот шестьдесят семь целых восемьдесят девять миллионов сто двадцать три тысячи четыреста пятьдесят семь стомиллионных'
|
||||
'1 234 567.?'
|
||||
'1 234 567'
|
||||
'#####.###'
|
||||
'1 234 567,89 UAH'
|
||||
|
||||
Locale is: de
|
||||
'1234567.8912345\d+'
|
||||
'1.234.567,891'
|
||||
'(¤ )?1.234.567,89( ¤)?'
|
||||
'123\.456\.789 %'
|
||||
'1.2345678912345\d+E6'
|
||||
'eine Million zweihundertvierunddreißigtausendfünfhundertsiebenundsechzig Komma acht neun eins zwei drei vier fünf( sechs)? sieben( neun)?'
|
||||
'1.234.567.?'
|
||||
'1.234.567'
|
||||
'#####.###'
|
||||
'1.234.567,89 ¤¤'
|
||||
|
||||
Locale is: fr
|
||||
'1234567.8912345\d+'
|
||||
'1 234 567,891'
|
||||
'1 234 567,89 ¤'
|
||||
'123 456 789 ?%'
|
||||
'1.2345678912345\d+E6'
|
||||
'un million deux cent trente-quatre mille cinq cent soixante-sept virgule huit neuf un deux trois quatre cinq( six)? sept( neuf)?'
|
||||
'1 234 567e'
|
||||
'1 234 567'
|
||||
'#####.###'
|
||||
'1 234 567,89 ¤¤'
|
||||
|
||||
Locale is: en_UK
|
||||
'1234567.8912345\d+'
|
||||
'1,234,567.891'
|
||||
'¤1,234,567.89'
|
||||
'123,456,789%'
|
||||
'1.2345678912345\d+E6'
|
||||
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five( six)? seven( nine)?'
|
||||
'1,234,567(th|ᵗʰ)'
|
||||
'342:56:07'
|
||||
'#####.###'
|
||||
'¤¤1,234,567.89'
|
||||
@@ -2,6 +2,7 @@
|
||||
IntlRuleBasedBreakIterator::getBinaryRules(): basic test
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
|
||||
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
--TEST--
|
||||
IntlRuleBasedBreakIterator::getBinaryRules(): basic test
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php if(version_compare(INTL_ICU_VERSION, '61.1') < 0) print 'skip ICU >= 61.1 only'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set("intl.error_level", E_WARNING);
|
||||
ini_set("intl.default_locale", "pt_PT");
|
||||
|
||||
$rules = <<<RULES
|
||||
\$LN = [[:letter:] [:number:]];
|
||||
\$S = [.;,:];
|
||||
|
||||
!!forward;
|
||||
\$LN+ {1};
|
||||
\$S+ {42};
|
||||
!!reverse;
|
||||
\$LN+ {1};
|
||||
\$S+ {42};
|
||||
!!safe_forward;
|
||||
!!safe_reverse;
|
||||
RULES;
|
||||
$rbbi = new IntlRuleBasedBreakIterator($rules);
|
||||
$rbbi->setText('sdfkjsdf88á.... ,;');
|
||||
|
||||
$br = $rbbi->getBinaryRules();
|
||||
|
||||
$rbbi2 = new IntlRuleBasedBreakIterator($br, true);
|
||||
|
||||
var_dump($rbbi->getRules(), $rbbi2->getRules());
|
||||
var_dump($rbbi->getRules() == $rbbi2->getRules());
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
string(137) "$LN = [[:letter:] [:number:]];
|
||||
$S = [.;,:];
|
||||
!!forward;
|
||||
$LN+ {1};
|
||||
$S+ {42};
|
||||
!!reverse;
|
||||
$LN+ {1};
|
||||
$S+ {42};
|
||||
!!safe_forward;
|
||||
!!safe_reverse;"
|
||||
string(137) "$LN = [[:letter:] [:number:]];
|
||||
$S = [.;,:];
|
||||
!!forward;
|
||||
$LN+ {1};
|
||||
$S+ {42};
|
||||
!!reverse;
|
||||
$LN+ {1};
|
||||
$S+ {42};
|
||||
!!safe_forward;
|
||||
!!safe_reverse;"
|
||||
bool(true)
|
||||
==DONE==
|
||||
@@ -1,9 +1,8 @@
|
||||
--TEST--
|
||||
IntlRuleBasedBreakIterator::getRules(): basic test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('intl'))
|
||||
die('skip intl extension not enabled');
|
||||
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set("intl.error_level", E_WARNING);
|
||||
@@ -29,4 +28,4 @@ var_dump($rbbi->getRules());
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
string(128) "$LN = [[:letter:] [:number:]];$S = [.;,:];!!forward;$LN+ {1};$S+ {42};!!reverse;$LN+ {1};$S+ {42};!!safe_forward;!!safe_reverse;"
|
||||
==DONE==
|
||||
==DONE==
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
IntlRuleBasedBreakIterator::getRules(): basic test
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '61.1') < 0) die('skip for ICU >= 61.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set("intl.error_level", E_WARNING);
|
||||
ini_set("intl.default_locale", "pt_PT");
|
||||
|
||||
$rules = <<<RULES
|
||||
\$LN = [[:letter:] [:number:]];
|
||||
\$S = [.;,:];
|
||||
|
||||
!!forward;
|
||||
\$LN+ {1};
|
||||
\$S+ {42};
|
||||
!!reverse;
|
||||
\$LN+ {1};
|
||||
\$S+ {42};
|
||||
!!safe_forward;
|
||||
!!safe_reverse;
|
||||
RULES;
|
||||
$rbbi = new IntlRuleBasedBreakIterator($rules);
|
||||
var_dump($rbbi->getRules());
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
string(137) "$LN = [[:letter:] [:number:]];
|
||||
$S = [.;,:];
|
||||
!!forward;
|
||||
$LN+ {1};
|
||||
$S+ {42};
|
||||
!!reverse;
|
||||
$LN+ {1};
|
||||
$S+ {42};
|
||||
!!safe_forward;
|
||||
!!safe_reverse;"
|
||||
==DONE==
|
||||
+5
-1
@@ -1242,7 +1242,11 @@ PHP_FUNCTION(ldap_get_entries)
|
||||
|
||||
add_assoc_long(&tmp1, "count", num_attrib);
|
||||
dn = ldap_get_dn(ldap, ldap_result_entry);
|
||||
add_assoc_string(&tmp1, "dn", dn);
|
||||
if (dn) {
|
||||
add_assoc_string(&tmp1, "dn", dn);
|
||||
} else {
|
||||
add_assoc_null(&tmp1, "dn");
|
||||
}
|
||||
#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS
|
||||
ldap_memfree(dn);
|
||||
#else
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Bug #76248 (Malicious LDAP-Server Response causes Crash)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
if (!function_exists('pcntl_fork')) die('skip fork not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$pid = pcntl_fork();
|
||||
const PORT = 12345;
|
||||
if ($pid == 0) {
|
||||
// child
|
||||
$server = stream_socket_server("tcp://127.0.0.1:12345");
|
||||
$socket = stream_socket_accept($server, 3);
|
||||
fwrite($socket, base64_decode("MAwCAQFhBwoBAAQABAAweQIBAmR0BJljbj1yb290LGRjPWV4YW1wbGUsZGM9Y29tMFcwIwQLb2JqZWN0Q2xhc3MxFAQSb3JnYW5pemF0aW9uYWxSb2xlMAwEAmNuMQYEBHJvb3QwIgQLZGVzY3JpcHRpb24xEwQRRGlyZWN0b3J5IE1hbmFnZXIwDAIBAmUHCgEABAAEADB5AgEDZHQEmWNuPXJvb3QsZGM9ZXhhbXBsZSxkYz1jb20wVzAjBAtvYmplY3RDbGFzczEUBBJvcmdhbml6YXRpb25hbFJvbGUwDAQCY24xBgQEcm9vdDAiBAtkZXNjcmlwdGlvbjETBBFEaXJlY3RvcnkgTWFuYWdlcjAMAgEDZQcKAQAEAAQA"));
|
||||
fflush($socket);
|
||||
} else {
|
||||
// parent
|
||||
$ds = ldap_connect("127.0.0.1", PORT);
|
||||
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||
$b = ldap_bind($ds, "cn=root,dc=example,dc=com", "secret");
|
||||
|
||||
$s = ldap_search($ds, "dc=example,dc=com", "(cn=root)");
|
||||
$tt = ldap_get_entries($ds, $s);
|
||||
var_dump($tt);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["count"]=>
|
||||
int(1)
|
||||
[0]=>
|
||||
array(2) {
|
||||
["count"]=>
|
||||
int(0)
|
||||
["dn"]=>
|
||||
NULL
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ mbfl_filt_conv_wchar_cp1251(int c, mbfl_convert_filter *filter)
|
||||
/* all of this is so ugly now! */
|
||||
static int mbfl_filt_ident_cp1251(int c, mbfl_identify_filter *filter)
|
||||
{
|
||||
if (c >= 0x80 && c < 0xff)
|
||||
if (c >= 0x80 && c <= 0xff)
|
||||
filter->flag = 0;
|
||||
else
|
||||
filter->flag = 1; /* not it */
|
||||
|
||||
@@ -449,7 +449,7 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
|
||||
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
|
||||
|
||||
rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen);
|
||||
if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) {
|
||||
if (!rc || onig_get_options(rc) != options || onig_get_encoding(rc) != enc || onig_get_syntax(rc) != syntax) {
|
||||
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
|
||||
onig_error_code_to_str(err_str, err_code, &err_info);
|
||||
php_error_docref(NULL, E_WARNING, "mbregex compile err: %s", err_str);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #75944 (wrong detection cp1251 encoding because of missing last cyrillic letter)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(mb_detect_encoding(chr(0xfe), array('CP-1251'))); // letter '?'
|
||||
var_dump(mb_detect_encoding(chr(0xff), array('CP-1251'))); // letter '?'
|
||||
?>
|
||||
--EXPECT--
|
||||
string(12) "Windows-1251"
|
||||
string(12) "Windows-1251"
|
||||
|
||||
@@ -8,10 +8,10 @@ mysqli autocommit/commit/rollback
|
||||
|
||||
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
||||
if (!$link)
|
||||
die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
|
||||
die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
|
||||
|
||||
if (!have_innodb($link))
|
||||
die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error));
|
||||
die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -94,4 +94,4 @@ array(2) {
|
||||
[1]=>
|
||||
string(4) "egon"
|
||||
}
|
||||
done!
|
||||
done!
|
||||
@@ -12,7 +12,7 @@ require_once __DIR__ . '/skipif.inc';
|
||||
require_once __DIR__ . '/skipifconnectfailure.inc';
|
||||
require_once __DIR__ . '/connect.inc';
|
||||
if (!$IS_MYSQLND) {
|
||||
die('mysqlnd only');
|
||||
die('skip mysqlnd only');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -356,7 +356,8 @@ static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) {
|
||||
|
||||
if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))&& !is_var_dead(ctx, ssa_op->op1_use)) {
|
||||
if (!try_remove_var_def(ctx, ssa_op->op1_use, ssa_op->op1_use_chain, opline)) {
|
||||
if (ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) {
|
||||
if (ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)
|
||||
&& opline->opcode != ZEND_CASE) {
|
||||
free_var = ssa_op->op1_use;
|
||||
free_var_type = opline->op1_type;
|
||||
}
|
||||
|
||||
@@ -820,7 +820,8 @@ static inline int ct_eval_func_call(
|
||||
} else if (zend_string_equals_literal(name, "substr")) {
|
||||
if (Z_TYPE_P(args[0]) != IS_STRING
|
||||
|| Z_TYPE_P(args[1]) != IS_LONG
|
||||
|| Z_TYPE_P(args[2]) != IS_LONG) {
|
||||
|| Z_TYPE_P(args[2]) != IS_LONG
|
||||
|| (CG(compiler_options) & ZEND_COMPILE_NO_BUILTIN_STRLEN)) {
|
||||
return FAILURE;
|
||||
}
|
||||
/* pass */
|
||||
|
||||
+7
-1
@@ -87,7 +87,13 @@ opcache.max_accelerated_files (default "2000")
|
||||
between 200 and 1000000 are allowed.
|
||||
|
||||
opcache.max_wasted_percentage (default "5")
|
||||
The maximum percentage of "wasted" memory until a restart is scheduled.
|
||||
When the cache fills up this setting decides when to actually reset (dump
|
||||
all entries) it. At the default of 5% it means that if less than 5% of
|
||||
the entries in the now full cache are wasted/orphaned, then you have a good
|
||||
active cache. There is no point emptying a cache full of good entries
|
||||
only to most likely refill it with those same entries. Once more than 5%
|
||||
of the cache consists of wasted entries, the cache will reset in this
|
||||
cache-full scenario. This can be set up to as high as 50%.
|
||||
|
||||
opcache.use_cwd (default "1")
|
||||
When this directive is enabled, the OPcache appends the current working
|
||||
|
||||
@@ -9,8 +9,12 @@ mbstring.func_overload=2
|
||||
<?php
|
||||
|
||||
var_dump(strpos("foo", "o"));
|
||||
var_dump(substr("foo", 1));
|
||||
var_dump(substr("foo", 1, 1));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
|
||||
int(1)
|
||||
string(2) "oo"
|
||||
string(1) "o"
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #76094 (Access violation when using opcache)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=-1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
function MetaType($t)
|
||||
{
|
||||
|
||||
switch (strtoupper($t)) {
|
||||
case PHP_INT_MAX :
|
||||
return 1;
|
||||
case 0:
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(MetaType("aa"));
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
@@ -852,13 +852,6 @@ static void zend_accel_persist_class_table(HashTable *class_table)
|
||||
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length, int for_shm)
|
||||
{
|
||||
script->mem = ZCG(mem);
|
||||
script->corrupted = 0;
|
||||
ZCG(current_persistent_script) = script;
|
||||
|
||||
if (!for_shm) {
|
||||
/* script is not going to be saved in SHM */
|
||||
script->corrupted = 1;
|
||||
}
|
||||
|
||||
ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
|
||||
zend_shared_alloc_clear_xlat_table();
|
||||
@@ -867,6 +860,15 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
|
||||
if (key && *key) {
|
||||
*key = zend_accel_memdup(*key, key_length + 1);
|
||||
}
|
||||
|
||||
script->corrupted = 0;
|
||||
ZCG(current_persistent_script) = script;
|
||||
|
||||
if (!for_shm) {
|
||||
/* script is not going to be saved in SHM */
|
||||
script->corrupted = 1;
|
||||
}
|
||||
|
||||
zend_accel_store_interned_string(script->script.filename);
|
||||
|
||||
#ifdef __SSE2__
|
||||
|
||||
@@ -308,8 +308,7 @@ static void phar_do_403(char *entry, int entry_len) /* {{{ */
|
||||
sapi_header_op(SAPI_HEADER_REPLACE, &ctr);
|
||||
sapi_send_headers();
|
||||
PHPWRITE("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ", sizeof("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ") - 1);
|
||||
PHPWRITE(entry, entry_len);
|
||||
PHPWRITE(" Access Denied</h1>\n </body>\n</html>", sizeof(" Access Denied</h1>\n </body>\n</html>") - 1);
|
||||
PHPWRITE("Access Denied</h1>\n </body>\n</html>", sizeof("Access Denied</h1>\n </body>\n</html>") - 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -333,8 +332,7 @@ static void phar_do_404(phar_archive_data *phar, char *fname, int fname_len, cha
|
||||
sapi_header_op(SAPI_HEADER_REPLACE, &ctr);
|
||||
sapi_send_headers();
|
||||
PHPWRITE("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ", sizeof("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ") - 1);
|
||||
PHPWRITE(entry, entry_len);
|
||||
PHPWRITE(" Not Found</h1>\n </body>\n</html>", sizeof(" Not Found</h1>\n </body>\n</html>") - 1);
|
||||
PHPWRITE("Not Found</h1>\n </body>\n</html>", sizeof("Not Found</h1>\n </body>\n</html>") - 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@ Status: 403 Access Denied
|
||||
<title>Access Denied</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>403 - File /hi Access Denied</h1>
|
||||
<h1>403 - File Access Denied</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,6 +18,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /notfound.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,6 +18,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /index.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -19,6 +19,6 @@ Status: 403 Access Denied
|
||||
<title>Access Denied</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>403 - File /hi Access Denied</h1>
|
||||
<h1>403 - File Access Denied</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,6 +16,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /notfound.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,6 +16,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /index.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -19,6 +19,6 @@ Status: 403 Access Denied
|
||||
<title>Access Denied</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>403 - File /hi Access Denied</h1>
|
||||
<h1>403 - File Access Denied</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,6 +16,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /notfound.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,6 +16,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /index.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -19,6 +19,6 @@ Status: 403 Access Denied
|
||||
<title>Access Denied</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>403 - File /hi Access Denied</h1>
|
||||
<h1>403 - File Access Denied</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,6 +17,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /notfound.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,6 +16,6 @@ Status: 404 Not Found
|
||||
<title>File Not Found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - File /index.php Not Found</h1>
|
||||
<h1>404 - File Not Found</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,7 +7,7 @@ Olivier Doucet Olivier Doucet Boris Lytochkin
|
||||
require_once(dirname(__FILE__).'/skipif.inc');
|
||||
require_once(dirname(__FILE__).'/snmp_include.inc');
|
||||
|
||||
if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('MIB file not in the system');
|
||||
if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('skip MIB file not in the system');
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
+9
-11
@@ -1521,6 +1521,7 @@ PHP_METHOD(SoapServer, handle)
|
||||
xmlCharEncodingHandlerPtr old_encoding;
|
||||
HashTable *old_class_map, *old_typemap;
|
||||
int old_features;
|
||||
zval tmp_soap;
|
||||
|
||||
SOAP_SERVER_BEGIN_CODE();
|
||||
|
||||
@@ -1684,8 +1685,7 @@ PHP_METHOD(SoapServer, handle)
|
||||
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
|
||||
/* If persistent then set soap_obj from from the previous created session (if available) */
|
||||
if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
|
||||
zval *tmp_soap;
|
||||
zval *session_vars;
|
||||
zval *session_vars, *tmp_soap_p;
|
||||
|
||||
if (PS(session_status) != php_session_active &&
|
||||
PS(session_status) != php_session_disabled) {
|
||||
@@ -1696,16 +1696,15 @@ PHP_METHOD(SoapServer, handle)
|
||||
session_vars = &PS(http_session_vars);
|
||||
ZVAL_DEREF(session_vars);
|
||||
if (Z_TYPE_P(session_vars) == IS_ARRAY &&
|
||||
(tmp_soap = zend_hash_str_find(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1)) != NULL &&
|
||||
Z_TYPE_P(tmp_soap) == IS_OBJECT &&
|
||||
Z_OBJCE_P(tmp_soap) == service->soap_class.ce) {
|
||||
soap_obj = tmp_soap;
|
||||
(tmp_soap_p = zend_hash_str_find(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1)) != NULL &&
|
||||
Z_TYPE_P(tmp_soap_p) == IS_OBJECT &&
|
||||
Z_OBJCE_P(tmp_soap_p) == service->soap_class.ce) {
|
||||
soap_obj = tmp_soap_p;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* If new session or something weird happned */
|
||||
if (soap_obj == NULL) {
|
||||
zval tmp_soap;
|
||||
|
||||
object_init_ex(&tmp_soap, service->soap_class.ce);
|
||||
|
||||
@@ -1758,13 +1757,12 @@ PHP_METHOD(SoapServer, handle)
|
||||
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
|
||||
/* If session then update session hash with new object */
|
||||
if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
|
||||
zval *tmp_soap_pp;
|
||||
zval *session_vars = &PS(http_session_vars);
|
||||
zval *session_vars = &PS(http_session_vars), *tmp_soap_p;
|
||||
|
||||
ZVAL_DEREF(session_vars);
|
||||
if (Z_TYPE_P(session_vars) == IS_ARRAY &&
|
||||
(tmp_soap_pp = zend_hash_str_update(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1, &tmp_soap)) != NULL) {
|
||||
soap_obj = tmp_soap_pp;
|
||||
(tmp_soap_p = zend_hash_str_update(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1, &tmp_soap)) != NULL) {
|
||||
soap_obj = tmp_soap_p;
|
||||
} else {
|
||||
soap_obj = &tmp_soap;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ if (!extension_loaded('sockets')) {
|
||||
die('skip sockets extension not available.');
|
||||
}
|
||||
if (PHP_OS !== 'Darwin') {
|
||||
die('is not OSX.');
|
||||
die('skip Is not OSX.');
|
||||
}
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+2
-2
@@ -1883,8 +1883,8 @@ outexcept:
|
||||
|
||||
/* {{{ arginfo and function table */
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_array___construct, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, array)
|
||||
ZEND_ARG_INFO(0, ar_flags)
|
||||
ZEND_ARG_INFO(0, input)
|
||||
ZEND_ARG_INFO(0, flags)
|
||||
ZEND_ARG_INFO(0, iterator_class)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/*
|
||||
The following php_mt_...() functions are based on a C++ class MTRand by
|
||||
Richard J. Wagner. For more information see the web page at
|
||||
http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html
|
||||
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/MersenneTwister.h
|
||||
|
||||
Mersenne Twister random number generator -- a C++ class MTRand
|
||||
Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
|
||||
@@ -45,7 +45,7 @@
|
||||
The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
|
||||
are far greater. The generator is also fast; it avoids multiplication and
|
||||
division, and it benefits from caches and pipelines. For more information
|
||||
see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html
|
||||
see the inventors' web page at http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
|
||||
|
||||
Reference
|
||||
M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
|
||||
|
||||
@@ -7,7 +7,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
}
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
if (!$php) {
|
||||
die("No php executable defined\n");
|
||||
die("skip No php executable defined\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -13,7 +13,7 @@ include_once __DIR__ . '/common.inc';
|
||||
$cmd = "mklink /?";
|
||||
$ret = @exec($cmd, $output, $return_val);
|
||||
if (count($output) == 0) {
|
||||
die("mklink.exe not found in PATH");
|
||||
die("skip mklink.exe not found in PATH");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -13,7 +13,7 @@ include_once __DIR__ . '/common.inc';
|
||||
$cmd = "mklink /?";
|
||||
$ret = @exec($cmd, $output, $return_val);
|
||||
if (count($output) == 0) {
|
||||
die("mklink.exe not found in PATH");
|
||||
die("skip mklink.exe not found in PATH");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ Chunked encoding
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$filters = stream_get_filters();
|
||||
if(! in_array( "dechunk", $filters )) die( "chunked filter not available." );
|
||||
if(! in_array( "dechunk", $filters )) die( "skip Chunked filter not available." );
|
||||
?>
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
|
||||
@@ -64,7 +64,7 @@ string(1) "?"
|
||||
string(1) ","
|
||||
string(1) " "
|
||||
++++++++++++++++++++++
|
||||
string(25) "Czech_Czech Republic.1250"
|
||||
string(%d) "Czech_Czech%s.1250"
|
||||
string(1) ","
|
||||
string(1) " "
|
||||
string(3) "CZK"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!class_exists('zip')) die('ZipArchive');
|
||||
if(!class_exists('zip')) die('skip ZipArchive');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ extern zend_module_entry xml_module_entry;
|
||||
|
||||
#ifdef HAVE_XML
|
||||
|
||||
#include "ext/xml/expat_compat.h"
|
||||
#include "expat_compat.h"
|
||||
|
||||
#ifdef XML_UNICODE
|
||||
#error "UTF-16 Unicode support not implemented!"
|
||||
|
||||
@@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg)
|
||||
|
||||
/* {{{ php_load_zend_extension_cb
|
||||
*/
|
||||
#ifdef HAVE_LIBDL
|
||||
static void php_load_zend_extension_cb(void *arg)
|
||||
{
|
||||
char *filename = *((char **) arg);
|
||||
@@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg)
|
||||
efree(libpath);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void php_load_zend_extension_cb(void *arg) { }
|
||||
#endif
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_init_config
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
/* edit configure.ac to change version number */
|
||||
#define PHP_MAJOR_VERSION 7
|
||||
#define PHP_MINOR_VERSION 2
|
||||
#define PHP_RELEASE_VERSION 4
|
||||
#define PHP_EXTRA_VERSION "RC1"
|
||||
#define PHP_VERSION "7.2.4RC1"
|
||||
#define PHP_VERSION_ID 70204
|
||||
#define PHP_RELEASE_VERSION 5
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "7.2.5"
|
||||
#define PHP_VERSION_ID 70205
|
||||
+2
-2
@@ -878,7 +878,6 @@ default_socket_timeout = 60
|
||||
;
|
||||
; Notes for Windows environments :
|
||||
;
|
||||
; - ODBC support is built in, so no dll is needed for it.
|
||||
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
|
||||
; extension folders as well as the separate PECL DLL download (PHP 5+).
|
||||
; Be sure to appropriately set the extension_dir directive.
|
||||
@@ -897,6 +896,7 @@ default_socket_timeout = 60
|
||||
;extension=exif ; Must be after mbstring as it depends on it
|
||||
;extension=mysqli
|
||||
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
|
||||
;extension=odbc
|
||||
;extension=openssl
|
||||
;extension=pdo_firebird
|
||||
;extension=pdo_mysql
|
||||
@@ -1042,7 +1042,7 @@ smtp_port = 25
|
||||
;mail.force_extra_parameters =
|
||||
|
||||
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
|
||||
mail.add_x_header = On
|
||||
mail.add_x_header = Off
|
||||
|
||||
; 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.
|
||||
|
||||
+2
-2
@@ -885,7 +885,6 @@ default_socket_timeout = 60
|
||||
;
|
||||
; Notes for Windows environments :
|
||||
;
|
||||
; - ODBC support is built in, so no dll is needed for it.
|
||||
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
|
||||
; extension folders as well as the separate PECL DLL download (PHP 5+).
|
||||
; Be sure to appropriately set the extension_dir directive.
|
||||
@@ -904,6 +903,7 @@ default_socket_timeout = 60
|
||||
;extension=exif ; Must be after mbstring as it depends on it
|
||||
;extension=mysqli
|
||||
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
|
||||
;extension=odbc
|
||||
;extension=openssl
|
||||
;extension=pdo_firebird
|
||||
;extension=pdo_mysql
|
||||
@@ -1049,7 +1049,7 @@ smtp_port = 25
|
||||
;mail.force_extra_parameters =
|
||||
|
||||
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
|
||||
mail.add_x_header = On
|
||||
mail.add_x_header = Off
|
||||
|
||||
; 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.
|
||||
|
||||
+6
-2
@@ -876,7 +876,9 @@ HELP;
|
||||
|
||||
junit_save_xml();
|
||||
|
||||
if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['BORKED'])) {
|
||||
if (getenv('REPORT_EXIT_STATUS') !== '0' &&
|
||||
getenv('REPORT_EXIT_STATUS') !== 'no' &&
|
||||
($sum_results['FAILED'] || $sum_results['BORKED'])) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -1016,7 +1018,9 @@ save_or_mail_results();
|
||||
|
||||
junit_save_xml();
|
||||
|
||||
if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['BORKED'])) {
|
||||
if (getenv('REPORT_EXIT_STATUS') !== '0' &&
|
||||
getenv('REPORT_EXIT_STATUS') !== 'no' &&
|
||||
($sum_results['FAILED'] || $sum_results['BORKED'])) {
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
||||
|
||||
@@ -132,6 +132,7 @@ static struct ini_value_parser_s ini_fpm_pool_options[] = {
|
||||
{ "listen.mode", &fpm_conf_set_string, WPO(listen_mode) },
|
||||
{ "listen.allowed_clients", &fpm_conf_set_string, WPO(listen_allowed_clients) },
|
||||
{ "process.priority", &fpm_conf_set_integer, WPO(process_priority) },
|
||||
{ "process.dumpable", &fpm_conf_set_boolean, WPO(process_dumpable) },
|
||||
{ "pm", &fpm_conf_set_pm, WPO(pm) },
|
||||
{ "pm.max_children", &fpm_conf_set_integer, WPO(pm_max_children) },
|
||||
{ "pm.start_servers", &fpm_conf_set_integer, WPO(pm_start_servers) },
|
||||
@@ -614,6 +615,7 @@ static void *fpm_worker_pool_config_alloc() /* {{{ */
|
||||
wp->config->listen_backlog = FPM_BACKLOG_DEFAULT;
|
||||
wp->config->pm_process_idle_timeout = 10; /* 10s by default */
|
||||
wp->config->process_priority = 64; /* 64 means unset */
|
||||
wp->config->process_dumpable = 0;
|
||||
wp->config->clear_env = 1;
|
||||
|
||||
if (!fpm_worker_all_pools) {
|
||||
@@ -1646,6 +1648,7 @@ static void fpm_conf_dump() /* {{{ */
|
||||
} else {
|
||||
zlog(ZLOG_NOTICE, "\tprocess.priority = %d", wp->config->process_priority);
|
||||
}
|
||||
zlog(ZLOG_NOTICE, "\tprocess.dumpable = %s", BOOL2STR(wp->config->process_dumpable));
|
||||
zlog(ZLOG_NOTICE, "\tpm = %s", PM2STR(wp->config->pm));
|
||||
zlog(ZLOG_NOTICE, "\tpm.max_children = %d", wp->config->pm_max_children);
|
||||
zlog(ZLOG_NOTICE, "\tpm.start_servers = %d", wp->config->pm_start_servers);
|
||||
|
||||
@@ -64,6 +64,7 @@ struct fpm_worker_pool_config_s {
|
||||
char *listen_mode;
|
||||
char *listen_allowed_clients;
|
||||
int process_priority;
|
||||
int process_dumpable;
|
||||
int pm;
|
||||
int pm_max_children;
|
||||
int pm_start_servers;
|
||||
|
||||
+68
-25
@@ -44,6 +44,10 @@ enum { FPM_GET_USE_SOCKET = 1, FPM_STORE_SOCKET = 2, FPM_STORE_USE_SOCKET = 3 };
|
||||
static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
|
||||
{
|
||||
unsigned i;
|
||||
unsigned socket_set_count = 0;
|
||||
unsigned socket_set[FPM_ENV_SOCKET_SET_MAX];
|
||||
unsigned socket_set_buf = 0;
|
||||
char envname[32];
|
||||
char *env_value = 0;
|
||||
int p = 0;
|
||||
struct listening_socket_s *ls = sockets_list.data;
|
||||
@@ -54,8 +58,20 @@ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
|
||||
} else { /* on PARENT EXEC we want socket fds to be inherited through environment variable */
|
||||
char fd[32];
|
||||
sprintf(fd, "%d", ls->sock);
|
||||
env_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + 1);
|
||||
p += sprintf(env_value + p, "%s%s=%s", p ? "," : "", ls->key, fd);
|
||||
|
||||
socket_set_buf = (i % FPM_ENV_SOCKET_SET_SIZE == 0 && i) ? 1 : 0;
|
||||
env_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + socket_set_buf + 1);
|
||||
|
||||
if (i % FPM_ENV_SOCKET_SET_SIZE == 0) {
|
||||
socket_set[socket_set_count] = p + socket_set_buf;
|
||||
socket_set_count++;
|
||||
if (i) {
|
||||
*(env_value + p + 1) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
p += sprintf(env_value + p + socket_set_buf, "%s%s=%s", (p && !socket_set_buf) ? "," : "", ls->key, fd);
|
||||
p += socket_set_buf;
|
||||
}
|
||||
|
||||
if (which == FPM_CLEANUP_PARENT_EXIT_MAIN) {
|
||||
@@ -67,7 +83,14 @@ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
|
||||
}
|
||||
|
||||
if (env_value) {
|
||||
setenv("FPM_SOCKETS", env_value, 1);
|
||||
for (i = 0; i < socket_set_count; i++) {
|
||||
if (!i) {
|
||||
strcpy(envname, "FPM_SOCKETS");
|
||||
} else {
|
||||
sprintf(envname, "FPM_SOCKETS_%d", i);
|
||||
}
|
||||
setenv(envname, env_value + socket_set[i], 1);
|
||||
}
|
||||
free(env_value);
|
||||
}
|
||||
|
||||
@@ -352,7 +375,9 @@ int fpm_sockets_init_main() /* {{{ */
|
||||
{
|
||||
unsigned i, lq_len;
|
||||
struct fpm_worker_pool_s *wp;
|
||||
char *inherited = getenv("FPM_SOCKETS");
|
||||
char sockname[32];
|
||||
char sockpath[256];
|
||||
char *inherited;
|
||||
struct listening_socket_s *ls;
|
||||
|
||||
if (0 == fpm_array_init(&sockets_list, sizeof(struct listening_socket_s), 10)) {
|
||||
@@ -360,28 +385,46 @@ int fpm_sockets_init_main() /* {{{ */
|
||||
}
|
||||
|
||||
/* import inherited sockets */
|
||||
while (inherited && *inherited) {
|
||||
char *comma = strchr(inherited, ',');
|
||||
int type, fd_no;
|
||||
char *eq;
|
||||
|
||||
if (comma) {
|
||||
*comma = '\0';
|
||||
}
|
||||
|
||||
eq = strchr(inherited, '=');
|
||||
if (eq) {
|
||||
*eq = '\0';
|
||||
fd_no = atoi(eq + 1);
|
||||
type = fpm_sockets_domain_from_address(inherited);
|
||||
zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, inherited);
|
||||
fpm_sockets_hash_op(fd_no, 0, inherited, type, FPM_STORE_SOCKET);
|
||||
}
|
||||
|
||||
if (comma) {
|
||||
inherited = comma + 1;
|
||||
for (i = 0; i < FPM_ENV_SOCKET_SET_MAX; i++) {
|
||||
if (!i) {
|
||||
strcpy(sockname, "FPM_SOCKETS");
|
||||
} else {
|
||||
inherited = 0;
|
||||
sprintf(sockname, "FPM_SOCKETS_%d", i);
|
||||
}
|
||||
inherited = getenv(sockname);
|
||||
if (!inherited) {
|
||||
break;
|
||||
}
|
||||
|
||||
while (inherited && *inherited) {
|
||||
char *comma = strchr(inherited, ',');
|
||||
int type, fd_no;
|
||||
char *eq;
|
||||
|
||||
if (comma) {
|
||||
*comma = '\0';
|
||||
}
|
||||
|
||||
eq = strchr(inherited, '=');
|
||||
if (eq) {
|
||||
int sockpath_len = eq - inherited;
|
||||
if (sockpath_len > 255) {
|
||||
/* this should never happen as UDS limit is lower */
|
||||
sockpath_len = 255;
|
||||
}
|
||||
memcpy(sockpath, inherited, sockpath_len);
|
||||
sockpath[sockpath_len] = '\0';
|
||||
fd_no = atoi(eq + 1);
|
||||
type = fpm_sockets_domain_from_address(sockpath);
|
||||
zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, sockpath);
|
||||
fpm_sockets_hash_op(fd_no, 0, sockpath, type, FPM_STORE_SOCKET);
|
||||
}
|
||||
|
||||
if (comma) {
|
||||
inherited = comma + 1;
|
||||
} else {
|
||||
inherited = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,12 @@
|
||||
#if (__FreeBSD__) || (__OpenBSD__)
|
||||
#define FPM_BACKLOG_DEFAULT -1
|
||||
#else
|
||||
#define FPM_BACKLOG_DEFAULT 511
|
||||
#define FPM_BACKLOG_DEFAULT 511
|
||||
#endif
|
||||
|
||||
#define FPM_ENV_SOCKET_SET_MAX 256
|
||||
#define FPM_ENV_SOCKET_SET_SIZE 128
|
||||
|
||||
enum fpm_address_domain fpm_sockets_domain_from_address(char *addr);
|
||||
int fpm_sockets_init_main();
|
||||
int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq);
|
||||
|
||||
@@ -398,7 +398,7 @@ int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
}
|
||||
|
||||
#ifdef HAVE_PRCTL
|
||||
if (0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
|
||||
if (wp->config->process_dumpable && 0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
|
||||
zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -69,6 +69,12 @@ listen = 127.0.0.1:9000
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
|
||||
; or group is differrent than the master process user. It allows to create process
|
||||
; core dump and ptrace the process for the pool user.
|
||||
; Default Value: no
|
||||
; process.dumpable = yes
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
|
||||
@@ -464,7 +464,7 @@ static int sapi_lsapi_activate()
|
||||
static sapi_module_struct lsapi_sapi_module =
|
||||
{
|
||||
"litespeed",
|
||||
"LiteSpeed V7.0",
|
||||
"LiteSpeed V7.1",
|
||||
|
||||
php_lsapi_startup, /* startup */
|
||||
php_module_shutdown_wrapper, /* shutdown */
|
||||
@@ -574,6 +574,7 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va
|
||||
++pKey;
|
||||
if ( *pKey == 4 ) {
|
||||
type = ZEND_INI_SYSTEM;
|
||||
stage = PHP_INI_STAGE_ACTIVATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -151,6 +151,7 @@ static int *s_accepting_workers = NULL;
|
||||
static int *s_global_counter = &s_req_processed;
|
||||
static int s_max_busy_workers = -1;
|
||||
static char *s_stderr_log_path = NULL;
|
||||
static int s_ignore_pid = -1;
|
||||
|
||||
LSAPI_Request g_req =
|
||||
{ .m_fdListen = -1, .m_fd = -1 };
|
||||
@@ -1140,7 +1141,13 @@ static int lsapi_changeUGid( LSAPI_Request * pReq )
|
||||
}
|
||||
|
||||
s_uid = uid;
|
||||
|
||||
|
||||
if ( pReq->m_fdListen != -1 )
|
||||
{
|
||||
close( pReq->m_fdListen );
|
||||
pReq->m_fdListen = -1;
|
||||
}
|
||||
|
||||
pStderrLog = LSAPI_GetEnv_r( pReq, "LSAPI_STDERR_LOG");
|
||||
if (pStderrLog)
|
||||
lsapi_reopen_stderr(pStderrLog);
|
||||
@@ -2806,6 +2813,12 @@ static void lsapi_sigchild( int signal )
|
||||
pid = 0;
|
||||
continue;
|
||||
}
|
||||
if ( pid == s_ignore_pid )
|
||||
{
|
||||
pid = 0;
|
||||
s_ignore_pid = -1;
|
||||
continue;
|
||||
}
|
||||
child_status = find_child_status( pid );
|
||||
if ( child_status )
|
||||
{
|
||||
@@ -3024,7 +3037,7 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer,
|
||||
while( !s_stop )
|
||||
{
|
||||
if (s_proc_group_timer_cb != NULL) {
|
||||
s_proc_group_timer_cb();
|
||||
s_proc_group_timer_cb(&s_ignore_pid);
|
||||
}
|
||||
|
||||
curTime = time( NULL );
|
||||
@@ -3119,13 +3132,14 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer,
|
||||
if (s_busy_workers)
|
||||
__sync_add_and_fetch(s_busy_workers, 1);
|
||||
lsapi_set_nblock( pReq->m_fd, 0 );
|
||||
//keep it open if busy_count is used.
|
||||
s_keepListener = 1;
|
||||
// if ( pReq->m_fdListen != -1 )
|
||||
// {
|
||||
// close( pReq->m_fdListen );
|
||||
// pReq->m_fdListen = -1;
|
||||
// }
|
||||
//keep it open if busy_count is used.
|
||||
if (s_busy_workers && s_uid != 0)
|
||||
s_keepListener = 1;
|
||||
else if ( pReq->m_fdListen != -1 )
|
||||
{
|
||||
close( pReq->m_fdListen );
|
||||
pReq->m_fdListen = -1;
|
||||
}
|
||||
/* don't catch our signals */
|
||||
sigaction( SIGCHLD, &old_child, 0 );
|
||||
sigaction( SIGTERM, &old_term, 0 );
|
||||
|
||||
@@ -384,7 +384,7 @@ int LSAPI_is_suEXEC_Daemon(void);
|
||||
|
||||
int LSAPI_Set_Restored_Parent_Pid(int pid);
|
||||
|
||||
typedef void (*LSAPI_On_Timer_pf)(void);
|
||||
typedef void (*LSAPI_On_Timer_pf)(int *forked_child_pid);
|
||||
void LSAPI_Register_Pgrp_Timer_Callback(LSAPI_On_Timer_pf);
|
||||
|
||||
int LSAPI_Inc_Req_Processed(int cnt);
|
||||
|
||||
+155
-677
File diff suppressed because it is too large.
Load diff
+8
-13
@@ -290,7 +290,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(port_buf, 7, "%u", port);
|
||||
snprintf(port_buf, sizeof(port_buf), "%u", port);
|
||||
if (!any_addr) {
|
||||
rc = getaddrinfo(addr, port_buf, &hints, &res);
|
||||
} else {
|
||||
@@ -301,20 +301,18 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
|
||||
#ifndef PHP_WIN32
|
||||
if (rc == EAI_SYSTEM) {
|
||||
char buf[128];
|
||||
int wrote;
|
||||
|
||||
wrote = snprintf(buf, 128, "Could not translate address '%s'", addr);
|
||||
buf[wrote] = '\0';
|
||||
snprintf(buf, sizeof(buf), "Could not translate address '%s'", addr);
|
||||
|
||||
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
|
||||
|
||||
return sock;
|
||||
} else {
|
||||
#endif
|
||||
char buf[256];
|
||||
int wrote;
|
||||
|
||||
wrote = snprintf(buf, 256, "Host '%s' not found. %s", addr, estrdup(gai_strerror(rc)));
|
||||
buf[wrote] = '\0';
|
||||
snprintf(buf, sizeof(buf), "Host '%s' not found. %s", addr, estrdup(gai_strerror(rc)));
|
||||
|
||||
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
|
||||
|
||||
return sock;
|
||||
@@ -324,13 +322,10 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
|
||||
return sock;
|
||||
}
|
||||
|
||||
if((sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) {
|
||||
char buf[128];
|
||||
int wrote;
|
||||
if ((sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) {
|
||||
const char *msg = "Unable to create socket";
|
||||
|
||||
wrote = sprintf(buf, "Unable to create socket");
|
||||
buf[wrote] = '\0';
|
||||
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
|
||||
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, msg, strlen(msg));
|
||||
|
||||
return sock;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ VC_VERSIONS[1910] = 'MSVC15 (Visual C++ 2017)';
|
||||
VC_VERSIONS[1911] = 'MSVC15 (Visual C++ 2017)';
|
||||
VC_VERSIONS[1912] = 'MSVC15 (Visual C++ 2017)';
|
||||
VC_VERSIONS[1913] = 'MSVC15 (Visual C++ 2017)';
|
||||
VC_VERSIONS[1914] = 'MSVC15 (Visual C++ 2017)';
|
||||
|
||||
var VC_VERSIONS_SHORT = new Array();
|
||||
VC_VERSIONS_SHORT[1700] = 'VC11';
|
||||
@@ -82,6 +83,7 @@ VC_VERSIONS_SHORT[1910] = 'VC15';
|
||||
VC_VERSIONS_SHORT[1911] = 'VC15';
|
||||
VC_VERSIONS_SHORT[1912] = 'VC15';
|
||||
VC_VERSIONS_SHORT[1913] = 'VC15';
|
||||
VC_VERSIONS_SHORT[1914] = 'VC15';
|
||||
|
||||
if (PROGRAM_FILES == null) {
|
||||
PROGRAM_FILES = "C:\\Program Files";
|
||||
@@ -1501,7 +1503,11 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
||||
|
||||
DEFINE('CFLAGS_' + EXT + '_OBJ', '$(CFLAGS_PHP) $(CFLAGS_' + EXT + ')');
|
||||
}
|
||||
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
|
||||
if (MODE_PHPIZE) {
|
||||
if (!FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
|
||||
var _tmp = FSO.CreateTextFile(PHP_DIR + "/include/main/config.pickle.h", true);
|
||||
_tmp.Close();
|
||||
}
|
||||
cflags = "/FI main/config.pickle.h " + cflags;
|
||||
}
|
||||
ADD_FLAG("CFLAGS_" + EXT, cflags);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
bz2-1.0.6
|
||||
cclient-2007f
|
||||
freetype-2.8.0
|
||||
freetype-2.8.1
|
||||
icu-57.1
|
||||
jpeglib-9b
|
||||
libcurl-7.56.0
|
||||
libcurl-7.59.0
|
||||
libiconv-1.15
|
||||
libmpir-3.0.0
|
||||
libpng-1.6.34
|
||||
libpq-9.6.2
|
||||
libsodium-1.0.12
|
||||
libpq-9.6.5
|
||||
libsodium-1.0.16
|
||||
libssh2-1.8.0
|
||||
libtidy-5.4.0
|
||||
libxslt-1.1.30
|
||||
libxml-2.9.5
|
||||
openssl-1.1.0e
|
||||
libxslt-1.1.32
|
||||
libxml-2.9.7
|
||||
openssl-1.1.0h
|
||||
Reference in new issue
Block a user