[PHP-CVS] svn: /php/php-src/trunk/ php.ini-development php.ini-production
moriyoshiTue, 21 Dec 2010 06:57:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=306535 Log: - Update ini descriptions. It is still possible that zend.multibyte will be removed in the near future as it is confirmed to not impose any significant overhead with the standard configuration even when it is enabled. Changed paths: U php/php-src/trunk/php.ini-development U php/php-src/trunk/php.ini-production Modified: php/php-src/trunk/php.ini-development === --- php/php-src/trunk/php.ini-development 2010-12-21 05:49:13 UTC (rev 306534) +++ php/php-src/trunk/php.ini-development 2010-12-21 06:57:46 UTC (rev 306535) @@ -352,6 +352,18 @@ ; http://php.net/realpath-cache-ttl ;realpath_cache_ttl = 120 +; If enabled, scripts may be written in encodings that are incompatible with +; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such +; encodings. To use this feature, mbstring extension must be enabled. +; Default: Off +;zend.multibyte = Off + +; Allows to set the default encoding for the scripts. This value will be used +; unless "declare(encoding=...)" directive appears at the top of the script. +; Only affects if zend.multibyte is set. +; Default: "" +;zend.script_encoding = + ; ; Miscellaneous ; ; @@ -1734,10 +1746,6 @@ ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) ;mbstring.http_output_conv_mimetype= -; Allows to set script encoding. Only affects if PHP is compiled with --enable-zend-multibyte -; Default: "" -;mbstring.script_encoding= - [gd] ; Tell the jpeg decode to ignore warnings and try to create ; a gd image. The warning will then be displayed as notices Modified: php/php-src/trunk/php.ini-production === --- php/php-src/trunk/php.ini-production2010-12-21 05:49:13 UTC (rev 306534) +++ php/php-src/trunk/php.ini-production2010-12-21 06:57:46 UTC (rev 306535) @@ -352,6 +352,18 @@ ; http://php.net/realpath-cache-ttl ;realpath_cache_ttl = 120 +; If enabled, scripts may be written in encodings that are incompatible with +; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such +; encodings. To use this feature, mbstring extension must be enabled. +; Default: Off +;zend.multibyte = Off + +; Allows to set the default encoding for the scripts. This value will be used +; unless "declare(encoding=...)" directive appears at the top of the script. +; Only affects if zend.multibyte is set. +; Default: "" +;zend.script_encoding = + ; ; Miscellaneous ; ; @@ -1730,10 +1742,6 @@ ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) ;mbstring.http_output_conv_mimetype= -; Allows to set script encoding. Only affects if PHP is compiled with --enable-zend-multibyte -; Default: "" -;mbstring.script_encoding= - [gd] ; Tell the jpeg decode to ignore warnings and try to create ; a gd image. The warning will then be displayed as notices -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/tests/bug53579.phpt branches/PHP_5_3/ext/zip/zip_stream.c trunk/ext/zip/tests/bug53579.phpt trunk/ext/zip/zip_stream.c
bjoriMon, 20 Dec 2010 11:00:27 + Revision: http://svn.php.net/viewvc?view=revision&revision=306493 Log: Fixed bug#53579 (stream_get_contents() segfaults on ziparchive streams) Also added the filename being access to the stream_get_meta_data() array Bug: http://bugs.php.net/53579 (Assigned) stream_get_contents failed Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/zip/tests/bug53579.phpt U php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c A php/php-src/trunk/ext/zip/tests/bug53579.phpt U php/php-src/trunk/ext/zip/zip_stream.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-20 10:50:59 UTC (rev 306492) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-20 11:00:27 UTC (rev 306493) @@ -81,8 +81,10 @@ . Fixed memory leaked introduced by the NULL poisoning patch (Mateusz Kocielski, Pierre) - Zip extension: + . Added the filename into the return value of stream_get_meta_data(). (Hannes) . Fixed bug #53568 (swapped memset arguments in struct initialization). (crrodriguez at opensuse dot org) + . Fixed bug #53579 (stream_get_contents() segfaults on ziparchive streams) (Hannes) 09 Dec 2010, PHP 5.3.4 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) Added: php/php-src/branches/PHP_5_3/ext/zip/tests/bug53579.phpt === --- php/php-src/branches/PHP_5_3/ext/zip/tests/bug53579.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug53579.phpt2010-12-20 11:00:27 UTC (rev 306493) @@ -0,0 +1,44 @@ +--TEST-- +Bug #53579 (stream_get_contents() segfaults on ziparchive streams) +--SKIPIF-- + +--FILE-- +open($file)) { + exit('failed'); +} +$fp = $zip->getStream('foo'); + +var_dump($fp); +if(!$fp) exit("\n"); +$contents = stream_get_contents($fp); + +fclose($fp); +$zip->close(); +var_dump($contents); + + +$fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb'); +if (!$fp) { + exit("cannot open\n"); +} +$contents = stream_get_contents($fp); +var_dump($contents); +fclose($fp); + +?> +--EXPECTF-- +resource(%d) of type (stream) +string(5) "foo + +" +string(5) "foo + +" Modified: php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c === --- php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c 2010-12-20 10:50:59 UTC (rev 306492) +++ php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c 2010-12-20 11:00:27 UTC (rev 306493) @@ -216,6 +216,7 @@ self->stream = NULL; self->cursor = 0; stream = php_stream_alloc(&php_stream_zipio_ops, self, NULL, mode); + stream->orig_path = estrdup(path); } else { zip_close(stream_za); } Added: php/php-src/trunk/ext/zip/tests/bug53579.phpt === --- php/php-src/trunk/ext/zip/tests/bug53579.phpt (rev 0) +++ php/php-src/trunk/ext/zip/tests/bug53579.phpt 2010-12-20 11:00:27 UTC (rev 306493) @@ -0,0 +1,44 @@ +--TEST-- +Bug #53579 (stream_get_contents() segfaults on ziparchive streams) +--SKIPIF-- + +--FILE-- +open($file)) { + exit('failed'); +} +$fp = $zip->getStream('foo'); + +var_dump($fp); +if(!$fp) exit("\n"); +$contents = stream_get_contents($fp); + +fclose($fp); +$zip->close(); +var_dump($contents); + + +$fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb'); +if (!$fp) { + exit("cannot open\n"); +} +$contents = stream_get_contents($fp); +var_dump($contents); +fclose($fp); + +?> +--EXPECTF-- +resource(%d) of type (stream) +string(5) "foo + +" +string(5) "foo + +" Modified: php/php-src/trunk/ext/zip/zip_stream.c === --- php/php-src/trunk/ext/zip/zip_stream.c 2010-12-20 10:50:59 UTC (rev 306492) +++ php/php-src/trunk/ext/zip/zip_stream.c 2010-12-20 11:00:27 UTC (rev 306493) @@ -216,6 +216,7 @@ self->stream = NULL; self->cursor = 0; stream = php_stream_alloc(&php_stream_zipio_ops, self, NULL, mode); + stream->orig_path = estrdup(path); } else { zip_close(stream_za); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/dba/libflatfile/flatfile.c trunk/ext/dba/libflatfile/flatfile.c
iliaaMon, 20 Dec 2010 23:00:11 + Revision: http://svn.php.net/viewvc?view=revision&revision=306527 Log: Fixed compiler warnings Changed paths: U php/php-src/branches/PHP_5_3/ext/dba/libflatfile/flatfile.c U php/php-src/trunk/ext/dba/libflatfile/flatfile.c Modified: php/php-src/branches/PHP_5_3/ext/dba/libflatfile/flatfile.c === --- php/php-src/branches/PHP_5_3/ext/dba/libflatfile/flatfile.c 2010-12-20 22:32:05 UTC (rev 306526) +++ php/php-src/branches/PHP_5_3/ext/dba/libflatfile/flatfile.c 2010-12-20 23:00:11 UTC (rev 306527) @@ -54,24 +54,24 @@ return 1; } php_stream_seek(dba->fp, 0L, SEEK_END); - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", key_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", key_datum.dsize); php_stream_flush(dba->fp); if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { return -1; } - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", value_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", value_datum.dsize); php_stream_flush(dba->fp); if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { return -1; } } else { /* FLATFILE_REPLACE */ flatfile_delete(dba, key_datum TSRMLS_CC); - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", key_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", key_datum.dsize); php_stream_flush(dba->fp); if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { return -1; } - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", value_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", value_datum.dsize); if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { return -1; } Modified: php/php-src/trunk/ext/dba/libflatfile/flatfile.c === --- php/php-src/trunk/ext/dba/libflatfile/flatfile.c2010-12-20 22:32:05 UTC (rev 306526) +++ php/php-src/trunk/ext/dba/libflatfile/flatfile.c2010-12-20 23:00:11 UTC (rev 306527) @@ -53,24 +53,24 @@ return 1; } php_stream_seek(dba->fp, 0L, SEEK_END); - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", key_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", key_datum.dsize); php_stream_flush(dba->fp); if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { return -1; } - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", value_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", value_datum.dsize); php_stream_flush(dba->fp); if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { return -1; } } else { /* FLATFILE_REPLACE */ flatfile_delete(dba, key_datum TSRMLS_CC); - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", key_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", key_datum.dsize); php_stream_flush(dba->fp); if (php_stream_write(dba->fp, key_datum.dptr, key_datum.dsize) < key_datum.dsize) { return -1; } - php_stream_printf(dba->fp TSRMLS_CC, "%d\n", value_datum.dsize); + php_stream_printf(dba->fp TSRMLS_CC, "%zu\n", value_datum.dsize); if (php_stream_write(dba->fp, value_datum.dptr, value_datum.dsize) < value_datum.dsize) { return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mbstring/ mbstring.c
hirokawa Mon, 20 Dec 2010 14:38:08 + Revision: http://svn.php.net/viewvc?view=revision&revision=306509 Log: fixed compile error with VS2008. Changed paths: U php/php-src/trunk/ext/mbstring/mbstring.c Modified: php/php-src/trunk/ext/mbstring/mbstring.c === --- php/php-src/trunk/ext/mbstring/mbstring.c 2010-12-20 14:29:40 UTC (rev 306508) +++ php/php-src/trunk/ext/mbstring/mbstring.c 2010-12-20 14:38:08 UTC (rev 306509) @@ -1733,10 +1733,10 @@ case 'I': case 'i': { - array_init(return_value); const mbfl_encoding **entry = MBSTRG(http_input_list); const size_t n = MBSTRG(http_input_list_size); size_t i; + array_init(return_value); for (i = 0; i < n; i++) { add_next_index_string(return_value, (*entry)->name, 1); entry++; @@ -4468,9 +4468,9 @@ memcpy(entry, MBSTRG(detect_order_list), sizeof(mbfl_encoding*) * nentries); } else { const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); + size_t i; nentries = MBSTRG(default_detect_order_list_size); entry = (const mbfl_encoding **)safe_emalloc(nentries, sizeof(mbfl_encoding*), 0); - size_t i; for (i = 0; i < nentries; i++) { entry[i] = mbfl_no2encoding(src[i]); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_compile.c
gron Mon, 20 Dec 2010 08:49:59 + Revision: http://svn.php.net/viewvc?view=revision&revision=306489 Log: Removed dead code. # should not have been commited in the first place. Changed paths: U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-12-20 08:45:09 UTC (rev 306488) +++ php/php-src/trunk/Zend/zend_compile.c 2010-12-20 08:49:59 UTC (rev 306489) @@ -3876,7 +3876,6 @@ static void zend_do_traits_property_binding(zend_class_entry *ce TSRMLS_DC) /* {{{ */ { - /* HashTable* resulting_table; */ size_t i; zend_property_info *property_info; zend_property_info *coliding_prop; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php