[PHP-CVS] com php-src: Fix typo in test: ext/pdo_mysql/tests/bug63176.phpt
Commit:cfb1ffb4fa9d8a8561ffa509e187808b09608074 Author:Xinchen Hui Mon, 17 Jun 2013 13:22:20 +0800 Parents: ebef8c417614e90ec1a07366ad540e06532a68ba Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cfb1ffb4fa9d8a8561ffa509e187808b09608074 Log: Fix typo in test Changed paths: M ext/pdo_mysql/tests/bug63176.phpt Diff: diff --git a/ext/pdo_mysql/tests/bug63176.phpt b/ext/pdo_mysql/tests/bug63176.phpt index 392a90b..ee928c0 100644 --- a/ext/pdo_mysql/tests/bug63176.phpt +++ b/ext/pdo_mysql/tests/bug63176.phpt @@ -24,7 +24,7 @@ class ModelA { if ($h) { $this->db = new PDO2(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => true)); } else { - $this->db = new PDO2(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => true)); + $this->db = new PDO3(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => true)); } $this->db->query('SELECT 1')->fetchAll(); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Identation Fixed: netware/start.c
Commit:1498b8260bb53213ded1db242977d75dc60e6545 Author:Jefersson Nathan Mon, 1 Apr 2013 17:17:41 -0300 Committer: Stanislav Malyshev Sun, 16 Jun 2013 18:13:14 -0700 Parents: ee01af7df149da2c511b0f91db2e161eebb2bf58 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1498b8260bb53213ded1db242977d75dc60e6545 Log: Identation Fixed Changed paths: M netware/start.c Diff: diff --git a/netware/start.c b/netware/start.c index 2765ffb..98db3a8 100644 --- a/netware/start.c +++ b/netware/start.c @@ -35,17 +35,17 @@ int DisposeLibraryData( void*data) int _NonAppStart ( - void*NLMHandle, - void*errorScreen, + void*NLMHandle, + void*errorScreen, const char *cmdLine, const char *loadDirPath, size_t uninitializedDataLength, - void*NLMFileHandle, - int (*readRoutineP)( int conn, void *fileHandle, size_t offset, - size_t nbytes, size_t *bytesRead, void *buffer ), + void*NLMFileHandle, + int (*readRoutineP)( int conn, void *fileHandle, size_t offset, + size_t nbytes, size_t *bytesRead, void *buffer ), size_t customDataOffset, size_t customDataSize, - int messageCount, + int messageCount, const char **messages ) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Identation Fixed: netware/start.c
Commit:ebef8c417614e90ec1a07366ad540e06532a68ba Author:Jefersson Nathan Mon, 1 Apr 2013 17:17:41 -0300 Committer: Stanislav Malyshev Sun, 16 Jun 2013 18:13:49 -0700 Parents: ee01af7df149da2c511b0f91db2e161eebb2bf58 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ebef8c417614e90ec1a07366ad540e06532a68ba Log: Identation Fixed Changed paths: M netware/start.c Diff: diff --git a/netware/start.c b/netware/start.c index 2765ffb..8651a6c 100644 --- a/netware/start.c +++ b/netware/start.c @@ -24,7 +24,7 @@ void *gLibHandle = (void *) NULL; rtag_t gAllocTag = (rtag_t) NULL; NXMutex_t *gLibLock = (NXMutex_t *) NULL; -intgLibId = 0; +intgLibId = 0; int DisposeLibraryData(void*data) @@ -35,17 +35,17 @@ int DisposeLibraryData( void*data) int _NonAppStart ( - void*NLMHandle, - void*errorScreen, + void*NLMHandle, + void*errorScreen, const char *cmdLine, const char *loadDirPath, size_t uninitializedDataLength, - void*NLMFileHandle, - int (*readRoutineP)( int conn, void *fileHandle, size_t offset, - size_t nbytes, size_t *bytesRead, void *buffer ), + void*NLMFileHandle, + int (*readRoutineP)( int conn, void *fileHandle, size_t offset, + size_t nbytes, size_t *bytesRead, void *buffer ), size_t customDataOffset, size_t customDataSize, - int messageCount, + int messageCount, const char **messages ) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: NEWS
Commit:a770ae36c2ce25fd576557d63ceb244d80f9289d Author:Stanislav Malyshev Sun, 16 Jun 2013 16:55:18 -0700 Parents: 44822a7166ba17029e682c1fe0be270c2f076f0a ee01af7df149da2c511b0f91db2e161eebb2bf58 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a770ae36c2ce25fd576557d63ceb244d80f9289d Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fix bug #64764: Add status option to fpm init.d script Bugs: https://bugs.php.net/64764 Changed paths: MM NEWS Diff: diff --cc NEWS index 5ac8661,98b2ee0..d10d3f6 --- a/NEWS +++ b/NEWS @@@ -8,9 -8,18 +8,12 @@@ PH . Fixed bug #64936 (doc comments picked up from previous scanner run). (Stas, Jonathan Oddy) . Fixed bug #64934 (Apache2 TS crash with get_browser()). (Anatol) - . Fixed bug #64166 (quoted-printable-encode stream filter incorrectly + . Fixed bug #64166 (quoted-printable-encode stream filter incorrectly discarding whitespace). (Michael M Slusarz) -- DateTime: - . Fixed bug #53437 (Crash when using unserialized DatePeriod instance). -(Gustavo, Derick, Anatol) - + - FPM: - . Fixed Bug #64915 (error_log ignored when daemonize=0). (Remi) + . Implemented FR #64764 (add support for FPM init.d script). (Lior Kaplan) + - PDO: . Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server). (Laruence) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bug #64764: Add status option to fpm init.d script: NEWS sapi/fpm/init.d.php-fpm.in
Commit:ee01af7df149da2c511b0f91db2e161eebb2bf58 Author:Lior Kaplan Thu, 16 May 2013 19:46:53 +0300 Committer: Stanislav Malyshev Sun, 16 Jun 2013 16:54:49 -0700 Parents: 2a93fd134751585630c9fef5280299254099a2da Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee01af7df149da2c511b0f91db2e161eebb2bf58 Log: Fix bug #64764: Add status option to fpm init.d script Bugs: https://bugs.php.net/64764 Changed paths: M NEWS M sapi/fpm/init.d.php-fpm.in Diff: diff --git a/NEWS b/NEWS index bf96674..98b2ee0 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ PHP NEWS - FPM: . Fixed Bug #64915 (error_log ignored when daemonize=0). (Remi) + . Implemented FR #64764 (add support for FPM init.d script). (Lior Kaplan) - PDO: . Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to diff --git a/sapi/fpm/init.d.php-fpm.in b/sapi/fpm/init.d.php-fpm.in index 49cce79..020b942 100644 --- a/sapi/fpm/init.d.php-fpm.in +++ b/sapi/fpm/init.d.php-fpm.in @@ -91,6 +91,20 @@ case "$1" in fi ;; + status) + if [ ! -r $php_fpm_PID ] ; then + echo "php-fpm is stopped" + exit 0 + fi + + PID=`cat $php_fpm_PID` + if ps -p $PID | grep -q $PID; then + echo "php-fpm (pid $PID) is running..." + else + echo "php-fpm dead but pid file exists" + fi + ;; + force-quit) echo -n "Terminating php-fpm " @@ -131,7 +145,7 @@ case "$1" in ;; *) - echo "Usage: $0 {start|stop|force-quit|restart|reload}" + echo "Usage: $0 {start|stop|force-quit|restart|reload|status}" exit 1 ;; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix #64166: quoted-printable-encode stream filter incorrectly discarding whitespace: ext/standard/filters.c ext/standard/tests/streams/bug64166.phpt
Commit:600d6deef9c8983eb8023171c6c5ae90ca60b6c1 Author:Michael M Slusarz Thu, 7 Feb 2013 12:37:52 -0700 Committer: Stanislav Malyshev Sun, 16 Jun 2013 16:04:14 -0700 Parents: 2208447d428542960c73cfeceaf52e95ff0ca2d0 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=600d6deef9c8983eb8023171c6c5ae90ca60b6c1 Log: Fix #64166: quoted-printable-encode stream filter incorrectly discarding whitespace If trailing whitespace on a line is detected, mark the linebreak as a soft linebreak. Bugs: https://bugs.php.net/64166 Changed paths: M ext/standard/filters.c A ext/standard/tests/streams/bug64166.phpt Diff: diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 084860c..21e165b 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -791,6 +791,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins unsigned int line_ccnt; unsigned int lb_ptr; unsigned int lb_cnt; + unsigned int prev_ws; int opts; static char qp_digits[] = "0123456789ABCDEF"; @@ -807,6 +808,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins icnt = *in_left_p; pd = (unsigned char *)(*out_pp); ocnt = *out_left_p; + prev_ws = 0; for (;;) { if (!(opts & PHP_CONV_QPRINT_OPT_BINARY) && inst->lbchars != NULL && inst->lbchars_len > 0) { @@ -825,6 +827,14 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins break; } + /* If the character(s) immediately before the line break +* is whitespace, need to convert to soft linebreak to +* preserve that data. */ + if (prev_ws > 0) { + *(pd++) = '='; + ocnt--; + } + for (i = 0; i < lb_cnt; i++) { *(pd++) = inst->lbchars[i]; ocnt--; @@ -842,6 +852,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins } c = NEXT_CHAR(ps, icnt, lb_ptr, lb_cnt, inst->lbchars); + prev_ws = 0; if (!(opts & PHP_CONV_QPRINT_OPT_BINARY) && (c == '\t' || c == ' ')) { if (line_ccnt < 2 && inst->lbchars != NULL) { @@ -866,6 +877,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins *(pd++) = c; ocnt--; line_ccnt--; + prev_ws = 1; CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt); } } else if ((!(opts & PHP_CONV_QPRINT_OPT_FORCE_ENCODE_FIRST) || line_ccnt < inst->line_len) && ((c >= 33 && c <= 60) || (c >= 62 && c <= 126))) { diff --git a/ext/standard/tests/streams/bug64166.phpt b/ext/standard/tests/streams/bug64166.phpt new file mode 100644 index 000..b9a7a05 --- /dev/null +++ b/ext/standard/tests/streams/bug64166.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #64166: quoted-printable-encode stream filter incorrectly discarding whitespace +--FILE-- + "\n", + 'line-length' => 7 +)); +var_dump(stream_get_contents($fd, -1, 0)); + +stream_filter_remove($res); + +rewind($fd); +stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ, array( + 'line-break-chars' => "\n", + 'line-length' => 6 +)); +var_dump(stream_get_contents($fd, -1, 0)); +?> +--EXPECT-- +string(14) "FIRST = +SECOND" +string(18) "FIRST= + = +SECON= +D" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: update NEWS: NEWS
Commit:44822a7166ba17029e682c1fe0be270c2f076f0a Author:Stanislav Malyshev Sun, 16 Jun 2013 16:41:23 -0700 Parents: d44daff4d0010b693b5b808ecf440f4ab6ea408b Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=44822a7166ba17029e682c1fe0be270c2f076f0a Log: update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index b3117ad..5ac8661 100644 --- a/NEWS +++ b/NEWS @@ -5,7 +5,11 @@ PHP NEWS - Core: . Fixed bug #64988 (Class loading order affects E_STRICT warning). (Laruence) . Fixed bug #64966 (segfault in zend_do_fcall_common_helper_SPEC). (Laruence) + . Fixed bug #64936 (doc comments picked up from previous scanner run). (Stas, +Jonathan Oddy) . Fixed bug #64934 (Apache2 TS crash with get_browser()). (Anatol) + . Fixed bug #64166 (quoted-printable-encode stream filter incorrectly +discarding whitespace). (Michael M Slusarz) - PDO: . Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix #64166: quoted-printable-encode stream filter incorrectly discarding whitespace: ext/standard/filters.c ext/standard/tests/streams/bug64166.phpt
Commit:b5b0a53b09776f74ab4ddf6b9468ab1b41267ab5 Author:Michael M Slusarz Sun, 24 Feb 2013 18:34:35 -0700 Committer: Stanislav Malyshev Sun, 16 Jun 2013 16:04:19 -0700 Parents: 600d6deef9c8983eb8023171c6c5ae90ca60b6c1 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b5b0a53b09776f74ab4ddf6b9468ab1b41267ab5 Log: Fix #64166: quoted-printable-encode stream filter incorrectly discarding whitespace Second attempt: need to use lookaheadto determine whether to encode ws Bugs: https://bugs.php.net/64166 Changed paths: M ext/standard/filters.c M ext/standard/tests/streams/bug64166.phpt Diff: diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 21e165b..99a39be 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -791,7 +791,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins unsigned int line_ccnt; unsigned int lb_ptr; unsigned int lb_cnt; - unsigned int prev_ws; + unsigned int trail_ws; int opts; static char qp_digits[] = "0123456789ABCDEF"; @@ -808,7 +808,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins icnt = *in_left_p; pd = (unsigned char *)(*out_pp); ocnt = *out_left_p; - prev_ws = 0; + trail_ws = 0; for (;;) { if (!(opts & PHP_CONV_QPRINT_OPT_BINARY) && inst->lbchars != NULL && inst->lbchars_len > 0) { @@ -827,14 +827,6 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins break; } - /* If the character(s) immediately before the line break -* is whitespace, need to convert to soft linebreak to -* preserve that data. */ - if (prev_ws > 0) { - *(pd++) = '='; - ocnt--; - } - for (i = 0; i < lb_cnt; i++) { *(pd++) = inst->lbchars[i]; ocnt--; @@ -852,9 +844,10 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins } c = NEXT_CHAR(ps, icnt, lb_ptr, lb_cnt, inst->lbchars); - prev_ws = 0; - if (!(opts & PHP_CONV_QPRINT_OPT_BINARY) && (c == '\t' || c == ' ')) { + if (!(opts & PHP_CONV_QPRINT_OPT_BINARY) && + (trail_ws == 0) && + (c == '\t' || c == ' ')) { if (line_ccnt < 2 && inst->lbchars != NULL) { if (ocnt < inst->lbchars_len + 1) { err = PHP_CONV_ERR_TOO_BIG; @@ -874,11 +867,41 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins err = PHP_CONV_ERR_TOO_BIG; break; } - *(pd++) = c; - ocnt--; - line_ccnt--; - prev_ws = 1; - CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt); + + /* Check to see if this is EOL whitespace. */ + if (inst->lbchars != NULL) { + unsigned int j, lb_cnt2; + lb_cnt2 = 0; + unsigned char *ps2; + ps2 = ps; + trail_ws = 1; + + for (j = icnt - 1; j > 0; j--, ps2++) { + if (*ps2 == inst->lbchars[lb_cnt2]) { + lb_cnt2++; + if (lb_cnt2 >= inst->lbchars_len) { + /* Found trailing ws. Reset to top of main +* for loop to allow for code to do necessary +* wrapping/encoding. */ + break; + } + } else if (lb_cnt2 != 0 || (*ps2 != '\t' && *ps2 != ' ')) { + /* At least one non-EOL character following, so +
[PHP-CVS] com php-src: trailing ws: ext/standard/filters.c
Commit:d9c034ee5e561e824a30829a474ef7b7dd18f19e Author:Michael M Slusarz Mon, 18 Mar 2013 12:02:54 -0600 Committer: Stanislav Malyshev Sun, 16 Jun 2013 16:04:24 -0700 Parents: b5b0a53b09776f74ab4ddf6b9468ab1b41267ab5 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d9c034ee5e561e824a30829a474ef7b7dd18f19e Log: trailing ws Changed paths: M ext/standard/filters.c Diff: diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 99a39be..aa4be5c 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -771,7 +771,7 @@ static void php_conv_qprint_encode_dtor(php_conv_qprint_encode *inst) } #define NEXT_CHAR(ps, icnt, lb_ptr, lb_cnt, lbchars) \ - ((lb_ptr) < (lb_cnt) ? (lbchars)[(lb_ptr)] : *(ps)) + ((lb_ptr) < (lb_cnt) ? (lbchars)[(lb_ptr)] : *(ps)) #define CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt) \ if ((lb_ptr) < (lb_cnt)) { \ @@ -841,7 +841,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins if (lb_ptr >= lb_cnt && icnt <= 0) { break; - } + } c = NEXT_CHAR(ps, icnt, lb_ptr, lb_cnt, inst->lbchars); @@ -903,7 +903,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt); } } - } else if ((!(opts & PHP_CONV_QPRINT_OPT_FORCE_ENCODE_FIRST) || line_ccnt < inst->line_len) && ((c >= 33 && c <= 60) || (c >= 62 && c <= 126))) { + } else if ((!(opts & PHP_CONV_QPRINT_OPT_FORCE_ENCODE_FIRST) || line_ccnt < inst->line_len) && ((c >= 33 && c <= 60) || (c >= 62 && c <= 126))) { if (line_ccnt < 2 && inst->lbchars != NULL) { if (ocnt < inst->lbchars_len + 1) { err = PHP_CONV_ERR_TOO_BIG; @@ -947,7 +947,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins } *(pd++) = '='; *(pd++) = qp_digits[(c >> 4)]; - *(pd++) = qp_digits[(c & 0x0f)]; + *(pd++) = qp_digits[(c & 0x0f)]; ocnt -= 3; line_ccnt -= 3; trail_ws--; @@ -958,7 +958,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins *in_pp = (const char *)ps; *in_left_p = icnt; *out_pp = (char *)pd; - *out_left_p = ocnt; + *out_left_p = ocnt; inst->line_ccnt = line_ccnt; inst->lb_ptr = lb_ptr; inst->lb_cnt = lb_cnt; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Move unsigned char declaration to top of block: ext/standard/filters.c
Commit:0dc98208ee0c7b372c8c81e5d2d833974e001f83 Author:Michael M Slusarz Mon, 18 Mar 2013 12:03:11 -0600 Committer: Stanislav Malyshev Sun, 16 Jun 2013 16:04:29 -0700 Parents: d9c034ee5e561e824a30829a474ef7b7dd18f19e Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0dc98208ee0c7b372c8c81e5d2d833974e001f83 Log: Move unsigned char declaration to top of block Changed paths: M ext/standard/filters.c Diff: diff --git a/ext/standard/filters.c b/ext/standard/filters.c index aa4be5c..0a59039 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -870,9 +870,10 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins /* Check to see if this is EOL whitespace. */ if (inst->lbchars != NULL) { + unsigned char *ps2; unsigned int j, lb_cnt2; + lb_cnt2 = 0; - unsigned char *ps2; ps2 = ps; trail_ws = 1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: news for #64166: NEWS
Commit:2a93fd134751585630c9fef5280299254099a2da Author:Stanislav Malyshev Sun, 16 Jun 2013 16:40:39 -0700 Parents: 7bb052ee3e93790f4d9654958ab11d90f6e4734d Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2a93fd134751585630c9fef5280299254099a2da Log: news for #64166 Bugs: https://bugs.php.net/64166 Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 2bdcb58..bf96674 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ PHP NEWS . Fixed bug #64936 (doc comments picked up from previous scanner run). (Stas, Jonathan Oddy) . Fixed bug #64934 (Apache2 TS crash with get_browser()). (Anatol) + . Fixed bug #64166 (quoted-printable-encode stream filter incorrectly +discarding whitespace). (Michael M Slusarz) - DateTime: . Fixed bug #53437 (Crash when using unserialized DatePeriod instance). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: add more tests for bug #64166: ext/standard/tests/streams/bug64166_2.phpt ext/standard/tests/streams/bug64166_3.phpt
Commit:7bb052ee3e93790f4d9654958ab11d90f6e4734d Author:Stanislav Malyshev Sun, 16 Jun 2013 16:34:34 -0700 Parents: 0dc98208ee0c7b372c8c81e5d2d833974e001f83 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7bb052ee3e93790f4d9654958ab11d90f6e4734d Log: add more tests for bug #64166 Bugs: https://bugs.php.net/64166 Changed paths: A ext/standard/tests/streams/bug64166_2.phpt A ext/standard/tests/streams/bug64166_3.phpt Diff: diff --git a/ext/standard/tests/streams/bug64166_2.phpt b/ext/standard/tests/streams/bug64166_2.phpt new file mode 100644 index 000..9d6655d --- /dev/null +++ b/ext/standard/tests/streams/bug64166_2.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #64166: quoted-printable-encode stream filter incorrectly discarding whitespace - split reads +--FILE-- + "\n", + 'line-length' => 74 +)); +$str = ""; +while(($c = fread($fd, 1))!= "") $str .= $c; +var_dump($str); + +stream_filter_remove($res); + +rewind($fd); +stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ, array( + 'line-break-chars' => "\n", + 'line-length' => 6 +)); +$str = ""; +while(($c = fread($fd, 1))!= "") $str .= $c; +var_dump($str); + +fclose($fd); +} + +test_64166("FIRST \nSECOND"); +test_64166("FIRST \nSECOND"); + +?> +--EXPECT-- +string(15) "FIRST=20 +SECOND" +string(19) "FIRST= +=20 +SECON= +D" +string(18) "FIRST=20=20 +SECOND" +string(24) "FIRST= +=20= +=20 +SECON= +D" diff --git a/ext/standard/tests/streams/bug64166_3.phpt b/ext/standard/tests/streams/bug64166_3.phpt new file mode 100644 index 000..d896ba8 --- /dev/null +++ b/ext/standard/tests/streams/bug64166_3.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #64166: quoted-printable-encode stream filter incorrectly discarding whitespace - writes +--FILE-- + "\n", + 'line-length' => 74 +)); +fwrite($fd, $data); +rewind($fd); + +var_dump(stream_get_contents($fd, -1, 0)); + +stream_filter_remove($res); + +rewind($fd); +stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_WRITE, array( + 'line-break-chars' => "\n", + 'line-length' => 6 +)); +fwrite($fd, $data); +rewind($fd); +var_dump(stream_get_contents($fd, -1, 0)); + +fclose($fd); +} + +test_64166("FIRST \nSECOND"); +test_64166("FIRST \nSECOND"); + +?> +--EXPECT-- +string(15) "FIRST=20 +SECOND" +string(19) "FIRST= +=20 +SECON= +D" +string(18) "FIRST=20=20 +SECOND" +string(24) "FIRST= +=20= +=20 +SECON= +D" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: ws fix: NEWS
Commit:088c18363938a3eaa4a349442240df9994213cee Author:Stanislav Malyshev Sun, 16 Jun 2013 14:08:58 -0700 Parents: b6dd1ec60da4a5a46d17b0f3cfe06faf0f965002 Branches: PHP-5.4 PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=088c18363938a3eaa4a349442240df9994213cee Log: ws fix Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index f8d3d78..add131c 100644 --- a/NEWS +++ b/NEWS @@ -62,7 +62,7 @@ PHP NEWS Type=notify in the systemd unit file. (Remi) - MySQLi - . Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB + . Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB pointer has closed). (Laruence) - Phar -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: fix test: ext/standard/tests/strings/bug36306.phpt
Commit:b6dd1ec60da4a5a46d17b0f3cfe06faf0f965002 Author:Anatol Belski Mon, 17 Jun 2013 00:09:05 +0200 Parents: 49e57a31659a82443b9413127f8d58a72f09ed5b Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b6dd1ec60da4a5a46d17b0f3cfe06faf0f965002 Log: fix test breach introduced in ac40c0b562b0f90652cadef83968d7305626c377 Changed paths: M ext/standard/tests/strings/bug36306.phpt Diff: diff --git a/ext/standard/tests/strings/bug36306.phpt b/ext/standard/tests/strings/bug36306.phpt index 4527ea0..6317c97 100644 --- a/ext/standard/tests/strings/bug36306.phpt +++ b/ext/standard/tests/strings/bug36306.phpt @@ -12,4 +12,4 @@ Bug #36306 (crc32() 64bit) echo dechex(crc32("platform independent")) . "\n"; ?> --EXPECT-- -ccd9fe66 +cbd056ba -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server): NEWS ext/pdo/pdo_dbh.c ext/pdo_mysql/tests/bug63176.phpt
Hi Laruence 2013/6/16 Xinchen Hui : > + if ($h) { > + $this->db = new PDO2(PDO_MYSQL_TEST_DSN, > PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => > true)); > + } else { > + $this->db = new PDO2(PDO_MYSQL_TEST_DSN, > PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => > true)); > + } Shouldn't this be PDO3, in the else, or did I miss something? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server): NEWS ext/pdo/pdo_dbh.c ext/pdo_mysql/tests/bug63176.phpt
Commit:49e57a31659a82443b9413127f8d58a72f09ed5b Author:Xinchen Hui Sun, 16 Jun 2013 22:55:59 +0800 Parents: 7457867ba8c46e276d2bcb6e47766a9f5abb0c79 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=49e57a31659a82443b9413127f8d58a72f09ed5b Log: Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server) Bugs: https://bugs.php.net/63176 Changed paths: M NEWS M ext/pdo/pdo_dbh.c A ext/pdo_mysql/tests/bug63176.phpt Diff: diff --git a/NEWS b/NEWS index d9634ff..f8d3d78 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,10 @@ PHP NEWS - FPM: . Fixed Bug #64915 (error_log ignored when daemonize=0). (Remi) +- PDO: + . Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to +the same db server). (Laruence) + - PDO_DBlib: . Fixed bug #63638 (Cannot connect to SQL Server 2008 with PDO dblib). (Stanley Sufficool) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index e6265f5..25db684 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -338,6 +338,9 @@ static PHP_METHOD(PDO, dbh_constructor) if (pdbh->std.properties) { zend_hash_destroy(dbh->std.properties); efree(dbh->std.properties); + if (dbh->std.properties_table) { + efree(dbh->std.properties_table); + } } else { pdbh->std.ce = dbh->std.ce; pdbh->def_stmt_ce = dbh->def_stmt_ce; @@ -1575,6 +1578,7 @@ static void pdo_dbh_free_storage(pdo_dbh_t *dbh TSRMLS_DC) } zend_object_std_dtor(&dbh->std TSRMLS_CC); dbh->std.properties = NULL; + dbh->std.properties_table = NULL; dbh_free(dbh TSRMLS_CC); } diff --git a/ext/pdo_mysql/tests/bug63176.phpt b/ext/pdo_mysql/tests/bug63176.phpt new file mode 100644 index 000..392a90b --- /dev/null +++ b/ext/pdo_mysql/tests/bug63176.phpt @@ -0,0 +1,54 @@ +--TEST-- +Bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server) +--SKIPIF-- + +--FILE-- +db = new PDO2(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => true)); + } else { + $this->db = new PDO2(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => true)); + } + $this->db->query('SELECT 1')->fetchAll(); + } +} + +$a = new ModelA(true); +$b = new ModelA(false); + +var_dump($a); +var_dump($b); +--EXPECTF-- +bool(true) +bool(false) +object(ModelA)#%d (1) { + ["db"]=> + object(PDO2)#%d (1) { +["transLevel":protected]=> +NULL + } +} +object(ModelA)#%d (1) { + ["db"]=> + object(PDO2)#%d (1) { +["transLevel":protected]=> +NULL + } +} -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update NEWS: NEWS
Commit:e3e4ec3f5569bcca5ed6ee784889e6b908c77374 Author:Xinchen Hui Sun, 16 Jun 2013 22:56:47 +0800 Parents: 6cd6349ff8842a9356723b7b192eb3c93fb64c7e Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e3e4ec3f5569bcca5ed6ee784889e6b908c77374 Log: Update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 757e918..b3117ad 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ PHP NEWS . Fixed bug #64966 (segfault in zend_do_fcall_common_helper_SPEC). (Laruence) . Fixed bug #64934 (Apache2 TS crash with get_browser()). (Anatol) +- PDO: + . Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to +the same db server). (Laruence) + - SPL: . Fixed bug #64997 (Segfault while using RecursiveIteratorIterator on 64-bits systems). (Laruence) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php