diff --git a/.gdbinit b/.gdbinit index 2445825455f45..4a26d9608bd39 100644 --- a/.gdbinit +++ b/.gdbinit @@ -37,9 +37,60 @@ end define dump_bt set $t = $arg0 while $t - printf "[0x%08x] ", $t + printf "[%p] ", $t if $t->function_state.function->common.function_name - printf "%s() ", $t->function_state.function->common.function_name + if $t->function_state.arguments + set $count = (int)*($t->function_state.arguments) + printf "%s(", $t->function_state.function->common.function_name + while $count > 0 + set $zvalue = *(zval **)($t->function_state.arguments - $count) + set $type = $zvalue->type + if $type == 0 + printf "NULL" + end + if $type == 1 + printf "%ld", $zvalue->value.lval + end + if $type == 2 + printf "%lf", $zvalue->value.dval + end + if $type == 3 + if $zvalue->value.lval + printf "true" + else + printf "false" + end + end + if $type == 4 + printf "array(%d)[%p]", $zvalue->value.ht->nNumOfElements, $zvalue + end + if $type == 5 + printf "object[%p]", $zvalue + end + if $type == 6 + ____print_str $zvalue->value.str.val $zvalue->value.str.len + end + if $type == 7 + printf "resource(#%d)", $zvalue->value.lval + end + if $type == 8 + printf "constant" + end + if $type == 9 + printf "const_array" + end + if $type > 9 + printf "unknown type %d", $type + end + set $count = $count -1 + if $count > 0 + printf ", " + end + end + printf ") " + else + printf "%s() ", $t->function_state.function->common.function_name + end else printf "??? " end @@ -167,7 +218,7 @@ define ____printzv ____executor_globals set $zvalue = $arg0 - printf "[0x%08x] ", $zvalue + printf "[%p] ", $zvalue if $zvalue == $eg.uninitialized_zval_ptr printf "*uninitialized* " @@ -208,7 +259,7 @@ end define print_const_table set $ind = 1 - printf "[0x%08x] {\n", $arg0 + printf "[%p] {\n", $arg0 ____print_const_table $arg0 printf "}\n" end @@ -248,7 +299,7 @@ end define print_ht set $ind = 1 - printf "[0x%08x] {\n", $arg0 + printf "[%p] {\n", $arg0 ____print_ht $arg0 1 printf "}\n" end @@ -259,7 +310,7 @@ end define print_htptr set $ind = 1 - printf "[0x%08x] {\n", $arg0 + printf "[%p] {\n", $arg0 ____print_ht $arg0 0 printf "}\n" end @@ -270,7 +321,7 @@ end define print_htstr set $ind = 1 - printf "[0x%08x] {\n", $arg0 + printf "[%p] {\n", $arg0 ____print_ht $arg0 2 printf "}\n" end @@ -306,7 +357,7 @@ end define print_ft set $ind = 1 - printf "[0x%08x] {\n", $arg0 + printf "[%p] {\n", $arg0 ____print_ft $arg0 printf "}\n" end @@ -383,7 +434,7 @@ end define print_pi set $pi = $arg0 - printf "[0x%08x] {\n", $pi + printf "[%p] {\n", $pi printf " h = %lu\n", $pi->h printf " flags = %d (", $pi->flags if $pi->flags & 0x100 @@ -439,7 +490,7 @@ define printzn set $optype = "IS_UNUSED" end - printf "[0x%08x] %s", $znode, $optype + printf "[%p] %s", $znode, $optype if $znode->op_type == 1 printf ": " @@ -519,7 +570,7 @@ define zmemcheck else set $filename = $filename + 1 end - printf " 0x%08x ", $aptr + printf " %p ", $aptr if $p->size == sizeof(struct _zval_struct) && ((struct _zval_struct *)$aptr)->type >= 0 && ((struct _zval_struct *)$aptr)->type < 10 printf "ZVAL?(%-2d) ", $p->size else @@ -549,7 +600,7 @@ define zmemcheck end end if $not_found - printf "no such block that begins at 0x%08x.\n", $aptr + printf "no such block that begins at %p.\n", $aptr end if $arg0 == 0 printf "-------------------------------------------------------------------------------\n" diff --git a/.gitattributes b/.gitattributes index d53e569db1426..1f4a7195b7614 100644 --- a/.gitattributes +++ b/.gitattributes @@ -22,152 +22,153 @@ sapi/continuity/capi.c ident Zend/RFCs/002.txt ident Zend/RFCs/003.txt ident NEWS merge=NEWS -/ext/bz2/tests/005.phpt -crlf -/ext/dom/tests/dom005.phpt -crlf -/ext/dom/tests/DOMImplementation_createDocumentType_basic.phpt -crlf -/ext/ereg/tests/009.phpt -crlf -/ext/iconv/tests/eucjp2sjis.phpt -crlf -/ext/iconv/tests/eucjp2utf8.phpt -crlf -/ext/iconv/tests/iconv_stream_filter_delimiter.phpt -crlf -/ext/iconv/tests/iconv_stream_filter.phpt -crlf -/ext/mbstring/tests/mb_split-compat-01.phpt -crlf -/ext/phar/tests/005.phpt -crlf -/ext/phar/tests/phar_commitwrite.phpt -crlf -/ext/phar/tests/phar_create_in_cwd.phpt -crlf -/ext/phar/tests/phar_mount.phpt -crlf -/ext/reflection/tests/009.phpt -crlf -/ext/reflection/tests/025.phpt -crlf -/ext/standard/tests/general_functions/highlight_heredoc.phpt -crlf -/ext/standard/tests/general_functions/parse_ini_file.phpt -crlf -/ext/standard/tests/general_functions/parse_ini_string_002.phpt -crlf -/ext/standard/tests/strings/006.phpt -crlf -/ext/standard/tests/strings/addslashes_variation2.phpt -crlf -/ext/standard/tests/strings/addslashes_variation3.phpt -crlf -/ext/standard/tests/strings/bug21453.phpt -crlf -/ext/standard/tests/strings/chop_variation3.phpt -crlf -/ext/standard/tests/strings/chunk_split_variation11.phpt -crlf -/ext/standard/tests/strings/chunk_split_variation12.phpt -crlf -/ext/standard/tests/strings/chunk_split_variation4.phpt -crlf -/ext/standard/tests/strings/crc32_variation2.phpt -crlf -/ext/standard/tests/strings/crc32_variation3.phpt -crlf -/ext/standard/tests/strings/crc32_variation4.phpt -crlf +/ext/bz2/tests/with_strings.phpt -crlf +/ext/dom/tests/bug40836.phpt -crlf +/ext/dom/tests/domelement.phpt -crlf +/ext/ereg/tests/eregi_basic_002.phpt -crlf +/ext/iconv/tests/iconv004.phpt -crlf +/ext/iconv/tests/iconv_basic.phpt -crlf +/ext/iconv/tests/iconv_strpos.phpt -crlf +/ext/iconv/tests/iconv_strpos_variation2.phpt -crlf +/ext/mbstring/tests/mb_strtoupper_error2.phpt -crlf +/ext/phar/tests/delete_in_phar_confirm.phpt -crlf +/ext/phar/tests/frontcontroller12.phpt -crlf +/ext/phar/tests/security.phpt -crlf +/ext/phar/tests/test_signaturealgos.phpt -crlf +/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt -crlf +/ext/reflection/tests/ReflectionProperty_getModifiers_basic.phpt -crlf +/ext/spl/tests/dllist_007.phpt -crlf +/ext/spl/tests/iterator_012.phpt -crlf +/ext/spl/tests/SplArray_fromArray.phpt -crlf +/ext/standard/tests/dir/scandir_variation3.phpt -crlf +/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt -crlf +/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt -crlf +/ext/standard/tests/strings/bug26817.phpt -crlf +/ext/standard/tests/strings/bug26973.phpt -crlf +/ext/standard/tests/strings/bug27457.phpt -crlf +/ext/standard/tests/strings/bug28386.phpt -crlf +/ext/standard/tests/strings/bug37262.phpt -crlf +/ext/standard/tests/strings/bug40637.phpt -crlf +/ext/standard/tests/strings/bug40915.phpt -crlf +/ext/standard/tests/strings/bug61374.phpt -crlf +/ext/standard/tests/strings/chop_error.phpt -crlf +/ext/standard/tests/strings/chop_variation2.phpt -crlf +/ext/standard/tests/strings/chunk_split_variation10.phpt -crlf +/ext/standard/tests/strings/chunk_split_variation8.phpt -crlf +/ext/standard/tests/strings/count_chars_variation2.phpt -crlf +/ext/standard/tests/strings/dirname_error.phpt -crlf +/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt -crlf /ext/standard/tests/strings/highlight_file.phpt -crlf -/ext/standard/tests/strings/htmlentities_html4.phpt -crlf -/ext/standard/tests/strings/lcfirst.phpt -crlf -/ext/standard/tests/strings/ltrim.phpt -crlf -/ext/standard/tests/strings/nl2br_variation2.phpt -crlf -/ext/standard/tests/strings/php_strip_whitespace.phpt -crlf +/ext/standard/tests/strings/htmlentities03.phpt -crlf +/ext/standard/tests/strings/htmlentities04.phpt -crlf +/ext/standard/tests/strings/htmlentities08.phpt -crlf +/ext/standard/tests/strings/htmlentities15.phpt -crlf +/ext/standard/tests/strings/http_build_query.phpt -crlf +/ext/standard/tests/strings/metaphone.phpt -crlf +/ext/standard/tests/strings/ord_error.phpt -crlf +/ext/standard/tests/strings/printf_basic2.phpt -crlf +/ext/standard/tests/strings/printf_variation2.phpt -crlf +/ext/standard/tests/strings/quoted_printable_decode_basic.phpt -crlf /ext/standard/tests/strings/rtrim.phpt -crlf -/ext/standard/tests/strings/sprintf_f_2.phpt -crlf -/ext/standard/tests/strings/sprintf_variation15.phpt -crlf -/ext/standard/tests/strings/strcspn_variation6.phpt -crlf -/ext/standard/tests/strings/strcspn_variation7.phpt -crlf -/ext/standard/tests/strings/strcspn_variation8.phpt -crlf -/ext/standard/tests/strings/stripos_variation1.phpt -crlf -/ext/standard/tests/strings/stripos_variation3.phpt -crlf -/ext/standard/tests/strings/stripos_variation4.phpt -crlf -/ext/standard/tests/strings/stripos_variation5.phpt -crlf -/ext/standard/tests/strings/stripos_variation6.phpt -crlf +/ext/standard/tests/strings/setlocale_variation1.phpt -crlf +/ext/standard/tests/strings/sha1_basic.phpt -crlf +/ext/standard/tests/strings/similar_text_basic.phpt -crlf +/ext/standard/tests/strings/soundex.phpt -crlf +/ext/standard/tests/strings/sprintf_basic1.phpt -crlf +/ext/standard/tests/strings/sprintf_basic4.phpt -crlf +/ext/standard/tests/strings/sprintf_basic7.phpt -crlf +/ext/standard/tests/strings/sprintf_variation12.phpt -crlf +/ext/standard/tests/strings/sprintf_variation28.phpt -crlf +/ext/standard/tests/strings/sprintf_variation29.phpt -crlf +/ext/standard/tests/strings/sprintf_variation30.phpt -crlf +/ext/standard/tests/strings/sprintf_variation31.phpt -crlf +/ext/standard/tests/strings/sprintf_variation38.phpt -crlf +/ext/standard/tests/strings/sprintf_variation42.phpt -crlf +/ext/standard/tests/strings/sprintf_variation6.phpt -crlf +/ext/standard/tests/strings/sscanf_basic2.phpt -crlf +/ext/standard/tests/strings/sscanf_basic3.phpt -crlf +/ext/standard/tests/strings/str_getcsv_001.phpt -crlf +/ext/standard/tests/strings/stripcslashes_basic.phpt -crlf +/ext/standard/tests/strings/stripos_variation11.phpt -crlf +/ext/standard/tests/strings/stripos_variation13.phpt -crlf +/ext/standard/tests/strings/stripslashes_variation1.phpt -crlf /ext/standard/tests/strings/stripslashes_variation2.phpt -crlf -/ext/standard/tests/strings/stripslashes_variation3.phpt -crlf -/ext/standard/tests/strings/stripslashes_variation4.phpt -crlf -/ext/standard/tests/strings/stripslashes_variation5.phpt -crlf -/ext/standard/tests/strings/str_ireplace.phpt -crlf -/ext/standard/tests/strings/strnatcmp_basic.phpt -crlf -/ext/standard/tests/strings/strncasecmp_variation9.phpt -crlf -/ext/standard/tests/strings/strpos.phpt -crlf -/ext/standard/tests/strings/strrchr_variation1.phpt -crlf -/ext/standard/tests/strings/strrchr_variation2.phpt -crlf -/ext/standard/tests/strings/strrchr_variation3.phpt -crlf -/ext/standard/tests/strings/strrchr_variation4.phpt -crlf -/ext/standard/tests/strings/strrchr_variation6.phpt -crlf -/ext/standard/tests/strings/strrchr_variation7.phpt -crlf -/ext/standard/tests/strings/str_replace.phpt -crlf -/ext/standard/tests/strings/strrev_variation3.phpt -crlf -/ext/standard/tests/strings/strrev_variation4.phpt -crlf -/ext/standard/tests/strings/strripos_variation1.phpt -crlf -/ext/standard/tests/strings/strripos_variation2.phpt -crlf -/ext/standard/tests/strings/strripos_variation3.phpt -crlf -/ext/standard/tests/strings/strripos_variation4.phpt -crlf -/ext/standard/tests/strings/strripos_variation5.phpt -crlf -/ext/standard/tests/strings/strrpos_variation1.phpt -crlf -/ext/standard/tests/strings/strrpos_variation2.phpt -crlf -/ext/standard/tests/strings/strrpos_variation3.phpt -crlf +/ext/standard/tests/strings/stristr_error.phpt -crlf +/ext/standard/tests/strings/strnatcasecmp_basic.phpt -crlf +/ext/standard/tests/strings/strncasecmp_variation6.phpt -crlf +/ext/standard/tests/strings/strncasecmp_variation7.phpt -crlf +/ext/standard/tests/strings/strncasecmp_variation8.phpt -crlf +/ext/standard/tests/strings/strrchr_error.phpt -crlf +/ext/standard/tests/strings/strrchr.phpt -crlf +/ext/standard/tests/strings/strrchr_variation11.phpt -crlf +/ext/standard/tests/strings/strrpos_error.phpt -crlf /ext/standard/tests/strings/strrpos_variation4.phpt -crlf -/ext/standard/tests/strings/strrpos_variation5.phpt -crlf -/ext/standard/tests/strings/strrpos_variation6.phpt -crlf -/ext/standard/tests/strings/strspn_variation5.phpt -crlf -/ext/standard/tests/strings/strspn_variation6.phpt -crlf -/ext/standard/tests/strings/strspn_variation7.phpt -crlf -/ext/standard/tests/strings/strspn_variation8.phpt -crlf -/ext/standard/tests/strings/strstr.phpt -crlf -/ext/standard/tests/strings/strtok_variation1.phpt -crlf -/ext/standard/tests/strings/strtok_variation3.phpt -crlf -/ext/standard/tests/strings/strtr_variation1.phpt -crlf -/ext/standard/tests/strings/strtr_variation2.phpt -crlf -/ext/standard/tests/strings/str_word_count.phpt -crlf -/ext/standard/tests/strings/trim1.phpt -crlf -/ext/standard/tests/strings/ucfirst.phpt -crlf -/ext/standard/tests/strings/vfprintf_variation10.phpt -crlf +/ext/standard/tests/strings/strrpos_variation8.phpt -crlf +/ext/standard/tests/strings/strstr2.phpt -crlf +/ext/standard/tests/strings/strtok_error.phpt -crlf +/ext/standard/tests/strings/strtok_variation2.phpt -crlf +/ext/standard/tests/strings/strtolower-win32.phpt -crlf +/ext/standard/tests/strings/substr_compare.phpt -crlf +/ext/standard/tests/strings/ucwords_variation1.phpt -crlf +/ext/standard/tests/strings/unpack.phpt -crlf +/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt -crlf +/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt -crlf +/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt -crlf /ext/standard/tests/strings/vfprintf_variation12.phpt -crlf -/ext/standard/tests/strings/vfprintf_variation16.phpt -crlf -/ext/standard/tests/strings/vfprintf_variation18.phpt -crlf -/ext/standard/tests/strings/vfprintf_variation4.phpt -crlf -/ext/standard/tests/strings/vfprintf_variation6.phpt -crlf +/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt -crlf /ext/standard/tests/strings/vfprintf_variation7.phpt -crlf -/ext/standard/tests/strings/vfprintf_variation8.phpt -crlf +/ext/standard/tests/strings/vprintf_basic2.phpt -crlf +/ext/standard/tests/strings/vprintf_basic7_64bit.phpt -crlf /ext/standard/tests/strings/vprintf_variation10.phpt -crlf -/ext/standard/tests/strings/vprintf_variation12.phpt -crlf -/ext/standard/tests/strings/vprintf_variation14.phpt -crlf -/ext/standard/tests/strings/vprintf_variation18.phpt -crlf +/ext/standard/tests/strings/vprintf_variation14_64bit.phpt -crlf +/ext/standard/tests/strings/vprintf_variation17.phpt -crlf /ext/standard/tests/strings/vprintf_variation4.phpt -crlf -/ext/standard/tests/strings/vprintf_variation6.phpt -crlf -/ext/standard/tests/strings/vprintf_variation7.phpt -crlf -/ext/standard/tests/strings/vprintf_variation8.phpt -crlf -/ext/standard/tests/strings/vsprintf_variation10.phpt -crlf -/ext/standard/tests/strings/vsprintf_variation12.phpt -crlf -/ext/standard/tests/strings/vsprintf_variation14.phpt -crlf -/ext/standard/tests/strings/vsprintf_variation16.phpt -crlf -/ext/standard/tests/strings/vsprintf_variation4.phpt -crlf -/ext/standard/tests/strings/vsprintf_variation6.phpt -crlf +/ext/standard/tests/strings/vsprintf_basic4.phpt -crlf +/ext/standard/tests/strings/vsprintf_basic8.phpt -crlf +/ext/standard/tests/strings/vsprintf_variation12_64bit.phpt -crlf +/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt -crlf +/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt -crlf +/ext/standard/tests/strings/vsprintf_variation17.phpt -crlf +/ext/standard/tests/strings/vsprintf_variation4_64bit.phpt -crlf /ext/standard/tests/strings/vsprintf_variation7.phpt -crlf -/ext/standard/tests/strings/vsprintf_variation8.phpt -crlf /ext/standard/tests/strings/wordwrap.phpt -crlf -/ext/tidy/tests/010.phpt -crlf -/ext/tidy/tests/012.phpt -crlf -/ext/tidy/tests/025.phpt -crlf -/ext/tidy/tests/030.phpt -crlf +/ext/standard/tests/strings/wordwrap_variation5.phpt -crlf +/ext/standard/tests/url/rawurldecode_variation_001.phpt -crlf +/ext/tidy/tests/009.phpt -crlf +/ext/tidy/tests/013.phpt -crlf +/ext/tidy/tests/021.phpt -crlf +/ext/tidy/tests/tidy_error.phpt -crlf +/ext/tokenizer/tests/002.phpt -crlf /ext/tokenizer/tests/bug26463.phpt -crlf +/ext/tokenizer/tests/token_get_all_error.phpt -crlf +/ext/tokenizer/tests/token_get_all_variation11.phpt -crlf /ext/tokenizer/tests/token_get_all_variation12.phpt -crlf /ext/tokenizer/tests/token_get_all_variation13.phpt -crlf /ext/tokenizer/tests/token_get_all_variation14.phpt -crlf /ext/tokenizer/tests/token_get_all_variation15.phpt -crlf -/ext/tokenizer/tests/token_get_all_variation16.phpt -crlf -/ext/tokenizer/tests/token_get_all_variation17.phpt -crlf /ext/tokenizer/tests/token_get_all_variation18.phpt -crlf /ext/tokenizer/tests/token_get_all_variation19.phpt -crlf -/ext/tokenizer/tests/token_get_all_variation4.phpt -crlf +/ext/tokenizer/tests/token_get_all_variation1.phpt -crlf +/ext/tokenizer/tests/token_get_all_variation2.phpt -crlf +/ext/tokenizer/tests/token_get_all_variation3.phpt -crlf /ext/tokenizer/tests/token_get_all_variation5.phpt -crlf -/ext/tokenizer/tests/token_get_all_variation6.phpt -crlf -/ext/tokenizer/tests/token_get_all_variation7.phpt -crlf /ext/tokenizer/tests/token_get_all_variation8.phpt -crlf -/ext/tokenizer/tests/token_get_all_variation9.phpt -crlf -/ext/xml/tests/bug26614_libxml.phpt -crlf -/ext/xmlwriter/tests/004.phpt -crlf -/ext/xmlwriter/tests/OO_004.phpt -crlf -/ext/zlib/tests/005.phpt -crlf -/ext/zlib/tests/gzfile_basic2.phpt -crlf -/ext/zlib/tests/gzfile_basic.phpt -crlf -/ext/zlib/tests/gzfilegzreadfile.phpt -crlf -/ext/zlib/tests/readgzfile_basic2.phpt -crlf -/ext/zlib/tests/readgzfile_basic.phpt -crlf -/sapi/cli/tests/014.phpt -crlf -/tests/run-test/test010.phpt -crlf -/Zend/tests/bug35655.phpt -crlf -/Zend/tests/bug48930.phpt -crlf -/Zend/tests/bug61095.phpt -crlf -/Zend/tests/heredoc_017.phpt -crlf -/Zend/tests/heredoc_018.phpt -crlf -/Zend/tests/nowdoc_013.phpt -crlf -/Zend/tests/nowdoc_014.phpt -crlf -/Zend/tests/nowdoc_015.phpt -crlf +/ext/xml/tests/bug32001b.phpt -crlf +/ext/xmlwriter/tests/OO_003.phpt -crlf +/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt -crlf +/ext/zlib/tests/008.phpt -crlf +/ext/zlib/tests/gzopen_variation4.phpt -crlf +/ext/zlib/tests/gzrewind_error.phpt -crlf +/ext/zlib/tests/readgzfile_variation7.phpt -crlf +/ext/zlib/tests/readgzfile_variation8.phpt -crlf +/ext/zlib/tests/zlib_scheme_stat_basic.phpt -crlf +/sapi/cli/tests/006.phpt -crlf +/tests/run-test/test009.phpt -crlf +/Zend/tests/012.phpt -crlf +/Zend/tests/bug28072.phpt -crlf +/Zend/tests/bug38624.phpt -crlf +/Zend/tests/bug40784.phpt -crlf +/Zend/tests/bug43053.phpt -crlf +/Zend/tests/bug51176.phpt -crlf +/Zend/tests/each_003.phpt -crlf +/Zend/tests/errmsg_006.phpt -crlf diff --git a/EXTENSIONS b/EXTENSIONS index 2fa80523f7970..5308582023520 100644 --- a/EXTENSIONS +++ b/EXTENSIONS @@ -497,8 +497,8 @@ STATUS: Working SINCE: 4.0.3 ------------------------------------------------------------------------------- EXTENSION: snmp -PRIMARY MAINTAINER: Rasmus Lerdorf , Pierre-Alain Joye -MAINTENANCE: Odd Fixes +PRIMARY MAINTAINER: Boris Lytochkin , Rasmus Lerdorf , Pierre-Alain Joye +MAINTENANCE: Maintained STATUS: Working ------------------------------------------------------------------------------- EXTENSION: sockets diff --git a/Makefile.global b/Makefile.global index 8dad0e4bf1411..b30c318fc4d94 100644 --- a/Makefile.global +++ b/Makefile.global @@ -13,6 +13,8 @@ all: $(all_targets) build-modules: $(PHP_MODULES) $(PHP_ZEND_EX) +build-binaries: $(PHP_BINARIES) + libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 @@ -35,6 +37,8 @@ install-sapi: $(OVERALL_TARGET) fi @$(INSTALL_IT) +install-binaries: build-binaries $(install_binary_targets) + install-modules: build-modules @test -d modules && \ $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) @@ -79,7 +83,7 @@ PHP_TEST_SHARED_EXTENSIONS = ` \ . $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \ done; \ fi` -PHP_DEPRECATED_DIRECTIVES_REGEX = '^(define_syslog_variables|register_(globals|long_arrays)?|safe_mode|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*=' +PHP_DEPRECATED_DIRECTIVES_REGEX = '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*=' test: all -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ diff --git a/NEWS b/NEWS index 80d56bc7f86d3..f511250205466 100644 --- a/NEWS +++ b/NEWS @@ -1,60 +1,59 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2012, PHP 5.3.15 -- Zend Engine: - . Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that - includes a semi-colon). (Pierrick) - -- COM: - . Fixed bug #62146 com_dotnet cannot be built shared. (Johannes) +?? ??? 2012, PHP 5.4.5 - Core: - . Fixed CVE-2012-2143. (Solar Designer) - . Fixed potential overflow in _php_stream_scandir. (Jason Powell, - Stas) - . Fixed bug #62432 (ReflectionMethod random corrupt memory on high - concurrent). (Johannes) . Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt). (Anthony Ferrara) + . Fixed bug #62357 (compile failure: (S) Arguments missing for built-in + function __memcmp). (Laruence) + . Fixed bug #61998 (Using traits with method aliases appears to result in + crash during execution). (Dmitry) + . Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that + includes a semi-colon). (Pierrick) + . Fixed potential overflow in _php_stream_scandir (CVE-2012-2688). + (Jason Powell, Stas) -- Fileinfo: - . Fixed magic file regex support. (Felipe) +- EXIF: + . Fixed information leak in ext exif (discovered by Martin Noga, + Matthew "j00ru" Jurczyk, Gynvael Coldwind) - FPM: - . Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat) + . Fixed bug #62205 (php-fpm segfaults (null passed to strstr)). (fat) + . Fixed bug #62160 (Add process.priority to set nice(2) priorities). (fat) + . Fixed bug #62153 (when using unix sockets, multiples FPM instances + . Fixed bug #62033 (php-fpm exits with status 0 on some failures to start). + (fat) + . Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm). (fat) . Fixed bug #61835 (php-fpm is not allowed to run as root). (fat) . Fixed bug #61295 (php-fpm should not fail with commented 'user' + . Fixed bug #61218 (FPM drops connection while receiving some binary values + in FastCGI requests). (fat) + . Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat) for non-root start). (fat) . Fixed bug #61026 (FPM pools can listen on the same address). (fat) - . Fixed bug #62033 (php-fpm exits with status 0 on some failures to start). - (fat) - . Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors). (fat) - . Fixed bug #62160 (Add process.priority to set nice(2) priorities). (fat) - . Fixed bug #61218 (FPM drops connection while receiving some binary values - in FastCGI requests). (fat) - . Fixed bug #62205 (php-fpm segfaults (null passed to strstr)). (fat) + +- Iconv: + . Fix bug #55042 (Erealloc in iconv.c unsafe). (Stas) - Intl: . Fixed bug #62083 (grapheme_extract() memory leaks). (Gustavo) - . Fixed bug #62082 (memory corruption in internal get_icu_disp_value_src_php - function). (Gustavo) + . ResourceBundle constructor now accepts NULL for the first two arguments. + (Gustavo) . Fixed bug #62081 (IntlDateFormatter constructor leaks memory when called twice). (Gustavo) . Fixed bug #62070 (Collator::getSortKey() returns garbage). (Gustavo) . Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks pattern). (Gustavo) - . Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo) -- JSON: - . Improved error handling. (Nikita Popov) - -- PDO: - . Fixed bug #61755 (A parsing bug in the prepared statements can lead to - access violations). (Johannes) +- libxml: + . Fixed bug #62266 (Custom extension segfaults during xmlParseFile with FPM + SAPI). (Gustavo) -- Phar: - . Fixed bug #62227 (Invalid phar stream path causes crash). (Felipe) +- Readline: + . Fixed bug #62186 (readline fails to compile - void function should not + return a value). (Johannes) - Reflection: . Fixed bug #62384 (Attempting to invoke a Closure more than once causes @@ -62,19 +61,27 @@ PHP NEWS . Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant). (Laruence) -- SPL: - . Fixed bug #62262 (RecursiveArrayIterator does not implement Countable). - (Nikita Popov) - +- Sockets: + . Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe) + - XML Writer: . Fixed bug #62064 (memory leak in the XML Writer module). (jean-pierre dot lozi at lip6 dot fr) + - Zip: . Upgraded libzip to 0.10.1 (Anatoliy) -14 Jun 2012, PHP 5.3.14 +14 Jun 2012, PHP 5.4.4 -- CLI SAPI: +- COM: + . Fixed bug #62146 com_dotnet cannot be built shared. (Johannes) + +- CLI Server: + . Implemented FR #61977 (Need CLI web-server support for files with .htm & + svg extensions). (Sixd, Laruence) + . Improved performance while sending error page, this also fixed + bug #61785 (Memory leak when access a non-exists file without router). + (Laruence) . Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi). (Laruence, reeze.xia@gmail.com) @@ -82,54 +89,644 @@ PHP NEWS . Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction). (Laruence) -- COM: - . Fixed bug #62146 com_dotnet cannot be built shared. (Johannes) - - Core: + . Fixed missing bound check in iptcparse(). (chris at chiappa.net) . Fixed CVE-2012-2143. (Solar Designer) + . Fixed bug #62097 (fix for for bug #54547). (Gustavo) . Fixed bug #62005 (unexpected behavior when incrementally assigning to a member of a null object). (Laruence) + . Fixed bug #61978 (Object recursion not detected for classes that implement + JsonSerializable). (Felipe) + . Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy) + . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config). + (Laruence) + . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy) + . Fixed bug #61782 (__clone/__destruct do not match other methods when checking + access controls). (Stas) + . Fixed bug #61761 ('Overriding' a private static method with a different + signature causes crash). (Laruence) . Fixed bug #61730 (Segfault from array_walk modifying an array passed by reference). (Laruence) - . Fixed missing bound check in iptcparse(). (chris at chiappa.net) - . Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo) + . Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown + phase). (Laruence) + . Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov) + . Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables + (without apache2)). (Laruence) + . Fixed bug #61605 (header_remove() does not remove all headers). (Laruence) + . Fixed bug #54547 (wrong equality of string numbers). (Gustavo) . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename set to null). (Anatoliy) - . Fixed bug #61713 (Logic error in charset detection for htmlentities). - (Anatoliy) - . Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy) . Changed php://fd to be available only for CLI. - . Fixed bug #62373 (serialize() generates wrong reference to the object). - (Moriyoshi) -- Fileinfo: +- PDO: + . Fixed bug #61755 (A parsing bug in the prepared statements can lead to + access violations). (Johannes) + +- Phar: + . Fix bug #61065 (Secunia SA44335, CVE-2012-2386). (Rasmus) + +- Pgsql: + . Added pg_escape_identifier/pg_escape_literal. (Yasuo Ohgaki) + +- Fileinfo . Fixed bug #61812 (Uninitialised value used in libmagic). (Laruence, Gustavo) + . Fixed bug #61566 failure caused by the posix lseek and read versions + under windows in cdf_read(). (Anatoliy) + . Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a + directory descriptor under windows. (Anatoliy) -- Iconv extension: - . Fixed a bug that iconv extension fails to link to the correct library - when another extension makes use of a library that links to the iconv - library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail. - (Moriyoshi) +- Intl + . Fixed bug #62082 (Memory corruption in internal function + get_icu_disp_value_src_php()). (Gustavo) + +- Libxml: + . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)). + (Laruence) + +- Zlib: + . Fixed bug #61820 (using ob_gzhandler will complain about headers already + sent when no compression). (Mike) + . Fixed bug #61443 (can't change zlib.output_compression on the fly). (Mike) + . Fixed bug #60761 (zlib.output_compression fails on refresh). (Mike) + +08 May 2012, PHP 5.4.3 + +- CGI + . Re-Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. + (Stas) + . Fix bug #61807 - Buffer Overflow in apache_request_headers. + (nyt-php at countercultured dot net). + +03 May 2012, PHP 5.4.2 + +- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus) + +26 Apr 2012, PHP 5.4.1 + +- CLI Server: + . Fixed bug #61461 (missing checks around malloc() calls). (Ilia) + . Implemented FR #60850 (Built in web server does not set + $_SERVER['SCRIPT_FILENAME'] when using router). (Laruence) + . "Connection: close" instead of "Connection: closed" (Gustavo) + +- Core: + . Fixed crash in ZTS using same class in many threads. (Johannes) + . Fixed bug #61374 (html_entity_decode tries to decode code points that don't + exist in ISO-8859-1). (Gustavo) + . Fixed bug #61273 (call_user_func_array with more than 16333 arguments + leaks / crashes). (Laruence) + . Fixed bug #61225 (Incorrect lexing of 0b00*+). (Pierrick) + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) + . Fixed bug #61106 (Segfault when using header_register_callback). (Nikita + Popov) + . Fixed bug #61087 (Memory leak in parse_ini_file when specifying + invalid scanner mode). (Nikic, Laruence) + . Fixed bug #61072 (Memory leak when restoring an exception handler). + (Nikic, Laruence) + . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX). + (Laruence) + . Fixed bug #61052 (Missing error check in trait 'insteadof' clause). (Stefan) + . Fixed bug #61011 (Crash when an exception is thrown by __autoload + accessing a static property). (Laruence) + . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical + vars). (Laruence) + . Fixed bug #60978 (exit code incorrect). (Laruence) + . Fixed bug #60911 (Confusing error message when extending traits). (Stefan) + . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam) + . Fixed bug #60717 (Order of traits in use statement can cause a fatal + error). (Stefan) + . Fixed bug #60573 (type hinting with "self" keyword causes weird errors). + (Laruence) + . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia) + . Fixed bug #52719 (array_walk_recursive crashes if third param of the + function is by reference). (Nikita Popov) + . Improve performance of set_exception_handler while doing reset (Laruence) + +- fileinfo: + . Fix fileinfo test problems. (Anatoliy Belsky) + +- FPM + . Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c). + (michaelhood at gmail dot com, Ilia) + +- Ibase + . Fixed bug #60947 (Segmentation fault while executing ibase_db_info). + (Ilia) + +- Installation + . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones) - Intl: - . Fixed bug #62082 (Memory corruption in internal function - get_icu_disp_value_src_php()). (Gustavo) + . Fixed bug #61487 (Incorrent bounds checking in grapheme_strpos). + (Stas) -- JSON - . Fixed bug #61537 (json_encode() incorrectly truncates/discards - information). (Adam) +- mbstring: + . MFH mb_ereg_replace_callback() for security enhancements. (Rui) -- PDO: - . Fixed bug #61755 (A parsing bug in the prepared statements can lead to - access violations). (Johannes) +- mysqli + . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes). -- Phar: - . Fix bug #61065 (Secunia SA44335). (Rasmus) +- mysqlnd + . Fixed bug #61704 (Crash apache, phpinfo() threading issue). (Johannes) + . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled). + (Johannes) -- Streams: - . Fixed bug #61961 (file_get_contents leaks when access empty file with - maxlen set). (Reeze) +- Readline: + . Fixed bug #61088 (Memory leak in readline_callback_handler_install). + (Nikic, Laruence) + +- Session + . Fixed bug #60634 (Segmentation fault when trying to die() in + SessionHandler::write()). (Ilia) + +- SOAP + . Fixed bug #61423 (gzip compression fails). (Ilia) + . Fixed bug #60887 (SoapClient ignores user_agent option and sends no + User-Agent header). (carloschilazo at gmail dot com) + . Fixed bug #60842, #51775 (Chunked response parsing error when + chunksize length line is > 10 bytes). (Ilia) + . Fixed bug #49853 (Soap Client stream context header option ignored). + (Dmitry) + +- PDO + . Fixed bug #61292 (Segfault while calling a method on an overloaded PDO + object). (Laruence) + +- PDO_mysql + . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't + always work). (Johannes) + . Fixed bug #61194 (PDO should export compression flag with myslqnd). + (Johannes) + +- PDO_odbc + . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia) + +- Phar + . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL + bytes). (Nikita Popov) + +- Reflection: + . Implemented FR #61602 (Allow access to the name of constant + used as function/method parameter's default value). (reeze.xia@gmail.com) + . Fixed bug #60968 (Late static binding doesn't work with + ReflectionMethod::invokeArgs()). (Laruence) + +- SPL: + . Fixed bug #61453 (SplObjectStorage does not identify objects correctly). + (Gustavo) + . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) + +- Standard: + . Fixed memory leak in substr_replace. (Pierrick) + . Make max_file_uploads ini directive settable outside of php.ini (Rasmus) + . Fixed bug #61409 (Bad formatting on phpinfo()). (Jakub Vrana) + . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia) + . Fixed bug #60106 (stream_socket_server silently truncates long unix socket + paths). (Ilia) + +- XMLRPC: + . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary + variable). (Nikita Popov) + . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikita + Popov) + +- Zlib: + . Fixed bug #61306 (initialization of global inappropriate for ZTS). (Gustavo) + . Fixed bug #61287 (A particular string fails to decompress). (Mike) + . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikita Popov) + +01 Mar 2012, PHP 5.4.0 + +- Installation: + . autoconf 2.59+ is now supported (and required) for generating the + configure script with ./buildconf. Autoconf 2.60+ is desirable + otherwise the configure help order may be incorrect. (Rasmus, Chris Jones) + +- Removed legacy features: + . break/continue $var syntax. (Dmitry) + . Safe mode and all related php.ini options. (Kalle) + . register_globals and register_long_arrays php.ini options. (Kalle) + . import_request_variables(). (Kalle) + . allow_call_time_pass_reference. (Pierrick) + . define_syslog_variables php.ini option and its associated function. (Kalle) + . highlight.bg php.ini option. (Kalle) + . safe_mode, safe_mode_gid, safe_mode_include_dir, + safe_mode_exec_dir, safe_mode_allowed_env_vars and + safe_mode_protected_env_vars php.ini options. + . zend.ze1_compatibility_mode php.ini option. + . Session bug compatibility mode (session.bug_compat_42 and + session.bug_compat_warn php.ini options). (Kalle) + . session_is_registered(), session_register() and session_unregister() + functions. (Kalle) + . y2k_compliance php.ini option. (Kalle) + . magic_quotes_gpc, magic_quotes_runtime and magic_quotes_sybase + php.ini options. get_magic_quotes_gpc, get_magic_quotes_runtime are kept + but always return false, set_magic_quotes_runtime raises an + E_CORE_ERROR. (Pierrick, Pierre) + . Removed support for putenv("TZ=..") for setting the timezone. (Derick) + . Removed the timezone guessing algorithm in case the timezone isn't set with + date.timezone or date_default_timezone_set(). Instead of a guessed + timezone, "UTC" is now used instead. (Derick) + +- Moved extensions to PECL: + . ext/sqlite. (Note: the ext/sqlite3 and ext/pdo_sqlite extensions are + not affected) (Johannes) + +- General improvements: + . Added short array syntax support ([1,2,3]), see UPGRADING guide for full + details. (rsky0711 at gmail . com, sebastian.deutsch at 9elements . com, + Pierre) + . Added binary number format (0b001010). (Jonah dot Harris at gmail dot com) + . Added support for Class::{expr}() syntax (Pierrick) + . Added multibyte support by default. Previously PHP had to be compiled + with --enable-zend-multibyte. Now it can be enabled or disabled through + the zend.multibyte directive in php.ini. (Dmitry) + . Removed compile time dependency from ext/mbstring (Dmitry) + . Added support for Traits. (Stefan, with fixes by Dmitry and Laruence) + . Added closure $this support back. (Stas) + . Added array dereferencing support. (Felipe) + . Added callable typehint. (Hannes) + . Added indirect method call through array. FR #47160. (Felipe) + . Added DTrace support. (David Soria Parra) + . Added class member access on instantiation (e.g. (new foo)->bar()) support. + (Felipe) + . ). (Etienne) + . Fixed bug #60965 (Buffer overflow on htmlspecialchars/entities with + $double=false). (Gustavo) + . Fixed bug #60895 (Possible invalid handler usage in windows random + functions). (Pierre) + . Fixed bug #60879 (unserialize() Does not invoke __wakeup() on object). + (Pierre, Steve) + . Fixed bug #60825 (Segfault when running symfony 2 tests). + (Dmitry, Laruence) + . Fixed bug #60627 (httpd.worker segfault on startup with php_value). + . Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax). (Dmitry) + . Fixed bug #60611 (Segmentation fault with Cls::{expr}() syntax). (Laruence) + (Laruence) + . Fixed bug #60558 (Invalid read and writes). (Laruence) + . Fixed bug #60444 (Segmentation fault with include & class extending). + (Laruence, Dmitry). + . Fixed bug #60362 (non-existent sub-sub keys should not have values). + (Laruence, alan_k, Stas) + . Fixed bug #60350 (No string escape code for ESC (ascii 27), normally \e). + (php at mickweiss dot com) + . Fixed bug #60321 (ob_get_status(true) no longer returns an array when + buffer is empty). (Pierrick) + . Fixed bug #60282 (Segfault when using ob_gzhandler() with open buffers). + (Laruence) + . Fixed bug #60240 (invalid read/writes when unserializing specially crafted + strings). (Mike) + . Fixed bug #60227 (header() cannot detect the multi-line header with + CR(0x0D)). (rui) + . Fixed bug #60174 (Notice when array in method prototype error). + (Laruence) + . Fixed bug #60169 (Conjunction of ternary and list crashes PHP). + (Laruence) + . Fixed bug #60038 (SIGALRM cause segfault in php_error_cb). (Laruence) + (klightspeed at netspace dot net dot au) + . Fixed bug #55871 (Interruption in substr_replace()). (Stas) + . Fixed bug #55801 (Behavior of unserialize has changed). (Mike) + . Fixed bug #55758 (Digest Authenticate missed in 5.4) . (Laruence) + . Fixed bug #55748 (multiple NULL Pointer Dereference with zend_strndup()) + (CVE-2011-4153). (Stas) + . Fixed bug #55124 (recursive mkdir fails with current (dot) directory in path). + (Pierre) + . Fixed bug #55084 (Function registered by header_register_callback is + called only once per process). (Hannes) + . Implement FR #54514 (Get php binary path during script execution). + (Laruence) + . Fixed bug #52211 (iconv() returns part of string on error). (Felipe) + . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) + +- Improved generic SAPI support: + . Added $_SERVER['REQUEST_TIME_FLOAT'] to include microsecond precision. + (Patrick) + . Added header_register_callback() which is invoked immediately + prior to the sending of headers and after default headers have + been added. (Scott) + . Added http_response_code() function. FR #52555. (Paul Dragoonis, Kalle) + . Fixed bug #55500 (Corrupted $_FILES indices lead to security concern). + (CVE-2012-1172). (Stas) + . Fixed bug #54374 (Insufficient validating of upload name leading to + corrupted $_FILES indices). (CVE-2012-1172). (Stas, lekensteyn at gmail dot com) + +- Improved CLI SAPI: + . Added built-in web server that is intended for testing purpose. + (Moriyoshi, Laruence, and fixes by Pierre, Derick, Arpad, + chobieee at gmail dot com) + . Added command line option --rz which shows information of the + named Zend extension. (Johannes) + . Interactive readline shell improvements: (Johannes) + . Added "cli.pager" php.ini setting to set a pager for output. + . Added "cli.prompt" php.ini setting to configure the shell prompt. + . Added shortcut #inisetting=value to change php.ini settings at run-time. + . Changed shell not to terminate on fatal errors. + . Interactive shell works with shared readline extension. FR #53878. + +- Improved CGI/FastCGI SAPI: (Dmitry) + . Added apache compatible functions: apache_child_terminate(), + getallheaders(), apache_request_headers() and apache_response_headers() + . Improved performance of FastCGI request parsing. + . Fixed reinitialization of SAPI callbacks after php_module_startup(). + (Dmitry) + +- Improved PHP-FPM SAPI: + . Removed EXPERIMENTAL flag. (fat) + . Fixed bug #60659 (FPM does not clear auth_user on request accept). + (bonbons at linux-vserver dot org) + +- Improved Litespeed SAPI: + . Fixed bug #55769 (Make Fails with "Missing Separator" error). (Adam) + +- Improved Date extension: + . Added the + modifier to parseFromFormat to allow trailing text in the + string to parse without throwing an error. (Stas, Derick) + +- Improved DBA extension: + . Added Tokyo Cabinet abstract DB support. (Michael Maclean) + . Added Berkeley DB 5 support. (Johannes, Chris Jones) + +- Improved DOM extension: + . Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) + +- Improved filesystem functions: + . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value. + FR #53407. (Adam) + +- Improved HASH extension: + . Added Jenkins's one-at-a-time hash support. (Martin Jansen) + . Added FNV-1 hash support. (Michael Maclean) + . Made Adler32 algorithm faster. FR #53213. (zavasek at yandex dot ru) + . Removed Salsa10/Salsa20, which are actually stream ciphers (Mike) + . Fixed bug #60221 (Tiger hash output byte order) (Mike) + +- Improved intl extension: + . Added Spoofchecker class, allows checking for visibly confusable characters and + other security issues. (Scott) + . Added Transliterator class, allowing transliteration of strings. + (Gustavo) + . Added support for UTS #46. (Gustavo) + . Fixed build on Fedora 15 / Ubuntu 11. (Hannes) + . Fixed bug #55562 (grapheme_substr() returns false on big length). (Stas) + +- Improved JSON extension: + . Added new json_encode() option JSON_UNESCAPED_UNICODE. FR #53946. + (Alexander, Gwynne) + . Added JsonSerializable interface. (Sara) + . Added JSON_BIGINT_AS_STRING, extended json_decode() sig with $options. + (Sara) + . Added support for JSON_NUMERIC_CHECK option in json_encode() that converts + numeric strings to integers. (Ilia) + . Added new json_encode() option JSON_UNESCAPED_SLASHES. FR #49366. (Adam) + . Added new json_encode() option JSON_PRETTY_PRINT. FR #44331. (Adam) + +- Improved LDAP extension: + . Added paged results support. FR #42060. (ando@OpenLDAP.org, + iarenuno@eteo.mondragon.edu, jeanseb@au-fil-du.net, remy.saissy@gmail.com) + +- Improved mbstring extension: + . Added Shift_JIS/UTF-8 Emoji (pictograms) support. (Rui) + . Added JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004) + support. (Rui) + . Ill-formed UTF-8 check for security enhancements. (Rui) + . Added MacJapanese (Shift_JIS) and gb18030 encoding support. (Rui) + . Added encode/decode in hex format to mb_[en|de]code_numericentity(). (Rui) + . Added user JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004) + support. (Rui) + . Added the user defined area for CP936 and CP950 (Rui). + . Fixed bug #60306 (Characters lost while converting from cp936 to utf8). + (Laruence) + +- Improved MySQL extensions: + . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey) + . mysqlnd: Added named pipes support. FR #48082. (Andrey) + . MySQLi: Added iterator support in MySQLi. mysqli_result implements + Traversable. (Andrey, Johannes) + . PDO_mysql: Removed support for linking with MySQL client libraries older + than 4.1. (Johannes) + . ext/mysql, mysqli and pdo_mysql now use mysqlnd by default. (Johannes) + . Fixed bug #55473 (mysql_pconnect leaks file descriptors on reconnect). + (Andrey, Laruence) + . Fixed bug #55653 (PS crash with libmysql when binding same variable as + param and out). (Laruence) + +- Improved OpenSSL extension: + . Added AES support. FR #48632. (yonas dot y at gmail dot com, Pierre) + . Added no padding option to openssl_encrypt()/openssl_decrypt(). (Scott) + . Use php's implementation for Windows Crypto API in + openssl_random_pseudo_bytes. (Pierre) + . On error in openssl_random_pseudo_bytes() made sure we set strong result + to false. (Scott) + . Fixed possible attack in SSL sockets with SSL 3.0 / TLS 1.0. + CVE-2011-3389. (Scott) + . Fixed bug #61124 (Crash when decoding an invalid base64 encoded string). + (me at ktamura dot com, Scott) + +- Improved PDO: + . Fixed PDO objects binary incompatibility. (Dmitry) + +- PDO DBlib driver: + . Added nextRowset support. + . Fixed bug #50755 (PDO DBLIB Fails with OOM). + +- Improved PostgreSQL extension: + . Added support for "extra" parameter for PGNotify(). + (r dot i dot k at free dot fr, Ilia) + +- Improved PCRE extension: + . Changed third parameter of preg_match_all() to optional. FR #53238. (Adam) + +- Improved Readline extension: + . Fixed bug #54450 (Enable callback support when built against libedit). + (fedora at famillecollet dot com, Hannes) + +- Improved Reflection extension: + . Added ReflectionClass::newInstanceWithoutConstructor() to create a new + instance of a class without invoking its constructor. FR #55490. + (Sebastian) + . Added ReflectionExtension::isTemporary() and + ReflectionExtension::isPersistent() methods. (Johannes) + . Added ReflectionZendExtension class. (Johannes) + . Added ReflectionClass::isCloneable(). (Felipe) + +- Improved Session extension: + . Expose session status via new function, session_status (FR #52982) (Arpad) + . Added support for object-oriented session handlers. (Arpad) + . Added support for storing upload progress feedback in session data. (Arnaud) + . Changed session.entropy_file to default to /dev/urandom or /dev/arandom if + either is present at compile time. (Rasmus) + . Fixed bug #60860 (session.save_handler=user without defined function core + dumps). (Felipe) + . Implement FR #60551 (session_set_save_handler should support a core's + session handler interface). (Arpad) + . Fixed bug #60640 (invalid return values). (Arpad) + +- Improved SNMP extension (Boris Lytochkin): + . Added OO API. FR #53594 (php-snmp rewrite). + . Sanitized return values of existing functions. Now it returns FALSE on + failure. + . Allow ~infinite OIDs in GET/GETNEXT/SET queries. Autochunk them to max_oids + upon request. + . Introducing unit tests for extension with ~full coverage. + . IPv6 support. (FR #42918) + . Way of representing OID value can now be changed when SNMP_VALUE_OBJECT + is used for value output mode. Use or'ed SNMP_VALUE_LIBRARY(default if + not specified) or SNMP_VALUE_PLAIN. (FR #54502) + . Fixed bug #60749 (SNMP module should not strip non-standard SNMP port + from hostname). (Boris Lytochkin) + . Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support + is disabled). (Boris Lytochkin) + . Fixed bug #53862 (snmp_set_oid_output_format does not allow returning to default) + . Fixed bug #46065 (snmp_set_quick_print() persists between requests) + . Fixed bug #45893 (Snmp buffer limited to 2048 char) + . Fixed bug #44193 (snmp v3 noAuthNoPriv doesn't work) + +- Improved SOAP extension: + . Added new SoapClient option "keep_alive". FR #60329. (Pierrick) + . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) + +- Improved SPL extension: + . Added RegexIterator::getRegex() method. (Joshua Thijssen) + . Added SplObjectStorage::getHash() hook. (Etienne) + . Added CallbackFilterIterator and RecursiveCallbackFilterIterator. (Arnaud) + . Added missing class_uses(..) as pointed out by #55266 (Stefan) + . Immediately reject wrong usages of directories under Spl(Temp)FileObject + and friends. (Etienne, Pierre) + . FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use + the default stream context. (Hannes) + . Fixed bug #60201 (SplFileObject::setCsvControl does not expose third + argument via Reflection). (Peter) + . Fixed bug #55287 (spl_classes() not includes CallbackFilter classes) + (sasezaki at gmail dot com, salathe) + +- Improved Sysvshm extension: + . Fixed bug #55750 (memory copy issue in sysvshm extension). + (Ilia, jeffhuang9999 at gmail dot com) + +- Improved Tidy extension: + . Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference). + (Maksymilian Arciemowicz, Felipe) + +- Improved Tokenizer extension: + . Fixed bug #54089 (token_get_all with regards to __halt_compiler is + not binary safe). (Nikita Popov) + +- Improved XSL extension: + . Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to + define forbidden operations within XSLT stylesheets, default is not to + enable write operations from XSLT. Bug #54446 (Chregu, Nicolas Gregoire) + . XSL doesn't stop transformation anymore, if a PHP function can't be called + (Christian) + +- Improved ZLIB extension: + . Re-implemented non-file related functionality. (Mike) + . Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression). + (Mike) 08 May 2012, PHP 5.3.13 - CGI @@ -142,8 +739,10 @@ PHP NEWS 26 Apr 2012, PHP 5.3.11 - Core: - . Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables - (without apache2)). (Laruence) + . Fixed bug #61605 (header_remove() does not remove all headers). + (Laruence) + . Fixed bug #61541 (Segfault when using ob_* in output_callback). + (reeze.xia@gmail.com) . Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes). (Laruence) . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) @@ -190,17 +789,14 @@ PHP NEWS . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones) - Fileinfo - . Upgraded libmagic to 5.11 (Pierre, Anatoliy) - . Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a - directory descriptor under windows. (Anatoliy) - . Fixed bug #61566 failure caused by the posix lseek and read versions - under windows in cdf_read(). (Anatoliy) . Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo) - Firebird Database extension (ibase): . Fixed bug #60802 (ibase_trans() gives segfault when passing params). - Libxml: + . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)). + (Laruence) . Fixed bug #61367 (open_basedir bypass using libxml RSHUTDOWN). (Tim Starling) @@ -223,10 +819,6 @@ PHP NEWS - PDO_Sqlite extension: . Add createCollation support. (Damien) -- pgsql: - . Fixed bug #60718 (Compile problem with libpq (PostgreSQL 7.3 or less). - (Yasuo Ohgaki) - - Phar: . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikic) @@ -408,8 +1000,6 @@ PHP NEWS for small images). (Florian) - Intl: - . Fixed bug #61487 (Incorrent bounds checking in grapheme_strpos). - (Stas) . Fixed bug #60192 (SegFault when Collator not constructed properly). (Florian) . Fixed memory leak in several Intl locale functions. (Felipe) @@ -513,6 +1103,7 @@ PHP NEWS - Postgres: . Fixed bug #60244 (pg_fetch_* functions do not validate that row param is >0). (Ilia) + . Added PGSQL_LIBPQ_VERSION/PGSQL_LIBPQ_VERSION_STR constants. (Yasuo) - Reflection: . Fixed bug #60367 (Reflection and Late Static Binding). (Laruence) diff --git a/README.NEW-OUTPUT-API b/README.NEW-OUTPUT-API new file mode 100644 index 0000000000000..7d9cc1016f086 --- /dev/null +++ b/README.NEW-OUTPUT-API @@ -0,0 +1,142 @@ +$Id: README.NEW-OUTPUT-API 219039 2006-08-30 07:39:09Z mike $ + + +API adjustment to the old output control code: + + Everything now resides beneath the php_output namespace, + and there's an API call for every output handler op. + + Checking output control layers status: + // Using OG() + php_output_get_status(TSRMLS_C); + + Starting the default output handler: + // php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC); + php_output_start_default(TSRMLS_C); + + Starting an user handler by zval: + // php_start_ob_buffer(zhandler, chunk_size, erase TSRMLS_CC); + php_output_start_user(zhandler, chunk_size, flags TSRMLS_CC); + + Starting an internal handler whithout context: + // php_ob_set_internal_handler(my_php_output_handler_func_t, buffer_size, "output handler name", erase TSRMLS_CC); + php_output_start_internal(handler_name, handler_name_len, my_php_output_handler_func_t, chunk_size, flags TSRMLS_CC); + + Starting an internal handler with context: + // not possible with old API + php_output_handler *h; + h = php_output_handler_create_internal(handler_name, handler_name_len, my_php_output_handler_context_func_t, chunk_size, flags TSRMLS_CC); + php_output_handler_set_context(h, my_context, my_context_dtor); + php_output_handler_start(h TSRMLS_CC); + + Testing whether a certain output handler has already been started: + // php_ob_handler_used("output handler name" TSRMLS_CC); + php_output_handler_started(handler_name, handler_name_len TSRMLS_CC); + + Flushing one output buffer: + // php_ob_end_buffer(1, 1 TSRMLS_CC); + php_output_flush(TSRMLS_C); + + Flushing all output buffers: + // not possible with old API + php_output_flush_all(TSRMLS_C); + + Cleaning one output buffer: + // php_ob_end_buffer(0, 1 TSRMLS_CC); + php_output_clean(TSRMLS_C); + + Cleaning all output buffers: + // not possible with old API + php_output_clean_all(TSRMLS_C); + + Discarding one output buffer: + // php_ob_end_buffer(0, 0 TSRMLS_CC); + php_output_discard(TSRMLS_C); + + Discarding all output buffers: + // php_ob_end_buffers(0 TSRMLS_CC); + php_output_discard_all(TSRMLS_C); + + Stopping (and dropping) one output buffer: + // php_ob_end_buffer(1, 0 TSRMLS_CC) + php_output_end(TSRMLS_C); + + Stopping (and dropping) all output buffers: + // php_ob_end_buffers(1, 0 TSRMLS_CC); + php_output_end_all(TSRMLS_C); + + Retrieving output buffers contents: + // php_ob_get_buffer(zstring TSRMLS_CC); + php_output_get_contents(zstring TSRMLS_CC); + + Retrieving output buffers length: + // php_ob_get_length(zlength TSRMLS_CC); + php_output_get_length(zlength TSRMLS_CC); + + Retrieving output buffering level: + // OG(nesting_level); + php_output_get_level(TSRMLS_C); + + Issue a warning because of an output handler conflict: + // php_ob_init_conflict("to be started handler name", "to be tested if already started handler name" TSRMLS_CC); + php_output_handler_conflict(new_handler_name, new_handler_name_len, set_handler_name, set_handler_name_len TSRMLS_CC); + + Registering a conflict checking function, which will be checked prior starting the handler: + // not possible with old API, unless hardcoding into output.c + php_output_handler_conflict_register(handler_name, handler_name_len, my_php_output_handler_conflict_check_t TSRMLS_CC); + + Registering a reverse conflict checking function, which will be checked prior starting the specified foreign handler: + // not possible with old API + php_output_handler_reverse_conflict_register(foreign_handler_name, foreign_handler_name_len, my_php_output_handler_conflict_check_t TSRMLS_CC); + + Facilitating a context from within an output handler callable with ob_start(): + // not possible with old API + php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_OPAQ, (void *) &custom_ctx_ptr_ptr TSRMLS_CC); + + Disabling of the output handler by itself: + //not possible with old API + php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_DISABLE, NULL TSRMLS_CC); + + Marking an output handler immutable by itself because of irreversibility of its operation: + // not possible with old API + php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE, NULL TSRMLS_CC); + + Restarting the output handler because of a CLEAN operation: + // not possible with old API + if (flags & PHP_OUTPUT_HANDLER_CLEAN) { ... } + + Recognizing by the output handler itself if it gets discarded: + // not possible with old API + if ((flags & PHP_OUTPUT_HANDLER_CLEAN) && (flags & PHP_OUTPUT_HANDLER_FINAL)) { ... } + + +Output handler hooks + + The output handler can change its abilities at runtime. Eg. the gz handler can + remove the CLEANABLE and REMOVABLE bits when the first output has passed through it; + or handlers implemented in C to be used with ob_start() can contain a non-global + context: + PHP_OUTPUT_HANDLER_HOOK_GET_OPAQ + pass a void*** pointer as second arg to receive the address of a pointer + pointer to the opaque field of the output handler context + PHP_OUTPUT_HANDLER_HOOK_GET_FLAGS + pass a int* pointer as second arg to receive the flags set for the output handler + PHP_OUTPUT_HANDLER_HOOK_GET_LEVEL + pass a int* pointer as second arg to receive the level of this output handler + (starts with 0) + PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE + the second arg is ignored; marks the output handler to be neither cleanable + nor removable + PHP_OUTPUT_HANDLER_HOOK_DISABLE + the second arg is ignored; marks the output handler as disabled + + +Open questions + + Should the userland API be adjusted and unified? + + Many bits of the manual (and very first implementation) do not comply + with the behaviour of the current (to be obsoleted) code, thus should + the manual or the behaviour be adjusted? + +END diff --git a/README.PARAMETER_PARSING_API b/README.PARAMETER_PARSING_API index 8d297670c6573..927e48188cc93 100644 --- a/README.PARAMETER_PARSING_API +++ b/README.PARAMETER_PARSING_API @@ -51,6 +51,7 @@ Type specifiers L - long, limits out-of-range numbers to LONG_MAX/LONG_MIN (long) o - object of any type (zval*) O - object of specific type given by class entry (zval*, zend_class_entry) + p - valid path (string without null bytes in the middle) and its length (char*, int) r - resource (zval*) s - string (with possible null bytes) and its length (char*, int) z - the actual zval (zval*) diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS index b09ec53c139a0..a8e36c2b6f0c0 100644 --- a/README.RELEASE_PROCESS +++ b/README.RELEASE_PROCESS @@ -50,38 +50,30 @@ Rolling a non stable release (alpha/beta/RC) 2. run the "scripts/dev/credits" script in php-src and commit the changes in the credits files in ext/standard. -3. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``. -Do not use abbreviations for alpha and beta. - -4. Commit those changes and note the revision id. - -5. tag the repository with the version. To do the tag in a fast way do a svn copy on the server using full URLs. You should use the revision id from the above commit to prevent mistakes in case there was a commit in between. f.e. "``svn cp https://svn.php.net/repository/php/php-src/branches/PHP_5_3@308399 https://svn.php.net/repository/php/php-src/tags/php_5_3_6RC1``" -(of course, you need to change that to the version you're rolling an RC for). Mail php-internals to announce the tag so tests/validation/check can be done prior to package it. It is especially important for RCs. +3. Checkout the release branch for this release (e.g., PHP-5.4.2). -6. Bump up the version numbers in ``main/php_version.h``, ``configure.in`` -and possibly ``NEWS`` again, to the **next** version. F.e. if the release -candidate was "4.4.1RC1" then the new one should be "4.4.1RC2-dev" - regardless -if we get a new RC or not. This is to make sure ``version_compare()`` can -correctly work. +4. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``. +Do not use abbreviations for alpha and beta. -7. Commit those changes +5. Commit these changes to the branch with ``git commit -a``. -8. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4 -branch if you're rolling 4.4.x releases). +6. Tag the repository with the version, e.g.: +``git tag -u YOURKEYID php-5.4.2RC2`` -9. You do not have to update the tree, but of course you can with "``svn up``". +7. Push the changes to the main repo: +``git push --tags origin HEAD`` -10. run: ``./makedist php 4.4.1RC1``, this will export the tree, create configure +8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure and build two tarballs (one gz and one bz2). -11. Copy those two tarballs to www.php.net, in your homedir there should be a +9. Copy those two tarballs to www.php.net, in your homedir there should be a directory "downloads/". Copy them into there, so that the system can generate MD5 sums. If you do not have this directory, talk to Derick. -12. Now the RC can be found on http://downloads.php.net/yourname, +10. Now the RC can be found on http://downloads.php.net/yourname, f.e. http://downloads.php.net/derick/ -13. Once the release has been tagged, contact the PHP Windows development team +11. Once the release has been tagged, contact the PHP Windows development team (internals-win@lists.php.net) so that Windows binaries can be created. Once those are made, they should be placed into the same directory as the source snapshots. @@ -115,7 +107,7 @@ Derick) run the following commands for you: 4. Update ``php.git/include/version.inc`` (x=major version number) - a. ``$PHP_x_RC`` = "5.3.0RC1" + a. ``$PHP_x_RC`` = "5.4.0RC1" b. ``$PHP_x_RC_DATE`` = "06 September 2007" diff --git a/README.input_filter b/README.input_filter index 488ca82a7b156..e2941d029ee4e 100644 --- a/README.input_filter +++ b/README.input_filter @@ -19,9 +19,7 @@ A simple implementation might look like the following. This stores the original raw user data and adds a my_get_raw() function while the normal $_POST, $_GET and $_COOKIE arrays are only populated with stripped data. In this simple example all I am doing is calling strip_tags() on -the data. If register_globals is turned on, the default globals that -are created will be stripped ($foo) while a $RAW_foo is created with the -original user input. +the data. ZEND_BEGIN_MODULE_GLOBALS(my_input_filter) zval *post_array; @@ -155,8 +153,6 @@ PHP_FUNCTION(my_get_raw) int var_len; zval **tmp; zval *array_ptr = NULL; - HashTable *hash_ptr; - char *raw_var; if(zend_parse_parameters(2 TSRMLS_CC, "ls", &arg, &var, &var_len) == FAILURE) { return; @@ -174,23 +170,15 @@ PHP_FUNCTION(my_get_raw) break; } - if(!array_ptr) RETURN_FALSE; - - /* - * I'm changing the variable name here because when running with register_globals on, - * the variable will end up in the global symbol table - */ - raw_var = emalloc(var_len+5); /* RAW_ and a \0 */ - strcpy(raw_var, "RAW_"); - strlcat(raw_var,var,var_len+5); - hash_ptr = HASH_OF(array_ptr); + if(!array_ptr) { + RETURN_FALSE; + } - if(zend_hash_find(hash_ptr, raw_var, var_len+5, (void **)&tmp) == SUCCESS) { + if(zend_hash_find(HASH_OF(array_ptr), var, var_len+5, (void **)&tmp) == SUCCESS) { *return_value = **tmp; zval_copy_ctor(return_value); } else { RETVAL_FALSE; } - efree(raw_var); } diff --git a/TODO b/TODO deleted file mode 100644 index c3c5fab8dae8a..0000000000000 --- a/TODO +++ /dev/null @@ -1,136 +0,0 @@ -Things to do or at least think about doing in the future. Name in -parenthesis means that person has taken on this project. - -Zend ----- - * Allow foreach ($array as $k => list($a, $b)) syntax for multi - dimensional arrays. - * Look at replacing c-lib call tolower(). - * Make hash API functions work with HASH_OF() to save time. - * Native large number support (probably with GNU GMP) - * Const'ify APIs. Right now, many functions leave parameters untouched, - but don't declare those as const. This makes interaction with other - interfaces difficult which pass const parameters to us. - - -global ------- - * Make sure that all ZTS globals get destructed. Most ts_allocate_id() - calls should have a dtor entry. - * on some platforms unimplemented function will just do nothing - (e.g. symlink) they should print a warning or not even be defined! - (DONE ?) - * --enable-all in configure. (--enable-shared=max ...) - * make configure print out a summary when it's done (like XEmacs) - * replace standard functions which work on static data with - reentrancy-safe functions (DONE?). - * make SAPI conform to CGI/1.1. Currently, all SAPI modules - define REMOTE_ADDR etc. themselves and reach only various level - of compliance. - * see what functions might need to be changed to use HashPosition, so - that the internal array pointer is not affected. - * Move most extensions and PEAR packages out of the PHP CVS tree, - include them again during release packaging. - - Other - * use thread-safe resolver functions (either require BIND 8 or adns). - * implement javadoc based function docs template system. - * provide optional IPv6 support (seems to be done?). - * find a better way to implement script timeouts. SIGVTALRM is used - by some POSIX threads implementations (i.e. OpenBSD) and is not - available in ZTS mode. - * Implement flush feature suitable for nested output buffers. - -Streams -------- - * Route filestat.c through the wrapper layer; isolate the statcache code - so that it is independent of php functions and can be applied to any - stream/path. - * Implement generalized connection pool for stated protocols such as - ftp and http/1.1 (using keep-alive) to avoid having to negotiate - new command/request stream for each subsequent call; Possibly store - resources in contexts (creating a default context if necessary) to - allow segmentation of connection pools. - * Add a method to take ownership of the memory buffer in memory streams so - that generating string values for zvals doesn't require an estrdup. - * bundle and use curl lib for fopen wrapper. - -documentation -------------- - * Add remarks in the documentation which functions are not implemented - on win32. - * Add remarks in the documentation which functions are not binary-safe. - * Update curl documentation (DONE?) - * Add developer documentation. - * Add detailed documentation for Java extension. - -ext/curl --------- - * Have a warning scheme for when people use unsupported features. - -ext/oci8 --------- - * All OCIFetch*() functions should return 0 for no more data and false on - error. - * Have a flag that trims trailing spaces from CHAR fields on retrieval. - * Make allow_call_time_pass_reference=Off working. - * For additional todo information, see oci8.c, in ext/oci8 - -ext/odbc --------- - For PHP 4.3.0: - * update all php_error calls to php_error_docref where valid - * integrate EXPERIMENTAL ODBC update for use in PHP 5.0, use for - testing purposes only. - - For PHP 5.0.0 - * Activate EXPERIMENTAL ODBC codebase update - -ext/pcre --------- - * Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe - -ext/pcntl ---------- - * Change internal callback handler to use TICKS - * Remove all zend_extension code - * Add object callback support to pcntl_signal() - -ext/session ------------ - For PHP 4.3.0: - * session_abort() to abort session. ie: Do not save session data. - * Allow unset($_SESSION) or unset($HTTP_SESSION_VARS) to unset - session vars regardless of register_globals setting. - - Other: - * Maybe implement finer-grained session variables that could be - locked individually. - * Write a network-transparent storage back-end with fallover - facilities - * Provide a callback facility which is executed upon encountering - an unknown class name during deserialization - -ext/standard ------------- - * Add a version number to data serialized via serialize(). - * Possibly modify parsing of GPC data to automatically create arrays if - variable name is seen more than once. - * Implement regex-cache for url-functions. - * Move socket related functions to fsock.c. - -ext/wddx --------- - * See if we can support the remaining data types: - binary - - http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm - (Andrei) - - * implement wddx_packet_as_javascript(). (Andrei) - -other cool stuff ----------------- - * PVM extension - -vim:et:sw=4:ts=4 diff --git a/TODO-5.1 b/TODO-5.1 deleted file mode 100644 index d2690f6e3be4f..0000000000000 --- a/TODO-5.1 +++ /dev/null @@ -1,4 +0,0 @@ -Zend Engine ------------ - - Look at making zend_constant value member be a zval* instead of zval. (Andi) - - Implement inheritance rules for type hints. (Marcus) diff --git a/TODO-PHP5 b/TODO-PHP5 deleted file mode 100644 index 1bb22e2bda90b..0000000000000 --- a/TODO-PHP5 +++ /dev/null @@ -1,89 +0,0 @@ -Component: Zend Engine 2 - - Important stuff to finish: PPP members/PPP methods, - support of overloaded extensions, possibly differentiate - between class and namespace as discussed with Stig in - Germany. -Responsibility: Zeev, Andi, Stas -Time frame: Couple of months for first part and extensions will be - ongoing while PHP is being fixed. - Things to leave for later versions: Native aggregation - support, accessing static members via object and not class. - - -Component: Aggregation -Responsibility: Andi, Stig? -Time frame: ? - - -Component: Redesign of API Versioning -Responsibility: ? -Time frame: 1 month - - -Component: Thread Safety - Identify the extensions that are not thread safe by design - or due to dependant libraries and identify them as such. - If possible try to resolve thread safety issue via code - improvements (if php code or patches will be accepted by - library maintainers). For situations where thread safety - cannot easily be acheived a flag in the extension API is - set so PHP can identify non-thread safe extensions. These - extensions will not be loaded in a ZTS compiled binary - (unless it is cli/cgi). - -Responsibility: ? -Time frame: ? - - -Component: SAPI - Environment variables defined in the CGI spec need to be - verified in each SAPI module that they conform to the CGI - spec correctly. If they do not, the SAPI module needs to - fix the variable prior to script execution. Having this - conformity will aid in having PHP scripts run correctly - under different sapi modules. - -Responsibility: Shane Caraveo & each sapi module owner -Timeframe: ? (but shouldn't be much effort, most modules are probably ok) - - -Component: RPC Abstraction Layer - Porting java, com, dotnet, xmlrpc, corba, soap and python, srm - (are there more ?) to work with the new oo api and preferably - by using ext/rpc. -Responsibility: Harald -Time frame: 2 months (but i have to wait for a few engine features first) - - -Component: OO Extensions - Each OO extension has to be revised and rewritten to fit into - the new OO model. We should decide which extensions are a must - to have for the release and which can be ported by the maintainer - later as a separate pecl release. - A list of extensions to be extended that have to be investigated: - * browscap - * aggregate - * all *sql extensions (*_fetch_object) - * domxml (seems like christian is rewriting it anyways) - * ming -Responsibility: Harald (, extension maintainers) - - -Component: Abstract Data Types (ADT) -Responsibility: Sterling, Harald -Time frame: ? - - -Component: Test Suite - Extending the test suite with atleast a test for every - function in an extension that doesn't require external - resources. Also developing an automated test thing which - cvs ups's, compiles and tests the build on a daily base on - as much platforms/extensions as possible. - - The test suite will also be extended to support threaded - testing and testing for differing sapi modules (via http - calls or other methods). -Reponsibility: Derick (, extension maintainers) -Time frame: 3 months diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 41368a4987d13..efdea5c880a9e 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -710,6 +710,22 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp) #endif } +/* + Changes the signal mask of the calling thread +*/ +#ifdef HAVE_SIGPROCMASK +TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset) +{ + TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Changed sigmask in thread: %ld", tsrm_thread_id())); + /* TODO: add support for other APIs */ +#ifdef PTHREADS + return pthread_sigmask(how, set, oldset); +#else + return sigprocmask(how, set, oldset); +#endif +} +#endif + TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler) { diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index d3d6f9b2d7991..b232429d4d89e 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -90,6 +90,10 @@ typedef struct { # define MUTEX_T beos_ben * #endif +#ifdef HAVE_SIGNAL_H +#include +#endif + typedef void (*ts_allocate_ctor)(void *, void ***); typedef void (*ts_allocate_dtor)(void *, void ***); @@ -138,6 +142,9 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void); TSRM_API void tsrm_mutex_free(MUTEX_T mutexp); TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp); TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp); +#ifdef HAVE_SIGPROCMASK +TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset); +#endif TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler); TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler); diff --git a/TSRM/acconfig.h b/TSRM/acconfig.h deleted file mode 100644 index 2b94cf35e711d..0000000000000 --- a/TSRM/acconfig.h +++ /dev/null @@ -1 +0,0 @@ -#undef PTHREADS diff --git a/TSRM/build.mk b/TSRM/build.mk index aac1a8b982ae5..f5756af72cdcc 100644 --- a/TSRM/build.mk +++ b/TSRM/build.mk @@ -33,7 +33,7 @@ $(makefile_in_files): $(makefile_am_files) aclocal.m4: configure.in acinclude.m4 aclocal -$(config_h_in): configure.in acconfig.h +$(config_h_in): configure.in # explicitly remove target since autoheader does not seem to work # correctly otherwise (timestamps are not updated) @rm -f $@ diff --git a/TSRM/configure.in b/TSRM/configure.in index acfdd00b3531f..6f10f5ab135cf 100644 --- a/TSRM/configure.in +++ b/TSRM/configure.in @@ -7,6 +7,10 @@ AC_INIT(TSRM.c) AM_INIT_AUTOMAKE(TSRM, 1.0, nodefine) AM_CONFIG_HEADER(tsrm_config.h) +AH_TOP([ +#undef PTHREADS +]) + sinclude(tsrm.m4) TSRM_BASIC_CHECKS diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4 index 85e6a83a83317..b53a4bb805fff 100644 --- a/TSRM/tsrm.m4 +++ b/TSRM/tsrm.m4 @@ -30,6 +30,8 @@ AC_REQUIRE([AC_PROG_RANLIB])dnl AC_CHECK_HEADERS(stdarg.h) +AC_CHECK_FUNCS(sigprocmask) + ]) diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index e734406837968..683d6a4d52d2f 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -277,18 +277,6 @@ CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){ } /* }}} */ -CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */ -{ - return php_sys_stat_ex(path, buf, 0); -} -/* }}} */ - -CWD_API int php_sys_lstat(const char *path, struct stat *buf) /* {{{ */ -{ - return php_sys_stat_ex(path, buf, 1); -} -/* }}} */ - CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */ { WIN32_FILE_ATTRIBUTE_DATA data; @@ -718,7 +706,6 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p } else { CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1; } - free(r); } else if (key == (*bucket)->key && path_len == (*bucket)->path_len && memcmp(path, (*bucket)->path, path_len) == 0) { @@ -1152,7 +1139,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i /* Resolve path relatively to state and put the real path into state */ /* returns 0 for ok, 1 for error */ -CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath) /* {{{ */ +CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath TSRMLS_DC) /* {{{ */ { int path_length = strlen(path); char resolved_path[MAXPATHLEN]; @@ -1162,7 +1149,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func int ret; int add_slash; void *tmp; - TSRMLS_FETCH(); if (path_length == 0 || path_length >= MAXPATHLEN-1) { #ifdef TSRM_WIN32 @@ -1363,7 +1349,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func CWD_API int virtual_chdir(const char *path TSRMLS_DC) /* {{{ */ { - return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH)?-1:0; + return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH TSRMLS_CC)?-1:0; } /* }}} */ @@ -1431,7 +1417,7 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* { new_state.cwd_length = 0; } - if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)==0) { + if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH TSRMLS_CC)==0) { int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length; memcpy(real_path, new_state.cwd, len); @@ -1453,7 +1439,7 @@ CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_f int retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - retval = virtual_file_ex(&new_state, path, verify_path, CWD_FILEPATH); + retval = virtual_file_ex(&new_state, path, verify_path, CWD_FILEPATH TSRMLS_CC); *filepath = new_state.cwd; @@ -1478,7 +1464,7 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC) /* {{{ } CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH)) { + if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return NULL; } @@ -1496,13 +1482,13 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */ int ret; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH)) { + if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } #if defined(TSRM_WIN32) - ret = tsrm_win32_access(new_state.cwd, mode); + ret = tsrm_win32_access(new_state.cwd, mode TSRMLS_CC); #else ret = access(new_state.cwd, mode); #endif @@ -1569,7 +1555,7 @@ CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC) / int ret; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH)) { + if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1592,7 +1578,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC) /* {{{ */ int ret; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH)) { + if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1611,7 +1597,7 @@ CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int li int ret; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH)) { + if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1638,7 +1624,7 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...) /* {{{ */ int f; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH)) { + if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1666,7 +1652,7 @@ CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC) /* {{{ */ int f; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH)) { + if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1685,14 +1671,14 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */ int retval; CWD_STATE_COPY(&old_state, &CWDG(cwd)); - if (virtual_file_ex(&old_state, oldname, NULL, CWD_EXPAND)) { + if (virtual_file_ex(&old_state, oldname, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(&old_state); return -1; } oldname = old_state.cwd; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, newname, NULL, CWD_EXPAND)) { + if (virtual_file_ex(&new_state, newname, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(&old_state); CWD_STATE_FREE(&new_state); return -1; @@ -1721,7 +1707,7 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */ int retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) { + if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1739,7 +1725,7 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ * int retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND)) { + if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1757,7 +1743,7 @@ CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */ int retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND)) { + if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1775,7 +1761,7 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC) /* {{{ */ int retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, pathname, NULL, CWD_FILEPATH)) { + if (virtual_file_ex(&new_state, pathname, NULL, CWD_FILEPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1796,7 +1782,7 @@ CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC) /* {{{ */ int retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, pathname, NULL, CWD_EXPAND)) { + if (virtual_file_ex(&new_state, pathname, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } @@ -1818,7 +1804,7 @@ CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC) /* {{{ */ DIR *retval; CWD_STATE_COPY(&new_state, &CWDG(cwd)); - if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH)) { + if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return NULL; } @@ -1833,7 +1819,7 @@ CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC) /* {{{ */ #ifdef TSRM_WIN32 CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */ { - return popen_ex(command, type, CWDG(cwd).cwd, NULL); + return popen_ex(command, type, CWDG(cwd).cwd, NULL TSRMLS_CC); } /* }}} */ #elif defined(NETWARE) @@ -1956,7 +1942,7 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{ new_state.cwd_length = 0; } - if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) { + if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH TSRMLS_CC)) { free(new_state.cwd); return NULL; } diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index c13e88d59261b..2c4085894f34f 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -131,8 +131,8 @@ typedef unsigned short mode_t; #ifdef TSRM_WIN32 CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat); -CWD_API int php_sys_stat(const char *path, struct stat *buf); -CWD_API int php_sys_lstat(const char *path, struct stat *buf); +# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0) +# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len); #else # define php_sys_stat stat @@ -201,7 +201,7 @@ CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int li #define CWD_FILEPATH 1 /* resolve symlinks if file is exist otherwise expand */ #define CWD_REALPATH 2 /* call realpath(), resolve symlinks. File must exist */ -CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath); +CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath TSRMLS_DC); CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC); @@ -267,7 +267,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D); #define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC) #define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC) #define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC) -#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC) +# define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC) #define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC) #define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC) #define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC) @@ -310,7 +310,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D); #define VCWD_OPENDIR(pathname) opendir(pathname) #define VCWD_POPEN(command, type) popen(command, type) #if defined(TSRM_WIN32) -#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode) +#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode TSRMLS_CC) #else #define VCWD_ACCESS(pathname, mode) access(pathname, mode) #endif diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 9e029f60af2f1..b40af77c44fc7 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -190,7 +190,7 @@ PSID tsrm_win32_get_token_sid(HANDLE hToken) return NULL; } -TSRM_API int tsrm_win32_access(const char *pathname, int mode) +TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC) { time_t t; HANDLE thread_token; @@ -208,8 +208,6 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode) realpath_cache_bucket * bucket = NULL; char * real_path = NULL; - TSRMLS_FETCH(); - if (mode == 1 /*X_OK*/) { DWORD type; return GetBinaryType(pathname, &type) ? 0 : -1; @@ -448,10 +446,12 @@ static HANDLE dupHandle(HANDLE fh, BOOL inherit) { TSRM_API FILE *popen(const char *command, const char *type) { - return popen_ex(command, type, NULL, NULL); + TSRMLS_FETCH(); + + return popen_ex(command, type, NULL, NULL TSRMLS_CC); } -TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env) +TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC) { FILE *stream = NULL; int fno, type_len = strlen(type), read, mode; @@ -469,8 +469,6 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, HANDLE token_user = NULL; BOOL asuser = TRUE; - TSRMLS_FETCH(); - if (!type) { return NULL; } diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index 4e645b2d54367..56835f802b9d5 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -95,10 +95,10 @@ char * tsrm_win32_get_path_sid_key(const char *pathname TSRMLS_DC); TSRM_API void tsrm_win32_startup(void); TSRM_API void tsrm_win32_shutdown(void); -TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env); +TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC); TSRM_API FILE *popen(const char *command, const char *type); TSRM_API int pclose(FILE *stream); -TSRM_API int tsrm_win32_access(const char *pathname, int mode); +TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC); TSRM_API int win32_utime(const char *filename, struct utimbuf *buf); TSRM_API int shmget(int key, int size, int flags); diff --git a/UPGRADING b/UPGRADING index 9d62054bd639b..a10dca991c43b 100755 --- a/UPGRADING +++ b/UPGRADING @@ -1,705 +1,808 @@ $Id$ -UPGRADE NOTES - PHP 5.3 - -1. Reserved words and classes -2. Changes made to existing functions -3. Changes made to existing methods -4. Changes made to existing classes -5. Deprecated -6. Undeprecated -7. Extensions: - a. moved out to PECL and actively maintained there - b. no longer maintained - c. with changed behaviour - d. no longer possible to disable -8. Changes in SAPI support -9. Changes in INI directives -10. Syntax additions +PHP 5.4 UPGRADE NOTES + +=========== +0. Contents +=========== + +1. Changes to INI directives +2. Changes to reserved words and classes +3. Changes to engine behavior +4. Changes to existing functions +5. Changes to existing classes +6. Changes to existing methods +7. Deprecated Functionality +8. Removed Functionality + a. Removed features + b. Removed functions + c. Removed syntax + d. Removed hash algorithms +9. Extension Changes: + a. Extensions no longer maintained + b. Extensions with changed behavior +10. Changes in SAPI support 11. Windows support -12. New in PHP 5.3: - a. New libraries - b. New extensions - c. New stream wrappers - d. New stream filters - e. New functions - f. New global constants - g. New classes - h. New methods - i. New class constants +12. New in PHP 5.4: + a. New features + b. Syntax additions + c. New functions + d. New global constants + e. New classes + f. New methods + g. New hash algorithms ============================= -1. Reserved words and classes +1. Changes to INI directives ============================= -- **namespace** and **goto** are now reserved keywords. +- PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom + are present. If either is available, session.entropy_file now + defaults to that file and session.entropy_length defaults to 32. + This provides non-blocking entropy to session id generation. If you + do not want extra entropy for your session ids, add: + + session.entropy_file= + session.entropy_length=0 + + to your php.ini to preserve pre-PHP 5.4 behavior. + +- Deprecated php.ini directives will now throw an E_CORE_WARNING's + instead of the previous E_WARNING's. + +- The following php.ini directives are no longer available in PHP 5.4 + and will now throw an E_CORE_ERROR upon startup: + - allow_call_time_pass_reference + - define_syslog_variables + - highlight.bg + - magic_quotes_gpc + - magic_quotes_runtime + - magic_quotes_sybase + - register_globals + - register_long_arrays + - safe_mode + - safe_mode_gid + - safe_mode_include_dir + - safe_mode_exec_dir + - safe_mode_allowed_env_vars + - safe_mode_protected_env_vars + - session.bug_compat_42 + - session.bug_compat_warn + - y2k_compliance + - zend.ze1_compatibility_mode + +- the following new php.ini directives were added: + - max_input_vars - specifies how many GET/POST/COOKIE input + variables may be accepted. The default value is 1000. + +- E_ALL now includes E_STRICT. + +- The recommended production value for error_reporting changed to E_ALL & + ~E_DEPRECATED & ~E_STRICT. + +- Added new session support directives: + session.upload_progress.enabled + session.upload_progress.cleanup + session.upload_progress.prefix + session.upload_progress.name + session.upload_progress.freq + session.upload_progress.min_freq + +- Added a zend.multibyte directive as a replacement of the PHP compile time + configuration option --enable-zend-multibyte. Now the Zend Engine always + contains code for multibyte support, which can be enabled or disabled at + runtime. Note: It doesn't make a lot of sense to enable this option if + ext/mbstring is not enabled, because most functionality is implemented by + mbstrings callbacks. + +- Added zend.script_encoding. This value will be used unless a + "declare(encoding=...)" directive appears at the top of the script. + +- Added zend.signal_check to check for replaced signal handlers on shutdown + +- Added enable_post_data_reading, which is enabled by default. When it's + disabled, the POST data is not read (or processed); the behavior is similar + to that of other request methods with body, like PUT. This allows reading + the raw POST data in multipart requests and reading/processing the POST data + in a stream fashion (through php://input) without having it copied in memory + multiple times. + +- Added windows_show_crt_warning. This directive shows the CRT warnings when + enabled. These warnings were displayed by default until now. It is disabled + by default. + +- Added cli.pager to set a pager for CLI interactive shell output. + +- Added cli.prompt to configure the CLI interactive shell prompt. + +- Added cli_server.color to enable the CLI web server to use ANSI color coding + in terminal output. + +======================================== +2. Changes to reserved words and classes +======================================== + +- "callable", "insteadof" and "trait" are now reserved words. -- **Closure** is now a reserved class. (Used by lambda and closure.) - -===================================== -2. Changes made to existing functions -===================================== - -- Paths containing NULL (like /some/path\0foo.txt) are now considered invalid. - See http://news.php.net/php.internals/50191 - -- The HTTP stream wrapper now considers all status codes from 200 to 399 to be - successful. - -- The array functions natsort(), natcasesort(), usort(), uasort(), uksort(), - array_flip(), and array_unique() no longer accept objects passed as arguments. - If you need to use them to access an object's properties, you must cast the - object to an array first. - -- var_dump() output now includes private object members. - -- session_start() now returns FALSE when the session startup fails. - -- property_exists() now checks the existence of a property independent of - accessibility (like method_exists()). - -- The $initial parameter for array_reduce can now be of any type. - -- clearstatcache() no longer clears the realpath cache by default. - -- realpath() is no longer system-dependent and works identically on all - platforms. - -- call_user_func() now propagates $this even if the callee is the parent class. - -- The filesystem functions opendir(), scandir(), and dir() now use the default - context if no context argument is passed. - -- The behaviour of functions with by-reference parameters called by value has - changed. Where previously the function would accept the by-value argument, a - warning is now emitted and all by-ref parameters are set to NULL. - -- There is now native support for the following math functions: asinh(), - acosh(), atanh(), log1p(), and expm1(). - -- In the GD extension, there is now pixelation support available through - the imagefilter() function. - -- crypt() now has Blowfish and extended DES support, and crypt() features are - now 100% portable. PHP has its own internal crypt implementation which drops - into place when system support for crypt or crypt_r() is not found. - -- get_cfg_var() is now able to return "array" INI options. - -- Stream wrappers can now be used by the include_path INI directive. - -- These functions now take new parameters: - clearstatcache(): $clear_realpath_cache and $filename. - copy(): $context - fgetcsv(): $escape - ini_get_all(): $details - json_encode(): $options - json_decode(): $depth - nl2br(): $is_xhtml - parse_ini_file(): $scanner_mode - round(): $mode - stream_context_create(): $params - strstr(), stristr(): $before_needle - sybase_connect(): $new - -- And new mode option for fopen: 'n' (O_NONBLOCK) +============================= +3. Changes to engine behavior +============================= -- The new mysqlnd library necessitates using MySQL's newer 41-byte password - format. Continued use of the old 16 byte passwords will cause mysql_connect() - and other related functions to produce the following error message: - "mysqlnd cannot connect to MySQL 4.1+ using old authentication" +- The __construct arguments of an extended abstract constructor must + now match: -- The dl() function is now disabled by default, and only available under the - cli, cgi, and embed SAPIs. + abstract class Base + { + abstract public function __construct(); + } + class Foo extends Base + { + public function __construct($bar) {} + } -- mail() now supports the logging of sent mail. + This now emits a Fatal error due the incompatible declaration. -- stream_select(), stream_set_blocking(), stream_set_timeout(), and - stream_set_write_buffer() now work with user-space stream wrappers. +- In previous versions, superglobal names could be used for parameter + names, thereby shadowing the corresponding superglobal. In PHP 5.4 + this now causes a fatal error such as "Cannot re-assign auto-global + variable GLOBALS". + +- Turning null, false or an empty string into an object by adding a + property will now emit a warning instead of an E_STRICT error. -- getopt() accepts "long options" now on all platforms. - Optional values and using = as a separator for short options are now - supported. + $test = null; + $test->baz = 1; + To create a generic object you can use StdClass: -=================================== -3. Changes made to existing methods -=================================== + $test = new StdClass; + $test->baz = 1; -- The magic methods __get(), __set(), __isset(), __unset(), and __call() should - always be public and can no longer be static. Method signatures are enforced. +- Converting an array to a string now will cause an E_NOTICE warning. -- The __call() magic method is now invoked on access to private and protected - methods. +- Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now + return false on isset() and true on empty(), and produce warning if + trying to use them. Offsets of types double, bool and null produce + notice. Numeric strings ($a['2']) still work as before. -- The __toString() magic method can no longer accept arguments. + Note that offsets like '12.3' and '5 and a half' are considered + non-numeric and produce warning, but are converted to 12 and 5 + respectively for backwards compatibility reasons. -- There is a new magic method, __callStatic(). +- Long numeric strings that do not fit in integer or double (such as + "92233720368547758070") are compared using string comparison if + they could otherwise result in precision loss - since 5.4.4. -- Internal count() vs. count_elements() handler resolution rules have changed. - (This could potentially break custom PHP extensions.) +- Closures now support scopes and $this and can be rebound to + objects using Closure::bind() and Closure::bindTo(). -- The trailing / has been removed from SplFileInfo and other related directory - classes. +- 1; it doesn't merely + decrement the resource refcount. -- Call-time pass-by-reference has been deprecated +- socket_set_options() and socket_get_options() now support multicast options. -- Usage of {} to access string offsets is deprecated +- The raw data parameter in openssl_encrypt() and openssl_decrypt() is now an + options integer rather than a boolean. A value of true produces the same + behavior. -- Passing locale category name as string to setlocale() is deprecated. +- Write operations within XSLT (for example with the extension sax:output) are + disabled by default. You can define what is forbidden with the method + XsltProcess::setSecurityPrefs($options). -=============== -6. Undeprecated -=============== +- Added AES support to OpenSSL. -- By popular request, is_a() is no longer deprecated. +- openssl_csr_new() expects the textual data to be in UTF-8. -============== -7. Extensions: -============== +- Added no-padding option to openssl_encrypt() and openssl_decrypt(). - a. moved out to PECL and actively maintained there +- Added a "no_ticket" SSL context option to disable the SessionTicket TLS + extension. - - fdf - - ming - - ncurses +- Added new json_encode() options: JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, + JSON_NUMERIC_CHECK, JSON_BIGINT_AS_STRING, JSON_UNESCAPED_UNICODE. - b. no longer maintained +- Added Tokyo Cabinet and Berkley DB 5 support to DBA extension. - - dbase - - fbsql - - msql - - sybase (use sybase_ct, which is still in PHP core) - - mhash (hash has full BC layer) - - mime_magic (use fileinfo, has full BC layer) +- Added support for CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE + to cURL. - c. with changed behaviour +- Added optional argument to debug_backtrace() and debug_print_backtrace() + to limit the amount of stack frames returned. - - dns: dns_check_record() will now return an extra "entries" index, - containing the TXT elements. +- Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode + now supports hashes marked $2a$, $2x$, $2y$ and $2z$. - - datetime: date/time functions will no longer use the TZ environment - variable to guess which timezone should be used. +- mbstring now supports following encodings: Shift_JIS/UTF-8 Emoji, + JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004), + MacJapanese (Shift_JIS), gb18030. - - cURL now supports SSH +- Added encode and decode in hex format to mb_encode_numericentity() and + mb_decode_numericentity(). - - hash: The SHA-224 and salsa hash algorithms are now supported. +- Added support for SORT_NATURAL and SORT_FLAG_CASE in array sort functions: + sort(), rsort(), ksort(), krsort(), asort(), arsort() and array_multisort(). - - mbstring: Now supports CP850 encoding. +- is_a() and is_subclass_of() now have third boolean parameter, which specifies + if the first argument can be a string class name. Default if false for is_a + and true for is_subclass_of() for BC reasons. - - oci8: Database Resident Connection Pooling (DRCP) and Fast Application - Notification (FAN) are now supported. +- ob_start() will now treat a chunk size of 1 as meaning 1 byte, rather than + the previous special case behavior of treating it as 4096 bytes. - Oracle External Authentication is now supported (except on Windows). +- idn_to_ascii() and idn_to_utf8() now take two extra parameters, one indicating + the variant (IDNA 2003 or UTS #46) and another, passed by reference, to return + details about the operation in case UTS #46 is chosen. - The oci8 function oci_bind_by_name() now supports SQLT_AFC (aka the - CHAR datatype). +- gzencode() used with FORCE_DEFLATE now generates RFC1950 compliant data. - Calling oci_close() on a persistent connection, or when the variable - that references a persistent connection goes out of scope, will now - trigger a roll back of an uncommitted transaction. To avoid unexpected - behavior explicitly issue a commit or roll back as needed. The old - behavior can be enabled with the INI directive - oci8.old_oci_close_semantics. +- ob_start() no longer starts multiple output buffers when passed + array("callback1", "callback2", "callback3", ...). - - openssl: OpenSSL digest and cipher functions are now supported. - It is also now possible to access the internal values of DSA, RSA and - DH keys. +- Since 5.4.4, "php://fd" stream syntax is available only in CLI build. - - session: Sessions will no longer store session-files in "/tmp" when - open_basedir restrictions apply, unless "/tmp" is explicitly added to - the list of allowed paths. +- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments. - - SOAP: Now supports sending user-supplied HTTP headers. +============================== +5. Changes to existing classes +============================== - - MySQLi: Now supports persistent connections by prepending the hostname - with "p:". +- Classes that implement stream wrappers can define a method called + stream_truncate that will respond to truncation, e.g. through ftruncate. + Strictly speaking, this is an addition to the user-space stream wrapper + template, not a change to an actual class. - - imagepstext now rejects invalid antialiasing steps and raises a warning. +- Classes that implement stream wrappers can define a method called + stream_metadata that will be called on touch(), chmod(), chgrp(), chown(). - d. no longer possible to disable +- Arrays cast from SimpleXMLElement now always contain all nodes instead of + just the first matching node. - - PCRE - - Reflection - - SPL +- All SimpleXMLElement children are now always printed when using var_dump(), + var_export(), and print_r(). -========================== -8. Changes in SAPI support -========================== +- Added iterator support in MySQLi. mysqli_result implements Traversable. -- A new "litespeed" SAPI is now available. +============================== +6. Changes to existing methods +============================== -- FastCGI is now always enabled and can not be disabled. See sapi/cgi/CHANGES - for more details. +- DateTime::parseFromFormat() now has a "+" modifier to allow trailing text in + the string to parse without throwing an error. -- A new CGI SAPI option, -T, can be used to measure execution time of a script - repeated several times. - -- CGI/FastCGI now has support for .htaccess style user-defined php.ini files. - See the new user_ini.filename and user_ini.cache_ttl INI directives. +- Added the ability to pass options to DOMDocument::loadHTML(). -============================ -9. Changes in INI directives -============================ +- FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use + the default stream context. -- zend_extension_debug and zend_extension_ts have been removed. Always use the - zend_extension directive to load Zend Extensions. +- Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two + arguments. -- zend.ze1_compatibility_mode has been removed. If this INI directive is set to - on, then an E_ERROR is emitted at startup. +=========================== +7. Deprecated Functionality +=========================== -- There is now support for special sections: [PATH=/opt/httpd/www.example.com/] - and [HOST=www.example.com]. Directives set in these sections cannot be - overridden by user-defined INI files or at runtime. +- The following functions are deprecated in PHP 5.4: + - mcrypt_generic_end(): use mcrypt_generic_deinit() instead + - mysql_list_dbs() -- Added mbstring.http_output_conv_mimetype. This directive specifies the - regex pattern of content types for which mb_output_handler() is activated. +======================== +8. Removed Functionality +======================== -- It is now possible to use the full path to load modules using the "extension" - directive. +a. Removed features -- "INI variables" can now be used almost anywhere in a php.ini file. + The following features have been removed from PHP 5.4: -- It is now possible to use alphanumeric or variable indices in INI option - arrays. + - Magic quotes + - Register globals + - Safe mode + - Session extension bug compatibility mode + - Y2K compliance mode -- open_basedir is now PHP_INI_ALL +b. Removed functions -- Runtime tightening of open_basedir restrictions is now possible. + The following functions are no longer available in PHP 5.4: -- The default value of session.use_only_cookies has changed to "1". + - define_syslog_variables() + - import_request_variables() + - session_is_registered() + - session_register() + - session_unregister() + - set_magic_quotes_runtime() + - mysqli_bind_param() (alias of mysqli_stmt_bind_param()) + - mysqli_bind_result() (alias of mysqli_stmt_bind_result()) + - mysqli_client_encoding() (alias of mysqli_character_set_name()) + - mysqli_fetch() (alias of mysqli_stmt_fetch()) + - mysqli_param_count() (alias of mysqli_stmt_param_count()) + - mysqli_get_metadata() (alias of mysqli_stmt_result_metadata()) + - mysqli_send_long_data() (alias of mysqli_stmt_send_long_data()) + - mysqli::client_encoding() (alias of mysqli::character_set_name) + - mysqli_stmt::stmt() (never worked/always throws, undocumented) -- The default value of oci8.default_prefetch has been changed from 10 to 100. +c. Removed syntax -- A new directive, request_order, controls the behavior of $_REQUEST - independently of variables_order. -- A new directive, called windows.show_crt_warning, has been introduced. - This directive shows the CRT warnings when enabled. These warnings were - displayed by default until now. It is disabled by default. + - break $var; + - continue $var; -- New INI directives: - - mail.add_x_header - - user_ini.filename - - user_ini.cache_ttl - - exit_on_timeout - - mysqli.allow_persistent - - mysqli.default_host - - mysqli.default_socket - - mysqli.allow_local_infile - - mysqli.cache_size - - oci8.connection_class - - oci8.events - - pdo_mysql.default_socket - - pdo_mysql.cache_size - - sqlite3.extension_dir - - mysql.default_socket - - mysql.allow_local_infile - - mysql.cache_size - - mysqlnd.collect_statistics - - mysqlnd.collect_memory_statistics - - mysqlnd.net_cmd_buffer_size - - mysqlnd.net_read_buffer_size - - mysqlnd.log_mask +d. Removed hash algorithms + - Salsa10 and Salsa20, which are actually stream ciphers ==================== -10. Syntax additions +9. Extension Changes ==================== -- NOWDOC: Similar to HEREDOC, but with single quotes: - - <<<'LABEL' ... - - Static HEREDOCs can be used to initialize static variables and class members - or constants: - - static $foo = <<