[PHP-CVS] com php-src: Update NEWS file: NEWS
Commit:f42a2577114619b6c45746a290336ec753fb2159 Author:Pierrick Charron Wed, 24 Apr 2013 13:26:34 -0400 Parents: cf9db2154e3078060f7113d7e9bfeeaf985b94c8 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f42a2577114619b6c45746a290336ec753fb2159 Log: Update NEWS file Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 6904b78..ddac905 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ PHP NEWS . Fixed bug #64677 (execution operator `` stealing surrounding arguments). (Laruence) +- CURL: + . Remove curl stream wrappers. (Pierrick) + - Zip: . Fixed bug #64342 (ZipArchive::addFile() has to check for file existence). (Anatol) -- 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.5': ext/curl/interface.c
Commit:74394733ed36f642fa52e10b73284e3ad2d32325 Author:Pierrick Charron Tue, 23 Apr 2013 17:01:50 -0400 Parents: 302de03a5abb5e51345cbc1a4074987e4680cbc0 b79e65f268d8f368a1088313735eda3ca485fa53 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=74394733ed36f642fa52e10b73284e3ad2d32325 Log: Merge branch 'PHP-5.5' * PHP-5.5: Remove curl wrappers Changed paths: MM ext/curl/interface.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Improve resource management for curl handle: ext/curl/interface.c ext/curl/multi.c ext/curl/php_curl.h
Commit:f85e5950ab4552799c119cd1d23617535ed19e61 Author:Pierrick Charron Sat, 5 Jan 2013 11:07:59 -0500 Parents: c4f2a20f150c6e2b453cdd16f5ca1715ab150f7a Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f85e5950ab4552799c119cd1d23617535ed19e61 Log: Improve resource management for curl handle Previous implementation was using its own refcounting (uses field of the php_curl struct). zend_list_add/remove already implements its own refcount, so we don't need to use an other one. Changed paths: M ext/curl/interface.c M ext/curl/multi.c M ext/curl/php_curl.h Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index e0c95ef..2e05581 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1952,8 +1952,6 @@ PHP_FUNCTION(curl_init) ch->handlers->read->method = PHP_CURL_DIRECT; ch->handlers->write_header->method = PHP_CURL_IGNORE; - ch->uses = 0; - MAKE_STD_ZVAL(clone); ch->clone = clone; @@ -1995,8 +1993,7 @@ PHP_FUNCTION(curl_copy_handle) TSRMLS_SET_CTX(dupch->thread_ctx); dupch->cp = cp; - dupch->uses = 0; - ch->uses++; + zend_list_addref(Z_LVAL_P(zid)); if (ch->handlers->write->stream) { Z_ADDREF_P(ch->handlers->write->stream); } @@ -3210,11 +3207,7 @@ PHP_FUNCTION(curl_close) return; } - if (ch->uses) { - ch->uses--; - } else { - zend_list_delete(Z_LVAL_P(zid)); - } + zend_list_delete(Z_LVAL_P(zid)); } /* }}} */ diff --git a/ext/curl/multi.c b/ext/curl/multi.c index d84669a..af78651 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -86,7 +86,6 @@ PHP_FUNCTION(curl_multi_add_handle) ZEND_FETCH_RESOURCE(ch, php_curl *, &z_ch, -1, le_curl_name, le_curl); _php_curl_cleanup_handle(ch); - ch->uses++; /* we want to create a copy of this zval that we store in the multihandle structure element "easyh" */ tmp_val = *z_ch; @@ -113,11 +112,7 @@ void _php_curl_multi_cleanup_list(void *data) /* {{{ */ return; } - if (ch->uses) { - ch->uses--; - } else { - zend_list_delete(Z_LVAL_P(z_ch)); - } + zend_list_delete(Z_LVAL_P(z_ch)); } /* }}} */ @@ -146,12 +141,12 @@ PHP_FUNCTION(curl_multi_remove_handle) ZEND_FETCH_RESOURCE(mh, php_curlm *, &z_mh, -1, le_curl_multi_handle_name, le_curl_multi_handle); ZEND_FETCH_RESOURCE(ch, php_curl *, &z_ch, -1, le_curl_name, le_curl); - --ch->uses; + + RETVAL_LONG((long) curl_multi_remove_handle(mh->multi, ch->cp)); zend_llist_del_element( &mh->easyh, &z_ch, (int (*)(void *, void *)) curl_compare_resources ); - - RETURN_LONG((long) curl_multi_remove_handle(mh->multi, ch->cp)); + } /* }}} */ diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 5c24fc1..a8c26c0 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -169,7 +169,6 @@ typedef struct { CURL*cp; php_curl_handlers *handlers; long id; - unsigned int uses; zend_boolin_callback; zval *clone; } php_curl; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Remove passwd handler from struct when not needed: ext/curl/interface.c ext/curl/php_curl.h
Commit:343a9199bbbf4f63b02099ceef27ef9881d8aa9f Author:Pierrick Charron Tue, 1 Jan 2013 21:12:02 -0500 Parents: a666285bc2488b7f7362368c388e41428610ad1d Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=343a9199bbbf4f63b02099ceef27ef9881d8aa9f Log: Remove passwd handler from struct when not needed CURLOPT_PASSWDFUNCTION was removed in cURL 7.15.5, the passwd field will not be used for version greater than this one Changed paths: M ext/curl/interface.c M ext/curl/php_curl.h Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 125094c..e0c95ef 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -3267,9 +3267,11 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC) if (ch->handlers->write_header->func_name) { zval_ptr_dtor(&ch->handlers->write_header->func_name); } +#if CURLOPT_PASSWDFUNCTION != 0 if (ch->handlers->passwd) { zval_ptr_dtor(&ch->handlers->passwd); } +#endif if (ch->handlers->std_err) { zval_ptr_dtor(&ch->handlers->std_err); } diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 3ae7060..5c24fc1 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -135,7 +135,9 @@ typedef struct { php_curl_write *write; php_curl_write *write_header; php_curl_read *read; +#if CURLOPT_PASSWDFUNCTION != 0 zval *passwd; +#endif zval *std_err; php_curl_progress *progress; #if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc): NEWS Zend/zend_highlight.c ext/standard/tests/strings/bug63874.phpt
Commit:8228597ecce3ad868d2c6bfca5ff43f29e014296 Author:Pierrick Charron Sat, 29 Dec 2012 23:11:37 -0500 Parents: f8a9a47e8cde62a082a54371c08eedb4c1366b77 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8228597ecce3ad868d2c6bfca5ff43f29e014296 Log: Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc) T_END_HEREDOC don't carry a token value anymore since commit 4cf90e06c Bugfix by Nikita for bug #60097 Bugs: https://bugs.php.net/63874 https://bugs.php.net/60097 Changed paths: M NEWS M Zend/zend_highlight.c A ext/standard/tests/strings/bug63874.phpt Diff: diff --git a/NEWS b/NEWS index b67276a..2d0b4c3 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ PHP NEWS ?? ??? 201?, PHP 5.5.0 Alpha 3 - General improvements: + . Fixed bug #63874 (Segfault if php_strip_whitespace has heredoc). (Pierrick) . Fixed bug #63822 (Crash when using closures with ArrayAccess). (Nikita Popov) . Add Generator::throw() method. (Nikita Popov) diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index 938e1c6..7fe6174 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -186,7 +186,6 @@ ZEND_API void zend_strip(TSRMLS_D) case T_END_HEREDOC: zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); - efree(token.value.str.val); /* read the following character, either newline or ; */ if (lex_scan(&token TSRMLS_CC) != T_WHITESPACE) { zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); diff --git a/ext/standard/tests/strings/bug63874.phpt b/ext/standard/tests/strings/bug63874.phpt new file mode 100644 index 000..066cc15 --- /dev/null +++ b/ext/standard/tests/strings/bug63874.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #63874 (Segfault if php_strip_whitespace has heredoc) +--FILE-- + +--EXPECT-- + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add new curl options: NEWS ext/curl/interface.c
Commit:722b8fb80eb3a4a5f8fa5e8dd91456148e1f755a Author:Pierrick Charron Fri, 28 Dec 2012 00:51:04 -0500 Parents: 8b67981b678b41627141e65b04c24337814b2874 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=722b8fb80eb3a4a5f8fa5e8dd91456148e1f755a Log: Add new curl options Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION, CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE, CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL. Changed paths: M NEWS M ext/curl/interface.c Diff: diff --git a/NEWS b/NEWS index b8fb42b..b67276a 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,9 @@ PHP NEWS . Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror curl_pause, curl_reset, curl_share_close, curl_share_init, curl_share_setopt curl_strerror and curl_unescape. (Pierrick) + . Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION, +CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE, + CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL. (Pierrick) 18 Dec 2012, PHP 5.5.0 Alpha 2 diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 063639e..7d9b55c 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -690,6 +690,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYHOST); REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER); REGISTER_CURL_CONSTANT(CURLOPT_STDERR); + REGISTER_CURL_CONSTANT(CURLOPT_TELNETOPTIONS); REGISTER_CURL_CONSTANT(CURLOPT_TIMECONDITION); REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT); REGISTER_CURL_CONSTANT(CURLOPT_TIMEVALUE); @@ -732,6 +733,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_BINARY); REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_STOR_FILE); REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_USE_REST); + REGISTER_CURL_CONSTANT(CURLE_FTP_PARTIAL_FILE); REGISTER_CURL_CONSTANT(CURLE_FTP_PORT_FAILED); REGISTER_CURL_CONSTANT(CURLE_FTP_QUOTE_ERROR); REGISTER_CURL_CONSTANT(CURLE_FTP_USER_PASSWORD_INCORRECT); @@ -1156,12 +1158,24 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_TRANSFER_ENCODING); #endif +#if LIBCURL_VERSION_NUM >= 0x071600 /* Available since 7.22.0 */ + REGISTER_CURL_CONSTANT(CURLGSSAPI_DELEGATION_FLAG); + REGISTER_CURL_CONSTANT(CURLGSSAPI_DELEGATION_POLICY_FLAG); + REGISTER_CURL_CONSTANT(CURLOPT_GSSAPI_DELEGATION); +#endif + #if LIBCURL_VERSION_NUM >= 0x071800 /* Available since 7.24.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_ACCEPTTIMEOUT_MS); REGISTER_CURL_CONSTANT(CURLOPT_DNS_SERVERS); #endif #if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */ REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH); + REGISTER_CURL_CONSTANT(CURLOPT_SSL_OPTIONS); + REGISTER_CURL_CONSTANT(CURLOPT_TCP_KEEPALIVE); + REGISTER_CURL_CONSTANT(CURLOPT_TCP_KEEPIDLE); + REGISTER_CURL_CONSTANT(CURLOPT_TCP_KEEPINTVL); + REGISTER_CURL_CONSTANT(CURLSSLOPT_ALLOW_BEAST); #endif #if CURLOPT_FTPASCII != 0 @@ -2210,6 +2224,18 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #if LIBCURL_VERSION_NUM >= 0x071504 /* Available since 7.21.4 */ case CURLOPT_TLSAUTH_TYPE: #endif +#if LIBCURL_VERSION_NUM >= 0x071600 /* Available since 7.22.0 */ + case CURLOPT_GSSAPI_DELEGATION: +#endif +#if LIBCURL_VERSION_NUM >= 0x071800 /* Available since 7.24.0 */ + case CURLOPT_ACCEPTTIMEOUT_MS: +#endif +#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */ + case CURLOPT_SSL_OPTIONS: + case CURLOPT_TCP_KEEPALIVE: + case CURLOPT_TCP_KEEPIDLE: + case CURLOPT_TCP_KEEPINTVL: +#endif #if CURLOPT_MUTE != 0 case CURLOPT_MUTE: #endif @@ -2416,6 +2442,7 @@ string_copy: case CURLOPT_POSTQUOTE: case CURLOPT_PREQUOTE: case CURLOPT_QUOTE: + case CURLOPT_TELNETOPTIONS: #if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ case CURLOPT_MAIL_RCPT: #endif @@ -2446,6 +2473,9 @@ string_copy: case CURLOPT_PREQUOTE: name = "CURLOPT_PREQUOTE"; break; + case CURLOPT_TELNETOPTIONS: + name = "CURLOPT_TELNETOPTIONS"; + break; #if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ case CURLOPT_MAIL_RCPT: name = "
[PHP-CVS] com php-src: Fixed #63859 Memory leak when reusing curl-handle: NEWS ext/curl/interface.c
Commit:ac3d227e28056bf5294a8a64e2f41ce2beebaa05 Author:Pierrick Charron Thu, 27 Dec 2012 13:31:55 -0500 Parents: 663434cd764b6030a4d9e6b565e0fff9eaa6a66c Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ac3d227e28056bf5294a8a64e2f41ce2beebaa05 Log: Fixed #63859 Memory leak when reusing curl-handle When CURLOPT_POSTFIELDS is called more than once on the same curl handle, php/curl did not free the memory of the previous post data. This commit will fix the problem unless the curl handle was previously duplicated using the curl_copy_handle() function in which case we can not know if the post data is still in use or not by any curl handle Bugs: https://bugs.php.net/63859 Changed paths: M NEWS M ext/curl/interface.c Diff: diff --git a/NEWS b/NEWS index 208af93..164daeb 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ PHP NEWS - cURL extension: . Fixed bug (segfault due to libcurl connection caching). (Pierrick) + . Fixed bug #63859 (Memory leak when reusing curl-handle). (Pierrick) . Fixed bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST). (Pierrick) . Fixed bug #63352 (Can't enable hostname validation when using curl stream diff --git a/ext/curl/interface.c b/ext/curl/interface.c index a23f859..55102da 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2131,6 +2131,9 @@ string_copy: return 1; } + if (Z_REFCOUNT_P(ch->clone) <= 1) { + zend_llist_clean(&ch->to_free->post); + } zend_llist_add_element(&ch->to_free->post, &first); error = curl_easy_setopt(ch->cp, CURLOPT_HTTPPOST, first); -- 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: ext/curl/interface.c
Commit:8b67981b678b41627141e65b04c24337814b2874 Author:Pierrick Charron Thu, 27 Dec 2012 13:37:11 -0500 Parents: 61afb2bb8f3104b056b2f2db6acf4f6bafbf64c8 ac3d227e28056bf5294a8a64e2f41ce2beebaa05 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8b67981b678b41627141e65b04c24337814b2874 Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fixed #63859 Memory leak when reusing curl-handle Bugs: https://bugs.php.net/63859 Changed paths: MM ext/curl/interface.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Revert "Remove a useless memory write in zend_llist_del_element": Zend/zend_llist.c
Commit:b35ffdeae10eb1b71470eb831c02b3b7b838945d Author:Pierrick Charron Wed, 26 Dec 2012 10:13:56 -0500 Parents: fad960a4045da86cdbd8308a165ffc47892f05b9 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b35ffdeae10eb1b71470eb831c02b3b7b838945d Log: Revert "Remove a useless memory write in zend_llist_del_element" This reverts commit fad960a4045da86cdbd8308a165ffc47892f05b9 as required by Stas and Christopher Changed paths: M Zend/zend_llist.c Diff: diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c index 26baf4d..4656420 100644 --- a/Zend/zend_llist.c +++ b/Zend/zend_llist.c @@ -91,13 +91,15 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element) ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2)) { zend_llist_element *current=l->head; + zend_llist_element *next; while (current) { + next = current->next; if (compare(current->data, element)) { DEL_LLIST_ELEMENT(current, l); break; } - current = current->next; + current = next; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Remove a useless memory write in zend_llist_del_element: Zend/zend_llist.c
Sorry about that. I thought it was a small change safe enough to be committed without asking to the list but apparently I was wrong. I'm going to revert it right now on 5.3 and 5.4, but just for my personnel knowledge, could you tell me what kind of problem this change can introduce ? Thanks Pierrick On 26 December 2012 01:31, Stas Malyshev wrote: > Hi! > >> >> >> On 12/25/2012 05:45 PM, Pierrick Charron wrote: >>> Commit:fad960a4045da86cdbd8308a165ffc47892f05b9 >>> Author:Pierrick Charron Tue, 25 Dec 2012 >>> 20:45:24 -0500 >>> Parents: a2b6d9c1047a4e5f3419ebc3489a66d62aa12d07 >>> Branches: PHP-5.3 PHP-5.4 PHP-5.5 master >>> >>> Link: >>> http://git.php.net/?p=php-src.git;a=commitdiff;h=fad960a4045da86cdbd8308a165ffc47892f05b9 >>> >>> Log: >>> Remove a useless memory write in zend_llist_del_element >>> >>> The zend_llist_element *next pointer is not necessary and removing >>> it will also remove a write on memory >> >> Was this really worth potentially destabilizing 5.3 to change? Or even 5.4? > > I don't think so. And BTW, why no asking maintainers about this? It's > not even a bug fix as far as I can see. Could you please do it in 5.5+? > > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix ext/curl tests to work on every libcurl versions: ext/curl/tests/curl_multi_setopt_basic001.phpt ext/curl/tests/curl_multi_strerror_001.phpt ext/curl/tests/curl_share_setopt
Commit:8456cef1dbcb6c5a5690ce4553063ad18874f0b1 Author:Pierrick Charron Wed, 26 Dec 2012 00:43:37 -0500 Parents: 5a97c30efe6064692f3d5c33f212e3b96c9228da Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8456cef1dbcb6c5a5690ce4553063ad18874f0b1 Log: Fix ext/curl tests to work on every libcurl versions Thanks Laruence :) Changed paths: M ext/curl/tests/curl_multi_setopt_basic001.phpt M ext/curl/tests/curl_multi_strerror_001.phpt M ext/curl/tests/curl_share_setopt_basic001.phpt M ext/curl/tests/curl_strerror_001.phpt Diff: diff --git a/ext/curl/tests/curl_multi_setopt_basic001.phpt b/ext/curl/tests/curl_multi_setopt_basic001.phpt index af74a0f..a13cf6d 100644 --- a/ext/curl/tests/curl_multi_setopt_basic001.phpt +++ b/ext/curl/tests/curl_multi_setopt_basic001.phpt @@ -1,6 +1,7 @@ --TEST-- curl_multi_setopt basic test --SKIPIF-- += 7.16.0"); } +?> --FILE-- = 7.12.0"); } +?> --FILE-- --EXPECTF-- -string(8) "No error" -string(20) "Invalid multi handle" +string(8) "no error" +string(20) "invalid multi handle" diff --git a/ext/curl/tests/curl_share_setopt_basic001.phpt b/ext/curl/tests/curl_share_setopt_basic001.phpt index 88e9286..33c03e3 100644 --- a/ext/curl/tests/curl_share_setopt_basic001.phpt +++ b/ext/curl/tests/curl_share_setopt_basic001.phpt @@ -1,9 +1,11 @@ --TEST-- curl_share_setopt basic test --SKIPIF-- + --FILE-- = 7.12.0"); } +?> --FILE-- --EXPECTF-- -string(8) "No error" -string(20) "Unsupported protocol" -string(13) "Unknown error" +string(8) "no error" +string(20) "unsupported protocol" +string(13) "unknown error" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Remove a useless memory write in zend_llist_del_element: Zend/zend_llist.c
Commit:fad960a4045da86cdbd8308a165ffc47892f05b9 Author:Pierrick Charron Tue, 25 Dec 2012 20:45:24 -0500 Parents: a2b6d9c1047a4e5f3419ebc3489a66d62aa12d07 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fad960a4045da86cdbd8308a165ffc47892f05b9 Log: Remove a useless memory write in zend_llist_del_element The zend_llist_element *next pointer is not necessary and removing it will also remove a write on memory Changed paths: M Zend/zend_llist.c Diff: diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c index 4656420..26baf4d 100644 --- a/Zend/zend_llist.c +++ b/Zend/zend_llist.c @@ -91,15 +91,13 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element) ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2)) { zend_llist_element *current=l->head; - zend_llist_element *next; while (current) { - next = current->next; if (compare(current->data, element)) { DEL_LLIST_ELEMENT(current, l); break; } - current = next; + current = current->next; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/standard/tests/file/bug52820.phpt
When merging you can specify that a file don't need to be on the destination branch. That's probably what Laurence did :) Pierrick On 23 December 2012 14:22, Ferenc Kovacs wrote: > On Sun, Dec 23, 2012 at 7:21 PM, Pierrick Charron wrote: > >> His commit was I think merged, what you're seeing in this merge is >> > > If it was merged then why is the testfile missing (causing your merge > conflict)? > > -- > Ferenc Kovács > @Tyr43l - http://tyrael.hu -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Remove duplicated function definition: ext/curl/php_curl.h
Commit:ded889e865825b41e9484a47bfbcbd4b6ed15d50 Author:Pierrick Charron Sun, 23 Dec 2012 14:05:04 -0500 Parents: ee453541ed5b7d1dc3dd96e3a9af4bfc9ae75956 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ded889e865825b41e9484a47bfbcbd4b6ed15d50 Log: Remove duplicated function definition Changed paths: M ext/curl/php_curl.h Diff: diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 0a272fa..02eb24e 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -59,35 +59,29 @@ extern int le_curl_share_handle; PHP_MINIT_FUNCTION(curl); PHP_MSHUTDOWN_FUNCTION(curl); PHP_MINFO_FUNCTION(curl); -PHP_FUNCTION(curl_version); -PHP_FUNCTION(curl_init); + +PHP_FUNCTION(curl_close); PHP_FUNCTION(curl_copy_handle); -PHP_FUNCTION(curl_setopt); -PHP_FUNCTION(curl_setopt_array); +PHP_FUNCTION(curl_errno); +PHP_FUNCTION(curl_error); PHP_FUNCTION(curl_exec); PHP_FUNCTION(curl_getinfo); -PHP_FUNCTION(curl_error); -PHP_FUNCTION(curl_errno); -PHP_FUNCTION(curl_close); - -#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */ -PHP_FUNCTION(curl_reset); -#endif -#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */ -PHP_FUNCTION(curl_escape); -PHP_FUNCTION(curl_unescape); -#endif +PHP_FUNCTION(curl_init); +PHP_FUNCTION(curl_setopt); +PHP_FUNCTION(curl_setopt_array); +PHP_FUNCTION(curl_version); -PHP_FUNCTION(curl_multi_init); PHP_FUNCTION(curl_multi_add_handle); -PHP_FUNCTION(curl_multi_remove_handle); -PHP_FUNCTION(curl_multi_select); +PHP_FUNCTION(curl_multi_close); PHP_FUNCTION(curl_multi_exec); PHP_FUNCTION(curl_multi_getcontent); PHP_FUNCTION(curl_multi_info_read); -PHP_FUNCTION(curl_multi_close); -PHP_FUNCTION(curl_share_init); +PHP_FUNCTION(curl_multi_init); +PHP_FUNCTION(curl_multi_remove_handle); +PHP_FUNCTION(curl_multi_select); + PHP_FUNCTION(curl_share_close); +PHP_FUNCTION(curl_share_init); PHP_FUNCTION(curl_share_setopt); #if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add curl_multi_setopt and clean curl_share_setopt: ext/curl/interface.c ext/curl/multi.c ext/curl/php_curl.h ext/curl/share.c ext/curl/tests/curl_multi_setopt_basic001.phpt ext/
Commit:64595a5d1a51417ae518e124c61e1a9840d221a8 Author:Pierrick Charron Sun, 23 Dec 2012 14:59:41 -0500 Parents: ded889e865825b41e9484a47bfbcbd4b6ed15d50 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=64595a5d1a51417ae518e124c61e1a9840d221a8 Log: Add curl_multi_setopt and clean curl_share_setopt curl_multi_setopt is now available and supports CURLMOPT_PIPELINING and CURLMOPT_MAXCONNECTS Changed paths: M ext/curl/interface.c M ext/curl/multi.c M ext/curl/php_curl.h M ext/curl/share.c A ext/curl/tests/curl_multi_setopt_basic001.phpt A ext/curl/tests/curl_share_setopt_basic001.phpt Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 8b61764..a0a4ec5 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -330,6 +330,12 @@ ZEND_BEGIN_ARG_INFO(arginfo_curl_unescape, 0) ZEND_ARG_INFO(0, ch) ZEND_ARG_INFO(0, str) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_setopt, 0) + ZEND_ARG_INFO(0, sh) + ZEND_ARG_INFO(0, option) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_init, 0) @@ -410,6 +416,9 @@ const zend_function_entry curl_functions[] = { PHP_FE(curl_multi_getcontent,arginfo_curl_multi_getcontent) PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read) PHP_FE(curl_multi_close, arginfo_curl_multi_close) +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ + PHP_FE(curl_multi_setopt,arginfo_curl_multi_setopt) +#endif PHP_FE(curl_share_init, arginfo_curl_share_init) PHP_FE(curl_share_close, arginfo_curl_share_close) PHP_FE(curl_share_setopt,arginfo_curl_share_setopt) @@ -928,6 +937,7 @@ PHP_MINIT_FUNCTION(curl) #if LIBCURL_VERSION_NUM >= 0x071000 /* Available since 7.16.0 */ REGISTER_CURL_CONSTANT(CURLOPT_SSL_SESSIONID_CACHE); + REGISTER_CURL_CONSTANT(CURLMOPT_PIPELINING); #endif #if LIBCURL_VERSION_NUM >= 0x071001 /* Available since 7.16.1 */ @@ -948,6 +958,10 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT_MS); #endif +#if LIBCURL_VERSION_NUM >= 0x071003 /* Available since 7.16.3 */ + REGISTER_CURL_CONSTANT(CURLMOPT_MAXCONNECTS); +#endif + #if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */ REGISTER_CURL_CONSTANT(CURLOPT_KRBLEVEL); REGISTER_CURL_CONSTANT(CURLOPT_NEW_DIRECTORY_PERMS); diff --git a/ext/curl/multi.c b/ext/curl/multi.c index eedcb6a..48655ba 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -359,6 +359,60 @@ void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */ } /* }}} */ +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ +static int _php_curl_multi_setopt(php_curlm *mh, long option, zval **zvalue, zval *return_value TSRMLS_DC) /* {{{ */ +{ + CURLMcode error = CURLM_OK; + + switch (option) { +#if LIBCURL_VERSION_NUM >= 0x071000 /* 7.16.0 */ + case CURLMOPT_PIPELINING: +#endif +#if LIBCURL_VERSION_NUM >= 0x071003 /* 7.16.3 */ + case CURLMOPT_MAXCONNECTS: +#endif + convert_to_long_ex(zvalue); + error = curl_multi_setopt(mh->multi, option, Z_LVAL_PP(zvalue)); + break; + + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid curl multi configuration option"); + error = CURLM_UNKNOWN_OPTION; + break; + } + + if (error != CURLM_OK) { + return 1; + } else { + return 0; + } +} +/* }}} */ + + +/* {{{ proto int curl_multi_setopt(resource mh, int option, mixed value) + Set an option for the curl multi handle */ +PHP_FUNCTION(curl_multi_setopt) +{ + zval *z_mh, **zvalue; + longoptions; + php_curlm *mh; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlZ", &z_mh, &options, &zvalue) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(mh, php_curlm *, &z_mh, -1, le_curl_multi_handle_name, le_curl_multi_handle); + + if (!_php_curl_multi_setopt(mh, options, zvalue, return_value TSRMLS_CC)) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } +} +/* }}} */ +#endif + #endif /* diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 02eb24e..d00b431 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -91,6 +91,8 @@ PHP_FUNCTION(curl_reset); #if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ PHP_FUNCTION(curl_escape); PHP_FUNCTION(curl_unescape); + +PHP_FUNCTION(curl_multi_setopt); #endif void _php_curl_multi_close(zend_rsrc_list_entry * TSRMLS_DC); diff --git a/ext/curl/share.c b/ext/curl/share.c index d7cec23..70e2f56 100644 --- a/ext
[PHP-CVS] com php-src: Support for curl_strerror and curl_multi_strerror: ext/curl/interface.c ext/curl/multi.c ext/curl/php_curl.h ext/curl/tests/curl_multi_strerror_001.phpt ext/curl/tests/curl_stre
Commit:4b4f3db73142799da71be14d73938456e918b3ac Author:Pierrick Charron Sun, 23 Dec 2012 15:45:39 -0500 Parents: 64595a5d1a51417ae518e124c61e1a9840d221a8 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4b4f3db73142799da71be14d73938456e918b3ac Log: Support for curl_strerror and curl_multi_strerror Add the support for both curl_strerror and curl_multi_strerror. Those function will return a string describing the error code passed in the argument errornum Changed paths: M ext/curl/interface.c M ext/curl/multi.c M ext/curl/php_curl.h A ext/curl/tests/curl_multi_strerror_001.phpt A ext/curl/tests/curl_strerror_001.phpt Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index a0a4ec5..21d4bb1 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -374,6 +374,16 @@ ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0) ZEND_ARG_INFO(0, mh) ZEND_END_ARG_INFO() +#if LIBCURL_VERSION_NUM >= 0x070c00 /* Available since 7.12.0 */ +ZEND_BEGIN_ARG_INFO(arginfo_curl_strerror, 0) + ZEND_ARG_INFO(0, errornum) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_strerror, 0) + ZEND_ARG_INFO(0, errornum) +ZEND_END_ARG_INFO() +#endif + ZEND_BEGIN_ARG_INFO(arginfo_curl_share_init, 0) ZEND_END_ARG_INFO() @@ -401,6 +411,10 @@ const zend_function_entry curl_functions[] = { PHP_FE(curl_error, arginfo_curl_error) PHP_FE(curl_errno, arginfo_curl_errno) PHP_FE(curl_close, arginfo_curl_close) +#if LIBCURL_VERSION_NUM >= 0x070c00 /* 7.12.0 */ + PHP_FE(curl_strerror,arginfo_curl_strerror) + PHP_FE(curl_multi_strerror, arginfo_curl_multi_strerror) +#endif #if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */ PHP_FE(curl_reset, arginfo_curl_reset) #endif @@ -3256,6 +3270,28 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) } /* }}} */ +#if LIBCURL_VERSION_NUM >= 0x070c00 /* Available since 7.12.0 */ +/* {{{ proto bool curl_strerror(int code) + return string describing error code */ +PHP_FUNCTION(curl_strerror) +{ + long code; + const char *str; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &code) == FAILURE) { + return; + } + + str = curl_easy_strerror(code); + if (str) { + RETURN_STRING(str, 1); + } else { + RETURN_NULL(); + } +} +/* }}} */ +#endif + #if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */ /* {{{ _php_curl_reset_handlers() Reset all handlers of a given php_curl */ @@ -3280,7 +3316,7 @@ static void _php_curl_reset_handlers(php_curl *ch) ch->handlers->read->stream = NULL; } ch->handlers->read->fp = NULL; - ch->handlers->read->fd = NULL; + ch->handlers->read->fd = 0; ch->handlers->read->method = PHP_CURL_DIRECT; if (ch->handlers->std_err) { diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 48655ba..4cf9d5f 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -359,6 +359,28 @@ void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */ } /* }}} */ +#if LIBCURL_VERSION_NUM >= 0x070c00 /* Available since 7.12.0 */ +/* {{{ proto bool curl_multi_strerror(int code) + return string describing error code */ +PHP_FUNCTION(curl_multi_strerror) +{ + long code; + const char *str; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &code) == FAILURE) { + return; + } + + str = curl_multi_strerror(code); + if (str) { + RETURN_STRING(str, 1); + } else { + RETURN_NULL(); + } +} +/* }}} */ +#endif + #if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ static int _php_curl_multi_setopt(php_curlm *mh, long option, zval **zvalue, zval *return_value TSRMLS_DC) /* {{{ */ { @@ -389,7 +411,6 @@ static int _php_curl_multi_setopt(php_curlm *mh, long option, zval **zvalue, zva } /* }}} */ - /* {{{ proto int curl_multi_setopt(resource mh, int option, mixed value) Set an option for the curl multi handle */ PHP_FUNCTION(curl_multi_setopt) diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index d00b431..2c97bca 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -84,6 +84,11 @@ PHP_FUNCTION(curl_share_close); PHP_FUNCTION(curl_share_init); PHP_FUNCTION(curl_share_setopt); +#if LIBCURL_VERSION_NUM >= 0x070c00 /* 7.12.0 */ +PHP_FUNCTION(curl_strerror); +PHP_FUNCTION(curl_multi_strerror); +#endif + #if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */ PHP_FUNCTION(curl_reset); #endif diff --git a/ext/curl/tests/curl_multi_strerror_001.phpt b/ext/curl/tests/curl_multi_strerror_001.phpt new file mode 100644 index 000..85a665c --- /dev/null ++
[PHP-CVS] com php-src: New curl_pause() function: ext/curl/interface.c ext/curl/php_curl.h
Commit:33f44af1a773d271ec96bbec445d625313195176 Author:Pierrick Charron Sun, 23 Dec 2012 17:13:49 -0500 Parents: 4b4f3db73142799da71be14d73938456e918b3ac Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=33f44af1a773d271ec96bbec445d625313195176 Log: New curl_pause() function Add the curl_pause function (binding of curl_easy_pause). Using this function, you can explicitly mark a running connection to get paused, and you can unpause a connection that was previously paused. Changed paths: M ext/curl/interface.c M ext/curl/php_curl.h Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 21d4bb1..06e5eb2 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -396,6 +396,13 @@ ZEND_BEGIN_ARG_INFO(arginfo_curl_share_setopt, 0) ZEND_ARG_INFO(0, option) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() + +#if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */ +ZEND_BEGIN_ARG_INFO(arginfo_curl_pause, 0) + ZEND_ARG_INFO(0, ch) + ZEND_ARG_INFO(0, bitmask) +ZEND_END_ARG_INFO() +#endif /* }}} */ /* {{{ curl_functions[] @@ -422,6 +429,9 @@ const zend_function_entry curl_functions[] = { PHP_FE(curl_escape, arginfo_curl_escape) PHP_FE(curl_unescape,arginfo_curl_unescape) #endif +#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ + PHP_FE(curl_pause, arginfo_curl_pause) +#endif PHP_FE(curl_multi_init, arginfo_curl_multi_init) PHP_FE(curl_multi_add_handle,arginfo_curl_multi_add_handle) PHP_FE(curl_multi_remove_handle, arginfo_curl_multi_remove_handle) @@ -999,6 +1009,14 @@ PHP_MINIT_FUNCTION(curl) #if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */ REGISTER_CURL_CONSTANT(CURLOPT_PROXY_TRANSFER_MODE); + REGISTER_CURL_CONSTANT(CURLPAUSE_ALL); + REGISTER_CURL_CONSTANT(CURLPAUSE_CONT); + REGISTER_CURL_CONSTANT(CURLPAUSE_RECV); + REGISTER_CURL_CONSTANT(CURLPAUSE_RECV_CONT); + REGISTER_CURL_CONSTANT(CURLPAUSE_SEND); + REGISTER_CURL_CONSTANT(CURLPAUSE_SEND_CONT); + REGISTER_CURL_CONSTANT(CURL_READFUNC_PAUSE); + REGISTER_CURL_CONSTANT(CURL_WRITEFUNC_PAUSE); #endif #if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */ @@ -3417,8 +3435,29 @@ PHP_FUNCTION(curl_unescape) RETURN_FALSE; } } +/* }}} */ #endif + +#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ +/* {{{ proto void curl_pause(resource ch, int bitmask) + pause and unpause a connection */ +PHP_FUNCTION(curl_pause) +{ + long bitmask; + zval *zid; + php_curl *ch; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zid, &bitmask) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl); + + RETURN_LONG(curl_easy_pause(ch->cp, bitmask)); +} /* }}} */ +#endif + #endif /* HAVE_CURL */ /* diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 2c97bca..de8eb7e 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -100,6 +100,10 @@ PHP_FUNCTION(curl_unescape); PHP_FUNCTION(curl_multi_setopt); #endif +#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ +PHP_FUNCTION(curl_pause); +#endif + void _php_curl_multi_close(zend_rsrc_list_entry * TSRMLS_DC); void _php_curl_share_close(zend_rsrc_list_entry * TSRMLS_DC); -- 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:24f1ef1b0254d4b8341aa9d74ca450e89c2a8683 Author:Pierrick Charron Sun, 23 Dec 2012 17:48:05 -0500 Parents: 33f44af1a773d271ec96bbec445d625313195176 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=24f1ef1b0254d4b8341aa9d74ca450e89c2a8683 Log: Update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 019513a..54b4455 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,11 @@ PHP NEWS . Fixed bug #63822 (Crash when using closures with ArrayAccess). (Nikita Popov) +- cURL: + . Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror +curl_pause, curl_reset, curl_share_close, curl_share_init, + curl_share_setopt curl_strerror and curl_unescape. (Pierrick) + 18 Dec 2012, PHP 5.5.0 Alpha 2 - General improvements: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/standard/tests/file/bug52820.phpt
Hi On 23 December 2012 12:47, Ferenc Kovacs wrote: > Hi, > > Laruence, why didn't you merged your commits related to bug 63377 from the > 5.3 branch upwards? His commit was I think merged, what you're seeing in this merge is only commit 56d9edbbb93 which was a typo corrected by Felipe. > Pierrick: it seems that you tried to merge the fix to the bug63377 test > which isn't present in the 5.4 branch. It's only git who tried to merge the 56d9edbbb93 commit into 5.4 since it wasn't merged before. Because the file doesn't exists in 5.4, git made a conflict that I had to resolve by just saying that the file don't exists and that it was normal. > Even if the bug isn't present in the new output buffer code it would be > nice imo if we would add the test to the 5.4, 5.5 and master branches so we > can catch regressions, etc. Agree > > > On Fri, Dec 21, 2012 at 6:24 PM, Pierrick Charron wrote: > >> Commit:59a4514dc0e8950ce210036332cc64c414fdcc22 >> Author:Pierrick Charron Fri, 21 Dec 2012 >> 12:24:52 -0500 >> Parents: 763bce0303b3afd19d109d96c37d6d33a899e990 >> 63659ce52678500ec024f1146ebf30e70624b935 >> Branches: PHP-5.4 PHP-5.5 master >> >> Link: >> http://git.php.net/?p=php-src.git;a=commitdiff;h=59a4514dc0e8950ce210036332cc64c414fdcc22 >> >> Log: >> Merge branch 'PHP-5.3' into PHP-5.4 >> >> * PHP-5.3: >> Fix test to work on every libcurl version >> - Fixed typo on "SKIPIF" (causing make test to abort on some systems) >> >> Conflicts: >> tests/output/bug63377.phpt >> >> Bugs: >> https://bugs.php.net/63377 >> >> Changed paths: >> MM ext/standard/tests/file/bug52820.phpt >> >> >> Diff: >> diff --cc ext/standard/tests/file/bug52820.phpt >> index 8a1e7cc,19d0e9e..91976b0 >> --- a/ext/standard/tests/file/bug52820.phpt >> +++ b/ext/standard/tests/file/bug52820.phpt >> @@@ -50,22 -42,8 +50,22 @@@ About to rewind >> memory stream (close after): >> About to rewind! >> * About to connect() to 127.0.0.1 port 37349%r.*%r >> - * Trying 127.0.0.1... * Connection refused >> - * couldn't connect to host >> + * Trying 127.0.0.1...%A* Connection refused >> + * couldn't connect to host%S >> * Closing connection #0 >> >> +temp stream (leak): >> +About to rewind! >> +* About to connect() to 127.0.0.1 port 37349%r.*%r >> - * Trying 127.0.0.1... * Connection refused >> - * couldn't connect to host >> ++* Trying 127.0.0.1...%A* Connection refused >> ++* couldn't connect to host%S >> +* Closing connection #0 >> + >> +memory stream (leak): >> +About to rewind! >> +* About to connect() to 127.0.0.1 port 37349%r.*%r >> - * Trying 127.0.0.1... * Connection refused >> - * couldn't connect to host >> ++* Trying 127.0.0.1...%A* Connection refused >> ++* couldn't connect to host%S >> +* Closing connection #0 >> + >> Done. >> >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > Ferenc Kovács > @Tyr43l - http://tyrael.hu -- 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.3' into PHP-5.4: ext/curl/interface.c
Commit:b10a3b9466b77bccf7e9a6e6207df2de1a997855 Author:Pierrick Charron Sat, 22 Dec 2012 19:04:45 -0500 Parents: 5499c7d201ad22f551dfc370ae09132acf4f75ec a2b6d9c1047a4e5f3419ebc3489a66d62aa12d07 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b10a3b9466b77bccf7e9a6e6207df2de1a997855 Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Fixed segfault due to libcurl connection caching Changed paths: MM ext/curl/interface.c Diff: -- 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: ext/curl/interface.c
Commit:ee453541ed5b7d1dc3dd96e3a9af4bfc9ae75956 Author:Pierrick Charron Sat, 22 Dec 2012 19:10:35 -0500 Parents: e3c88d16b400cc4f69c5533239343bf14220ae2c 3f0dcc08e0bd748b8ea6c6d8d2e6245515e014d5 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee453541ed5b7d1dc3dd96e3a9af4bfc9ae75956 Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Update NEWS file Fixed segfault due to libcurl connection caching Changed paths: MM ext/curl/interface.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed segfault due to libcurl connection caching: NEWS ext/curl/interface.c ext/curl/tests/curl_multi_segfault.phpt
Commit:a2b6d9c1047a4e5f3419ebc3489a66d62aa12d07 Author:Pierrick Charron Sat, 22 Dec 2012 19:03:24 -0500 Parents: 1c553eba196b823439e69f003e63afd6d202d582 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a2b6d9c1047a4e5f3419ebc3489a66d62aa12d07 Log: Fixed segfault due to libcurl connection caching Libcurl is doing connection caching. When easy handle is cleaned up, if the handle was previously used by the curl_multi_api, the connection remains open un the curl multi handle is cleaned up. Some protocols are sending content like the FTP one, and libcurl try to use the WRITEFUNCTION or the HEADERFUNCTION. Since structures used in those callback are freed, we need to use an other callback to which avoid segfaults. Libcurl commit d021f2e8a00 fix this issue and should be part of 7.28.2 Changed paths: M NEWS M ext/curl/interface.c A ext/curl/tests/curl_multi_segfault.phpt Diff: diff --git a/NEWS b/NEWS index 8dcd896..61b9d39 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ PHP NEWS (Johannes) - cURL extension: + . Fixed bug (segfault due to libcurl connection caching). (Pierrick) . Fixed bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST). (Pierrick) . Fixed bug #63352 (Can't enable hostname validation when using curl stream diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 9ac89c5..37747fc 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -971,6 +971,15 @@ PHP_MSHUTDOWN_FUNCTION(curl) } /* }}} */ +/* {{{ curl_write_nothing + * Used as a work around. See _php_curl_close_ex + */ +static size_t curl_write_nothing(char *data, size_t size, size_t nmemb, void *ctx) +{ + return size * nmemb; +} +/* }}} */ + /* {{{ curl_write */ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx) @@ -2604,6 +2613,21 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC) #endif _php_curl_verify_handlers(ch, 0 TSRMLS_CC); + + /* +* Libcurl is doing connection caching. When easy handle is cleaned up, +* if the handle was previously used by the curl_multi_api, the connection +* remains open un the curl multi handle is cleaned up. Some protocols are +* sending content like the FTP one, and libcurl try to use the +* WRITEFUNCTION or the HEADERFUNCTION. Since structures used in those +* callback are freed, we need to use an other callback to which avoid +* segfaults. +* +* Libcurl commit d021f2e8a00 fix this issue and should be part of 7.28.2 +*/ + curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_nothing); + curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write_nothing); + curl_easy_cleanup(ch->cp); /* cURL destructors should be invoked only by last curl handle */ diff --git a/ext/curl/tests/curl_multi_segfault.phpt b/ext/curl/tests/curl_multi_segfault.phpt new file mode 100644 index 000..dde8189 --- /dev/null +++ b/ext/curl/tests/curl_multi_segfault.phpt @@ -0,0 +1,56 @@ +--TEST-- +Segfault due to libcurl connection caching +--CREDITS-- +--SKIPIF-- + +--FILE-- +ftp://$username:$password@$host/"; ; + + $ch = curl_init (); + + curl_setopt ( $ch , CURLOPT_URL, $url ); + curl_setopt ( $ch , CURLOPT_RETURNTRANSFER, 1 ); + + //force passive connection + curl_setopt ( $ch , CURLOPT_FTP_USE_EPSV, 0 ); + curl_setopt ( $ch , CURLOPT_FTP_SKIP_PASV_IP, 1 ); + + $cmh = curl_multi_init(); + curl_multi_add_handle($cmh, $ch); + + $active = null; + + do { + $mrc = curl_multi_exec($cmh, $active); + } while ($mrc == CURLM_CALL_MULTI_PERFORM); + + + while ($active && $mrc == CURLM_OK) { + if (curl_multi_select($cmh) != -1) { + do { + $mrc = curl_multi_exec($cmh, $active); + } while ($mrc == CURLM_CALL_MULTI_PERFORM); + } + } + + var_dump(is_string(curl_multi_getcontent($ch))); + curl_multi_remove_handle($cmh, $ch); + curl_close($ch); + curl_multi_close($cmh); +?> +===DONE=== +--EXPECTF-- +bool(true) +===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update NEWS file: NEWS
Commit:3f0dcc08e0bd748b8ea6c6d8d2e6245515e014d5 Author:Pierrick Charron Sat, 22 Dec 2012 19:09:56 -0500 Parents: b10a3b9466b77bccf7e9a6e6207df2de1a997855 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3f0dcc08e0bd748b8ea6c6d8d2e6245515e014d5 Log: Update NEWS file Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 3d860b1..208af93 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ PHP NEWS pascalc at gmail dot com) - cURL extension: + . Fixed bug (segfault due to libcurl connection caching). (Pierrick) . Fixed bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST). (Pierrick) . Fixed bug #63352 (Can't enable hostname validation when using curl stream -- 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: ext/curl/interface.c
Commit:e3c88d16b400cc4f69c5533239343bf14220ae2c Author:Pierrick Charron Fri, 21 Dec 2012 19:27:51 -0500 Parents: 52e7b0ce2cb9a8276a423920d7bf6f0f8bffd4df 5499c7d201ad22f551dfc370ae09132acf4f75ec Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e3c88d16b400cc4f69c5533239343bf14220ae2c Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Update NEWS file Fixed bug #63352 (Can't enable hostname validation when using curl stream wrappers) CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST) Bugs: https://bugs.php.net/63352 Changed paths: MM ext/curl/interface.c Diff: diff --cc ext/curl/interface.c index 9e5d06b,1106037..8a8333d --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@@ -2015,142 -1685,98 +2015,148 @@@ static int _php_curl_setopt(php_curl *c switch (option) { /* Long options */ case CURLOPT_SSL_VERIFYHOST: - if(Z_TYPE_PP(zvalue)==IS_BOOL && Z_BVAL_PP(zvalue)) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST set to true which disables common name validation (setting CURLOPT_SSL_VERIFYHOST to 2 enables common name validation)"); + if(Z_BVAL_PP(zvalue) == 1) { + #if LIBCURL_VERSION_NUM <= 0x071c00 /* 7.28.0 */ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead"); -#else - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead"); - error = curl_easy_setopt(ch->cp, option, 2); - break; -#endif - } - case CURLOPT_INFILESIZE: - case CURLOPT_VERBOSE: - case CURLOPT_HEADER: - case CURLOPT_NOPROGRESS: - case CURLOPT_NOBODY: - case CURLOPT_FAILONERROR: - case CURLOPT_UPLOAD: - case CURLOPT_POST: - case CURLOPT_FTPLISTONLY: - case CURLOPT_FTPAPPEND: - case CURLOPT_NETRC: - case CURLOPT_PUT: -#if CURLOPT_MUTE != 0 - case CURLOPT_MUTE: -#endif - case CURLOPT_TIMEOUT: -#if LIBCURL_VERSION_NUM > 0x071002 - case CURLOPT_TIMEOUT_MS: ++ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead"); ++#else ++ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead"); ++ error = curl_easy_setopt(ch->cp, option, 2); ++ break; + #endif - case CURLOPT_FTP_USE_EPSV: - case CURLOPT_LOW_SPEED_LIMIT: - case CURLOPT_SSLVERSION: - case CURLOPT_LOW_SPEED_TIME: - case CURLOPT_RESUME_FROM: - case CURLOPT_TIMEVALUE: - case CURLOPT_TIMECONDITION: - case CURLOPT_TRANSFERTEXT: - case CURLOPT_HTTPPROXYTUNNEL: - case CURLOPT_FILETIME: - case CURLOPT_MAXREDIRS: - case CURLOPT_MAXCONNECTS: + } + case CURLOPT_AUTOREFERER: + case CURLOPT_BUFFERSIZE: case CURLOPT_CLOSEPOLICY: - case CURLOPT_FRESH_CONNECT: - case CURLOPT_FORBID_REUSE: case CURLOPT_CONNECTTIMEOUT: -#if LIBCURL_VERSION_NUM > 0x071002 - case CURLOPT_CONNECTTIMEOUT_MS: -#endif - case CURLOPT_SSL_VERIFYPEER: + case CURLOPT_COOKIESESSION: + case CURLOPT_CRLF: + case CURLOPT_DNS_CACHE_TIMEOUT: case CURLOPT_DNS_USE_GLOBAL_CACHE: - case CURLOPT_NOSIGNAL: - case CURLOPT_PROXYTYPE: - case CURLOPT_BUFFERSIZE: + case CURLOPT_FAILONERROR: + case CURLOPT_FILETIME: + case CURLOPT_FORBID_REUSE: + case CURLOPT_FRESH_CONNECT: + case CURLOPT_FTP_USE_EPRT: + case CURLOPT_FTP_USE_EPSV: + case CURLOPT_HEADER: case CURLOPT_HTTPGET: + case CURLOPT_HTTPPROXYTUNNEL: case CURLOPT_HTTP_VERSION: - case CURLOPT_CRLF: - case CURLOPT_DNS_CACHE_TIMEOUT: + case CURLOPT_INFILESIZE: + case CURLOPT_LOW_SPEED_LIMIT: +
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: NEWS ext/curl/interface.c ext/curl/streams.c
Commit:5499c7d201ad22f551dfc370ae09132acf4f75ec Author:Pierrick Charron Fri, 21 Dec 2012 19:24:28 -0500 Parents: 59a4514dc0e8950ce210036332cc64c414fdcc22 1c553eba196b823439e69f003e63afd6d202d582 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5499c7d201ad22f551dfc370ae09132acf4f75ec Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Update NEWS file Fixed bug #63352 (Can't enable hostname validation when using curl stream wrappers) CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST) Conflicts: ext/curl/interface.c ext/curl/tests/bug63363.phpt Bugs: https://bugs.php.net/63352 https://bugs.php.net/63363 Changed paths: MM NEWS MM ext/curl/interface.c MM ext/curl/streams.c Diff: diff --cc NEWS index 81bc7a6,8dcd896..3d860b1 --- a/NEWS +++ b/NEWS @@@ -1,19 -1,16 +1,23 @@@ PHP NEWS ||| -?? ??? 2013, PHP 5.3.21 +?? ??? 2012, PHP 5.4.11 -- Zend Engine: - . Fixed bug #63762 (Sigsegv when Exception::$trace is changed by user). -(Johannes) +- Filter: + . Fixed bug #63757 (getenv() produces memory leak with CGI SAPI). (Dmitry) + +- JSON: + . Fixed bug #63737 (json_decode does not properly decode with options +parameter). (Adam) + +- CLI server + . Update list of common mime types. Added webm, ogv, ogg. (Lars, +pascalc at gmail dot com) - cURL extension: + . Fixed bug #63795 (CURL >= 7.28.0 no longer support value 1 for + CURLOPT_SSL_VERIFYHOST). (Pierrick) + . Fixed bug #63352 (Can't enable hostname validation when using curl stream + wrappers). (Pierrick) . Fixed bug #55438 (Curlwapper is not sending http header randomly). (php...@lostreality.org, Pierrick) diff --cc ext/curl/interface.c index dbe4896,9ac89c5..1106037 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@@ -1683,10 -1679,15 +1683,16 @@@ static int _php_curl_setopt(php_curl *c CURLcode error=CURLE_OK; switch (option) { + /* Long options */ case CURLOPT_SSL_VERIFYHOST: - if(Z_TYPE_PP(zvalue)==IS_BOOL && Z_BVAL_PP(zvalue)) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST set to true which disables common name validation (setting CURLOPT_SSL_VERIFYHOST to 2 enables common name validation)"); + if(Z_BVAL_PP(zvalue) == 1) { + #if LIBCURL_VERSION_NUM <= 0x071c00 /* 7.28.0 */ + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead"); + #else + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead"); + error = curl_easy_setopt(ch->cp, option, 2); + break; + #endif } case CURLOPT_INFILESIZE: case CURLOPT_VERBOSE: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST): ext/curl/interface.c ext/curl/tests/bug63363.phpt ext/curl/tests/bug63795.phpt
Commit:517f800277a11d6ce05b0e1afcd0e76dc544d452 Author:Pierrick Charron Fri, 21 Dec 2012 19:10:55 -0500 Parents: 63659ce52678500ec024f1146ebf30e70624b935 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=517f800277a11d6ce05b0e1afcd0e76dc544d452 Log: CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST) Fixed bug #63795 Bugs: https://bugs.php.net/63795 Changed paths: M ext/curl/interface.c A ext/curl/tests/bug63363.phpt A ext/curl/tests/bug63795.phpt Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 7b72873..9ac89c5 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1679,6 +1679,16 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu CURLcode error=CURLE_OK; switch (option) { + case CURLOPT_SSL_VERIFYHOST: + if(Z_BVAL_PP(zvalue) == 1) { +#if LIBCURL_VERSION_NUM <= 0x071c00 /* 7.28.0 */ + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead"); +#else + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead"); + error = curl_easy_setopt(ch->cp, option, 2); + break; +#endif + } case CURLOPT_INFILESIZE: case CURLOPT_VERBOSE: case CURLOPT_HEADER: @@ -1717,7 +1727,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #if LIBCURL_VERSION_NUM > 0x071002 case CURLOPT_CONNECTTIMEOUT_MS: #endif - case CURLOPT_SSL_VERIFYHOST: case CURLOPT_SSL_VERIFYPEER: case CURLOPT_DNS_USE_GLOBAL_CACHE: case CURLOPT_NOSIGNAL: diff --git a/ext/curl/tests/bug63363.phpt b/ext/curl/tests/bug63363.phpt new file mode 100644 index 000..36abc5e --- /dev/null +++ b/ext/curl/tests/bug63363.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #63363 (CURL silently accepts boolean value for SSL_VERIFYHOST) +--SKIPIF-- += 0x071c01) { +exit("skip: test valid for libcurl < 7.28.1"); +} +?> +--FILE-- + +--EXPECTF-- +bool(true) + +Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead in %s on line %d +bool(true) +bool(true) + +Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead in %s on line %d +bool(true) +bool(true) diff --git a/ext/curl/tests/bug63795.phpt b/ext/curl/tests/bug63795.phpt new file mode 100644 index 000..798faa6 --- /dev/null +++ b/ext/curl/tests/bug63795.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST) +--SKIPIF-- += 7.28.1"); +} +?> +--FILE-- + +--EXPECTF-- +bool(true) + +Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d +bool(true) +bool(true) + +Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d +bool(true) +bool(true) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #63352 (Can't enable hostname validation when using curl stream wrappers): ext/curl/streams.c
Commit:af10e698a24e0e624920ea4c4b72a2bc3c647cef Author:Pierrick Charron Fri, 21 Dec 2012 19:12:43 -0500 Parents: 517f800277a11d6ce05b0e1afcd0e76dc544d452 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=af10e698a24e0e624920ea4c4b72a2bc3c647cef Log: Fixed bug #63352 (Can't enable hostname validation when using curl stream wrappers) Bugs: https://bugs.php.net/63352 Changed paths: M ext/curl/streams.c Diff: diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 75a2bd0..0532b87 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -331,7 +331,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, } if (SUCCESS == php_stream_context_get_option(context, "http", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) { - curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 1); + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2); } else { curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0); } @@ -420,7 +420,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, } } else if (context && !strncasecmp(filename, "ftps", sizeof("ftps")-1)) { if (SUCCESS == php_stream_context_get_option(context, "ftp", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) { - curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 1); + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2); } else { curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update NEWS file: NEWS
Commit:1c553eba196b823439e69f003e63afd6d202d582 Author:Pierrick Charron Fri, 21 Dec 2012 19:19:25 -0500 Parents: af10e698a24e0e624920ea4c4b72a2bc3c647cef Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1c553eba196b823439e69f003e63afd6d202d582 Log: Update NEWS file Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index bb3a7df..8dcd896 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ PHP NEWS (Johannes) - cURL extension: + . Fixed bug #63795 (CURL >= 7.28.0 no longer support value 1 for +CURLOPT_SSL_VERIFYHOST). (Pierrick) + . Fixed bug #63352 (Can't enable hostname validation when using curl stream +wrappers). (Pierrick) . Fixed bug #55438 (Curlwapper is not sending http header randomly). (php...@lostreality.org, Pierrick) -- 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.3' into PHP-5.4: ext/standard/tests/file/bug52820.phpt
Commit:59a4514dc0e8950ce210036332cc64c414fdcc22 Author:Pierrick Charron Fri, 21 Dec 2012 12:24:52 -0500 Parents: 763bce0303b3afd19d109d96c37d6d33a899e990 63659ce52678500ec024f1146ebf30e70624b935 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=59a4514dc0e8950ce210036332cc64c414fdcc22 Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Fix test to work on every libcurl version - Fixed typo on "SKIPIF" (causing make test to abort on some systems) Conflicts: tests/output/bug63377.phpt Bugs: https://bugs.php.net/63377 Changed paths: MM ext/standard/tests/file/bug52820.phpt Diff: diff --cc ext/standard/tests/file/bug52820.phpt index 8a1e7cc,19d0e9e..91976b0 --- a/ext/standard/tests/file/bug52820.phpt +++ b/ext/standard/tests/file/bug52820.phpt @@@ -50,22 -42,8 +50,22 @@@ About to rewind memory stream (close after): About to rewind! * About to connect() to 127.0.0.1 port 37349%r.*%r - * Trying 127.0.0.1... * Connection refused - * couldn't connect to host + * Trying 127.0.0.1...%A* Connection refused + * couldn't connect to host%S * Closing connection #0 +temp stream (leak): +About to rewind! +* About to connect() to 127.0.0.1 port 37349%r.*%r - * Trying 127.0.0.1... * Connection refused - * couldn't connect to host ++* Trying 127.0.0.1...%A* Connection refused ++* couldn't connect to host%S +* Closing connection #0 + +memory stream (leak): +About to rewind! +* About to connect() to 127.0.0.1 port 37349%r.*%r - * Trying 127.0.0.1... * Connection refused - * couldn't connect to host ++* Trying 127.0.0.1...%A* Connection refused ++* couldn't connect to host%S +* Closing connection #0 + Done. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix test to work on every libcurl version: ext/standard/tests/file/bug52820.phpt
Commit:63659ce52678500ec024f1146ebf30e70624b935 Author:Pierrick Charron Fri, 21 Dec 2012 12:19:54 -0500 Parents: 56d9edbbb93a2a338211b2e7c05cf52347a963ce Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=63659ce52678500ec024f1146ebf30e70624b935 Log: Fix test to work on every libcurl version Changed paths: M ext/standard/tests/file/bug52820.phpt Diff: diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt index 9ddff65..19d0e9e 100644 --- a/ext/standard/tests/file/bug52820.phpt +++ b/ext/standard/tests/file/bug52820.phpt @@ -35,15 +35,15 @@ echo "\nDone.\n"; temp stream (close after): About to rewind! * About to connect() to 127.0.0.1 port 37349%r.*%r -* Trying 127.0.0.1... * Connection refused -* couldn't connect to host +* Trying 127.0.0.1...%A* Connection refused +* couldn't connect to host%S * Closing connection #0 memory stream (close after): About to rewind! * About to connect() to 127.0.0.1 port 37349%r.*%r -* Trying 127.0.0.1... * Connection refused -* couldn't connect to host +* Trying 127.0.0.1...%A* Connection refused +* couldn't connect to host%S * Closing connection #0 Done. -- 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/curl/tests/bug63363.phpt
Commit:763bce0303b3afd19d109d96c37d6d33a899e990 Author:Pierrick Charron Fri, 21 Dec 2012 11:45:59 -0500 Parents: 180b9e150b71a2ff80b2a0cf89e2e834d18328e3 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=763bce0303b3afd19d109d96c37d6d33a899e990 Log: Fix test This test is only valid if libcurl < 7.28.1 since libcurl removed support for the 1 value in CURLOPT_SSL_VERIFYHOST. Changed paths: M ext/curl/tests/bug63363.phpt Diff: diff --git a/ext/curl/tests/bug63363.phpt b/ext/curl/tests/bug63363.phpt index 43deaa2..33a7d37 100644 --- a/ext/curl/tests/bug63363.phpt +++ b/ext/curl/tests/bug63363.phpt @@ -5,6 +5,11 @@ Bug #63363 (CURL silently accepts boolean value for SSL_VERIFYHOST) if (!extension_loaded("curl")) { exit("skip curl extension not loaded"); } +$curl_version = curl_version(); +if ($curl_version['version_number'] >= 0x071c01) { + exit("skip: test valid for libcurl < 7.28.1"); +} + ?> --FILE-- -- 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.3' into PHP-5.4: NEWS ext/curl/streams.c
Commit:66b88c92bb7796b65f2f1da4b04ef91c0ce7a850 Author:Pierrick Charron Wed, 19 Dec 2012 19:44:08 -0500 Parents: 59692de77facceada2dd19167c4706c0c2a80ba2 c46e1cdcae70254cfc0b7d5781f2c71162a3734d Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=66b88c92bb7796b65f2f1da4b04ef91c0ce7a850 Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Fixed bug #55438 (Curlwapper is not sending http header randomly) Bugs: https://bugs.php.net/55438 Changed paths: MM NEWS MM ext/curl/streams.c Diff: diff --cc NEWS index 2a8660e,bb3a7df..81bc7a6 --- a/NEWS +++ b/NEWS @@@ -1,25 -1,20 +1,29 @@@ PHP NEWS ||| -?? ??? 2013, PHP 5.3.21 +?? ??? 2012, PHP 5.4.11 -- Zend Engine: - . Fixed bug #63762 (Sigsegv when Exception::$trace is changed by user). -(Johannes) +- Filter: + . Fixed bug #63757 (getenv() produces memory leak with CGI SAPI). (Dmitry) + +- JSON: + . Fixed bug #63737 (json_decode does not properly decode with options +parameter). (Adam) + +- CLI server + . Update list of common mime types. Added webm, ogv, ogg. (Lars, +pascalc at gmail dot com) + - cURL extension: + . Fixed bug #55438 (Curlwapper is not sending http header randomly). + (php...@lostreality.org, Pierrick) + -20 Dec 2012, PHP 5.3.20 +?? ??? 2012, PHP 5.4.10 -- Zend Engine: +- Core: + . Fixed bug #63726 (Memleak with static properties and internal/user +classes). (Laruence) . Fixed bug #63635 (Segfault in gc_collect_cycles). (Dmitry) - . Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes + . Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value). (Pierrick) . Fixed bug #63468 (wrong called method as callback with inheritance). (Laruence) -- 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: ext/curl/php_curl.h
Commit:aa9156d7e077d007c395cec6cad8f5d30e8fa33b Author:Pierrick Charron Wed, 19 Dec 2012 19:46:57 -0500 Parents: 1ee8c3d9a25b88d4a075f78377188ad71f5b2e84 66b88c92bb7796b65f2f1da4b04ef91c0ce7a850 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=aa9156d7e077d007c395cec6cad8f5d30e8fa33b Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fixed bug #55438 (Curlwapper is not sending http header randomly) Bugs: https://bugs.php.net/55438 Changed paths: MM ext/curl/php_curl.h Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #55438 (Curlwapper is not sending http header randomly): NEWS ext/curl/php_curl.h ext/curl/streams.c
Commit:c46e1cdcae70254cfc0b7d5781f2c71162a3734d Author:Pierrick Charron Wed, 19 Dec 2012 19:40:29 -0500 Parents: e01fe5315c5fd03231641f7bb0819dbfaaadf935 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c46e1cdcae70254cfc0b7d5781f2c71162a3734d Log: Fixed bug #55438 (Curlwapper is not sending http header randomly) Since curl multi is used, it sometime happen that the resource is freed before the curl multi really execute the query. The patch will store the headers slist in the curlstream handle and free it only when the stream will be closed Bugs: https://bugs.php.net/55438 Changed paths: M NEWS M ext/curl/php_curl.h M ext/curl/streams.c Diff: diff --git a/NEWS b/NEWS index f5b2069..bb3a7df 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug #63762 (Sigsegv when Exception::$trace is changed by user). (Johannes) +- cURL extension: + . Fixed bug #55438 (Curlwapper is not sending http header randomly). +(php...@lostreality.org, Pierrick) + 20 Dec 2012, PHP 5.3.20 - Zend Engine: diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 0527545..af6a965 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -181,6 +181,7 @@ typedef struct { CURLMcode mcode; int pending; zval *headers; + struct curl_slist *headers_slist; /* holds custom headers sent out in the request */ } php_curl_stream; diff --git a/ext/curl/streams.c b/ext/curl/streams.c index e317285..75a2bd0 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -218,6 +218,10 @@ static int php_curl_stream_close(php_stream *stream, int close_handle TSRMLS_DC) curl_easy_cleanup(curlstream->curl); curl_multi_cleanup(curlstream->multi); + if (curlstream->headers_slist) { + curl_slist_free_all(curlstream->headers_slist); + } + /* we are not closing curlstream->readbuf here, because we export * it as a zval with the wrapperdata - the engine will garbage collect it */ @@ -268,7 +272,6 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, php_stream *stream; php_curl_stream *curlstream; zval *tmp, **ctx_opt = NULL; - struct curl_slist *slist = NULL; curlstream = emalloc(sizeof(php_curl_stream)); memset(curlstream, 0, sizeof(php_curl_stream)); @@ -279,6 +282,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, curlstream->curl = curl_easy_init(); curlstream->multi = curl_multi_init(); curlstream->pending = 1; + curlstream->headers_slist = NULL; /* if opening for an include statement, ensure that the local storage will * have a FILE* associated with it. @@ -351,7 +355,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, zend_hash_move_forward_ex(Z_ARRVAL_PP(ctx_opt), &pos) ) { if (Z_TYPE_PP(header) == IS_STRING) { - slist = curl_slist_append(slist, Z_STRVAL_PP(header)); + curlstream->headers_slist = curl_slist_append(curlstream->headers_slist, Z_STRVAL_PP(header)); } } } else if (Z_TYPE_PP(ctx_opt) == IS_STRING && Z_STRLEN_PP(ctx_opt)) { @@ -361,14 +365,14 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, p = php_strtok_r(copy_ctx_opt, "\r\n", &token); while (p) { trimmed = php_trim(p, strlen(p), NULL, 0, NULL, 3 TSRMLS_CC); - slist = curl_slist_append(slist, trimmed); + curlstream->headers_slist = curl_slist_append(curlstream->headers_slist, trimmed); efree(trimmed); p = php_strtok_r(NULL, "\r\n", &token); } efree(copy_ctx_opt); } - if (slist) { - curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, slist); + if (curlstream->headers_slist) { + curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, curlstream->headers_slist); } } if (SUCCESS == php_stream_context_get_option(context, "http", "method&
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_ini_scanner.c Zend/zend_ini_scanner_defs.h
Commit:8c97c79d77f968318113a99a3c560de4366a2643 Author:Pierrick Charron Fri, 16 Nov 2012 18:28:04 -0500 Parents: 30d659144a069da7de78b8740f429316c085c99e 99edb55e417aeb7e5a9eaad4eac68a9e074bfc0f Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8c97c79d77f968318113a99a3c560de4366a2643 Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Regenerate Zend ini scanner Conflicts: Zend/zend_ini_scanner.c Zend/zend_ini_scanner_defs.h Changed paths: MM Zend/zend_ini_scanner.c MM Zend/zend_ini_scanner_defs.h Diff: diff --cc Zend/zend_ini_scanner.c index 470f5236,a481cbd..1c7f306 --- a/Zend/zend_ini_scanner.c +++ b/Zend/zend_ini_scanner.c @@@ -1,4 -1,4 +1,4 @@@ - /* Generated by re2c 0.13.5 on Thu Jun 7 17:55:40 2012 */ -/* Generated by re2c 0.13.5 on Fri Nov 16 18:24:06 2012 */ ++/* Generated by re2c 0.13.5 on Fri Nov 16 18:27:25 2012 */ #line 1 "Zend/zend_ini_scanner.l" /* +--+ diff --cc Zend/zend_ini_scanner_defs.h index 9c99cc4,1fe4c0c..b985f34 --- a/Zend/zend_ini_scanner_defs.h +++ b/Zend/zend_ini_scanner_defs.h @@@ -1,4 -1,4 +1,4 @@@ - /* Generated by re2c 0.13.5 on Thu Jun 7 17:55:41 2012 */ -/* Generated by re2c 0.13.5 on Fri Nov 16 18:24:06 2012 */ ++/* Generated by re2c 0.13.5 on Fri Nov 16 18:27:25 2012 */ #line 3 "Zend/zend_ini_scanner_defs.h" enum YYCONDTYPE { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value: NEWS Zend/zend_ini_scanner.l ext/standard/tests/file/bug51094.phpt ext/standard/tests/file/bug6
Commit:6dff07aa8c6fcf6cd84a2d1726ffcaeef74b9969 Author:Pierrick Charron Fri, 16 Nov 2012 18:04:14 -0500 Parents: 7468fc0e374ad8cd8db482e6c228cdaae8aed075 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6dff07aa8c6fcf6cd84a2d1726ffcaeef74b9969 Log: Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value Restore the old behavior but keep bug 51094 fixed Bugs: https://bugs.php.net/63512 https://bugs.php.net/51094 Changed paths: M NEWS M Zend/zend_ini_scanner.l M ext/standard/tests/file/bug51094.phpt A ext/standard/tests/file/bug63512.phpt Diff: diff --git a/NEWS b/NEWS index bca9590..4f89d07 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||| ?? ??? 2ß12, PHP 5.3.20 +- Zend Engine: + . Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes +from value). (Pierrick) - Core: . Fixed bug #63451 (config.guess file does not have AIX 7 defined, shared objects are not created). (kemcline at au1 dot ibm dot com) diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 8aeb076..2a21e77 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -347,7 +347,7 @@ DOLLAR_CURLY "${" SECTION_RAW_CHARS [^\]\n\r] SINGLE_QUOTED_CHARS [^'] -RAW_VALUE_CHARS [^"\n\r;\000] +RAW_VALUE_CHARS [^\n\r;\000] LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR}))) VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR}) @@ -445,33 +445,40 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR}) return '='; } -["] { +{RAW_VALUE_CHARS} { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */ + char *sc = NULL; while (YYCURSOR < YYLIMIT) { - switch (*YYCURSOR++) { + switch (*YYCURSOR) { case '\n': - SCNG(lineno)++; - break; case '\r': - if (*YYCURSOR != '\n') { - SCNG(lineno)++; - } + goto end_raw_value_chars; break; - case '"': - yyleng = YYCURSOR - SCNG(yy_text) - 2; - SCNG(yy_text)++; - RETURN_TOKEN(TC_RAW, yytext, yyleng); - case '\\': - if (YYCURSOR < YYLIMIT) { - YYCURSOR++; + case ';': + if (sc == NULL) { + sc = YYCURSOR; } + /* no break */ + default: + YYCURSOR++; break; } } +end_raw_value_chars: yyleng = YYCURSOR - SCNG(yy_text); - RETURN_TOKEN(TC_RAW, yytext, yyleng); -} -{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */ + /* Eat trailing semicolons */ + while (yytext[yyleng - 1] == ';') { + yyleng--; + } + + /* Eat leading and trailing double quotes */ + if (yytext[0] == '"' && yytext[yyleng - 1] == '"') { + SCNG(yy_text)++; + yyleng = yyleng - 2; + } else if (sc) { + YYCURSOR = sc; + yyleng = YYCURSOR - SCNG(yy_text); + } RETURN_TOKEN(TC_RAW, yytext, yyleng); } diff --git a/ext/standard/tests/file/bug51094.phpt b/ext/standard/tests/file/bug51094.phpt index 7823558..f35dfb6 100644 --- a/ext/standard/tests/file/bug51094.phpt +++ b/ext/standard/tests/file/bug51094.phpt @@ -15,7 +15,7 @@ $ini = parse_ini_string("ini=\r\niniraw", null, INI_SCANNER_RAW); var_dump($ini['ini']); --EXPECTF-- string(7) "ini;raw" -string(8) ""ini;raw" +string(4) ""ini" string(3) "ini" string(7) "ini"raw" string(0) "" diff --git a/ext/standard/tests/file/bug63512.phpt b/ext/standard/tests/file/bug63512.phpt new file mode 100644 index 000..049db26 --- /dev/null +++ b/ext/standard/tests/file/bug63512.phpt @@ -0,0 +1,33 @@ +--TEST-- +Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value). +--FILE-- + + string(3) "123" + ["constant"]=> + string(12) "INSTALL_
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: Zend/zend_ini_scanner.c Zend/zend_ini_scanner_defs.h
Commit:99edb55e417aeb7e5a9eaad4eac68a9e074bfc0f Author:Pierrick Charron Fri, 16 Nov 2012 18:24:42 -0500 Parents: 15ab75be8ad014c6fff5f2b908824ef18150a7ea c886691100eb554c01f14b69bd142e21c84ae6f6 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=99edb55e417aeb7e5a9eaad4eac68a9e074bfc0f Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Regenerate Zend ini scanner Conflicts: Zend/zend_ini_scanner.c Zend/zend_ini_scanner_defs.h Changed paths: MM Zend/zend_ini_scanner.c MM Zend/zend_ini_scanner_defs.h Diff: diff --cc Zend/zend_ini_scanner.c index 94c48c8,b713163..a481cbd --- a/Zend/zend_ini_scanner.c +++ b/Zend/zend_ini_scanner.c @@@ -1,4 -1,4 +1,4 @@@ - /* Generated by re2c 0.13.5 on Thu Jun 7 17:48:25 2012 */ -/* Generated by re2c 0.13.5 on Fri Nov 16 17:44:02 2012 */ ++/* Generated by re2c 0.13.5 on Fri Nov 16 18:24:06 2012 */ #line 1 "Zend/zend_ini_scanner.l" /* +--+ diff --cc Zend/zend_ini_scanner_defs.h index 0c04713,50a5aea..1fe4c0c --- a/Zend/zend_ini_scanner_defs.h +++ b/Zend/zend_ini_scanner_defs.h @@@ -1,4 -1,4 +1,4 @@@ - /* Generated by re2c 0.13.5 on Thu Jun 7 17:48:25 2012 */ -/* Generated by re2c 0.13.5 on Fri Nov 16 17:44:02 2012 */ ++/* Generated by re2c 0.13.5 on Fri Nov 16 18:24:06 2012 */ #line 3 "Zend/zend_ini_scanner_defs.h" enum YYCONDTYPE { -- 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:ec3619239025979977e4bbe0998e03eff0afacf4 Author:Pierrick Charron Fri, 28 Sep 2012 15:26:53 -0400 Parents: 936553d666405bc783511979b17d78d51905b9cd Branches: PHP-5.3 PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ec3619239025979977e4bbe0998e03eff0afacf4 Log: Update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 83abf01..a050852 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,10 @@ PHP NEWS . Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function). (Dmitry) +- cURL: + . Fixed bug #62085 (file_get_contents a remote file by Curl wrapper will +cause cpu Soaring). (Pierrick) + - FPM: . Fixed bug #62954 (startup problems fpm / php-fpm). (fat) . Fixed bug #62886 (PHP-FPM may segfault/hang on startup). (fat) -- 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.3' into PHP-5.4: NEWS
Commit:f495e9305716a6b2ce448e56cf463169b196d08c Author:Pierrick Charron Fri, 28 Sep 2012 15:28:37 -0400 Parents: a2a82201277259a50f064c5b46983cf99e974198 ec3619239025979977e4bbe0998e03eff0afacf4 Branches: PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f495e9305716a6b2ce448e56cf463169b196d08c Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Update NEWS Changed paths: MM NEWS Diff: diff --cc NEWS index ca00e47,a050852..e8ad173 --- a/NEWS +++ b/NEWS @@@ -17,19 -8,17 +17,23 @@@ PH (Laruence) . Fixed bug #62976 (Notice: could not be converted to int when comparing some builtin classes). (Laruence) + . Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" +Windows registry). (aserbulov at parallels dot com) + . Fixed bug #62907 (Double free when use traits). (Dmitry) . Fixed bug #61767 (Shutdown functions not called in certain error situation). (Dmitry) - . Fixed bug #61442 (exception threw in __autoload can not be catched). -(Laruence) . Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function). (Dmitry) + . Fixed bug #60723 (error_log error time has changed to UTC ignoring default +timezo). (Laruence) + - cURL: + . Fixed bug #62085 (file_get_contents a remote file by Curl wrapper will + cause cpu Soaring). (Pierrick) + +- DOM: + . Fixed bug #63015 (Incorrect arginfo for DOMErrorHandler). (Rob) + - FPM: . Fixed bug #62954 (startup problems fpm / php-fpm). (fat) . Fixed bug #62886 (PHP-FPM may segfault/hang on startup). (fat) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: FD_ZERO file descriptors before calling curl_multi_fdset: ext/curl/streams.c
Commit:936553d666405bc783511979b17d78d51905b9cd Author:Pierrick Charron Fri, 28 Sep 2012 15:19:03 -0400 Parents: 4358e90a8f4fc7b3eaf6f42315b5d71b953391c6 Branches: PHP-5.3 PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=936553d666405bc783511979b17d78d51905b9cd Log: FD_ZERO file descriptors before calling curl_multi_fdset As per curl documentation http://curl.haxx.se/libcurl/c/curl_multi_fdset.html we need to FD_ZERO file descriptors before calling the curl_multi_fdset function Changed paths: M ext/curl/streams.c Diff: diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 4f97ee0..e317285 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -162,6 +162,10 @@ static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count T } do { + FD_ZERO(&curlstream->readfds); + FD_ZERO(&curlstream->writefds); + FD_ZERO(&curlstream->excfds); + /* get the descriptors from curl */ curl_multi_fdset(curlstream->multi, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &curlstream->maxfd); -- 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.3' into PHP-5.4: ext/curl/streams.c
Commit:a2a82201277259a50f064c5b46983cf99e974198 Author:Pierrick Charron Fri, 28 Sep 2012 15:21:33 -0400 Parents: 34c3985979cb27cd1fff1ca767b3162357da7b0b 936553d666405bc783511979b17d78d51905b9cd Branches: PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a2a82201277259a50f064c5b46983cf99e974198 Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: FD_ZERO file descriptors before calling curl_multi_fdset Changed paths: MM ext/curl/streams.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Avoid calling select if maxfd returned by curl_multi_fdset is -1: ext/curl/multi.c
Commit:2e8ab65270e7d1ebe1ef0dfe13836c29d72c7010 Author:Pierrick Charron Sat, 22 Sep 2012 10:15:40 -0400 Parents: 46458c2c65b7eec1fbe07dedd97fb6990843f3d6 Branches: PHP-5.3 PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2e8ab65270e7d1ebe1ef0dfe13836c29d72c7010 Log: Avoid calling select if maxfd returned by curl_multi_fdset is -1 As per libcurl documentation : When libcurl returns -1 in max_fd, it is because libcurl currently does something that isn't possible for your application to monitor with a socket and unfortunately you can then not know exactly when the current action is completed using select(). Changed paths: M ext/curl/multi.c Diff: diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 034aa65..53e97b8 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -191,6 +191,9 @@ PHP_FUNCTION(curl_multi_select) FD_ZERO(&exceptfds); curl_multi_fdset(mh->multi, &readfds, &writefds, &exceptfds, &maxfd); + if (maxfd == -1) { + RETURN_LONG(-1); + } RETURN_LONG(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to)); } /* }}} */ -- 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': ext/curl/multi.c
Commit:6c135dff975f111ec5a84af93c1b98e9ae84fcd1 Author:Pierrick Charron Sat, 22 Sep 2012 10:19:16 -0400 Parents: 70713a27b69962126a8e75caf01c88db96a542e3 c8687ee63b0aa0cbe8da1e8d5c65a338eb69f83a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6c135dff975f111ec5a84af93c1b98e9ae84fcd1 Log: Merge branch 'PHP-5.4' * PHP-5.4: Avoid calling select if maxfd returned by curl_multi_fdset is -1 Fixing NEWS file Changed paths: MM ext/curl/multi.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add CURLOPT_READDATA which was removed by mistake: ext/curl/interface.c
Commit:70713a27b69962126a8e75caf01c88db96a542e3 Author:Pierrick Charron Sat, 22 Sep 2012 10:04:51 -0400 Parents: 8984de467269d9b3da67d182bfd65baf6ce4d9d9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=70713a27b69962126a8e75caf01c88db96a542e3 Log: Add CURLOPT_READDATA which was removed by mistake I did a check and this is the only one which was removed by mistake. No other constants are available in 5.4 branch and not in master Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 523bc1c..d9abece 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -638,6 +638,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_QUOTE); REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE); REGISTER_CURL_CONSTANT(CURLOPT_RANGE); + REGISTER_CURL_CONSTANT(CURLOPT_READDATA); REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_REFERER); REGISTER_CURL_CONSTANT(CURLOPT_RESUME_FROM); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bad version for CURLINFO_CERTINFO: ext/curl/interface.c
Commit:101fd2d3fde0d963f9658b2fc11ac0e7e27258d9 Author:Pierrick Charron Sun, 26 Aug 2012 09:03:45 -0400 Parents: 14c88ff82c1832c2e0d2c4ee49c0170cad3158d5 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=101fd2d3fde0d963f9658b2fc11ac0e7e27258d9 Log: Fix bad version for CURLINFO_CERTINFO CURLINFO_CERTINFO is available since 7.19.1. The cURL extension allow to use it since this same version but the internal function create_certinfo used internally for CURLINFO_CERTINFO usage is only usable for version greater than 7.19.1 which will cause problem if the user is using the 7.19.1 cURL version Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 899ea60..7f865fe 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -786,6 +786,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5); /* Curl Share constants */ + REGISTER_CURL_CONSTANT(CURLSHOPT_NONE); REGISTER_CURL_CONSTANT(CURLSHOPT_SHARE); REGISTER_CURL_CONSTANT(CURLSHOPT_UNSHARE); @@ -814,6 +815,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE); REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE); REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD); + REGISTER_CURL_CONSTANT(CURL_TIMECOND_NONE); /* Curl version constants */ REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6); @@ -1743,7 +1745,7 @@ static void alloc_curl_handle(php_curl **ch) } /* }}} */ -#if LIBCURL_VERSION_NUM > 0x071301 +#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */ /* {{{ split_certinfo */ static void split_certinfo(char *string, zval *hash) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add missing constants in cURL: ext/curl/interface.c
Commit:9ab45d3edbafa3ee751472c3f8d1fb3f51f38cf1 Author:Pierrick Charron Sat, 25 Aug 2012 01:21:17 -0400 Parents: e5ff3f18f5706a0bdf26bf0a68cfa22607d006ff Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9ab45d3edbafa3ee751472c3f8d1fb3f51f38cf1 Log: Add missing constants in cURL Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index c31bce4..899ea60 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -638,7 +638,6 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_QUOTE); REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE); REGISTER_CURL_CONSTANT(CURLOPT_RANGE); - REGISTER_CURL_CONSTANT(CURLOPT_READDATA); REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_REFERER); REGISTER_CURL_CONSTANT(CURLOPT_RESUME_FROM); @@ -681,6 +680,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLE_ABORTED_BY_CALLBACK); REGISTER_CURL_CONSTANT(CURLE_BAD_CALLING_ORDER); REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING); + REGISTER_CURL_CONSTANT(CURLE_BAD_DOWNLOAD_RESUME); REGISTER_CURL_CONSTANT(CURLE_BAD_FUNCTION_ARGUMENT); REGISTER_CURL_CONSTANT(CURLE_BAD_PASSWORD_ENTERED); REGISTER_CURL_CONSTANT(CURLE_COULDNT_CONNECT); @@ -713,12 +713,14 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLE_HTTP_PORT_FAILED); REGISTER_CURL_CONSTANT(CURLE_HTTP_POST_ERROR); REGISTER_CURL_CONSTANT(CURLE_HTTP_RANGE_ERROR); + REGISTER_CURL_CONSTANT(CURLE_HTTP_RETURNED_ERROR); REGISTER_CURL_CONSTANT(CURLE_LDAP_CANNOT_BIND); REGISTER_CURL_CONSTANT(CURLE_LDAP_SEARCH_FAILED); REGISTER_CURL_CONSTANT(CURLE_LIBRARY_NOT_FOUND); REGISTER_CURL_CONSTANT(CURLE_MALFORMAT_USER); REGISTER_CURL_CONSTANT(CURLE_OBSOLETE); REGISTER_CURL_CONSTANT(CURLE_OK); + REGISTER_CURL_CONSTANT(CURLE_OPERATION_TIMEDOUT); REGISTER_CURL_CONSTANT(CURLE_OPERATION_TIMEOUTED); REGISTER_CURL_CONSTANT(CURLE_OUT_OF_MEMORY); REGISTER_CURL_CONSTANT(CURLE_PARTIAL_FILE); @@ -751,6 +753,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLINFO_HEADER_OUT); REGISTER_CURL_CONSTANT(CURLINFO_HEADER_SIZE); REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CODE); + REGISTER_CURL_CONSTANT(CURLINFO_LASTONE); REGISTER_CURL_CONSTANT(CURLINFO_NAMELOOKUP_TIME); REGISTER_CURL_CONSTANT(CURLINFO_PRETRANSFER_TIME); REGISTER_CURL_CONSTANT(CURLINFO_PRIVATE); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update bad versions for cURL constants: ext/curl/interface.c
Commit:e5ff3f18f5706a0bdf26bf0a68cfa22607d006ff Author:Pierrick Charron Fri, 24 Aug 2012 18:04:16 -0400 Parents: 2a2e31d2a5cc16cb538be6efa37993a4162568c9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e5ff3f18f5706a0bdf26bf0a68cfa22607d006ff Log: Update bad versions for cURL constants This was updated according to the cURL symbol tables located here : http://curl.haxx.se/libcurl/c/symbols-in-versions.html Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 8050351..c31bce4 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -925,7 +925,11 @@ PHP_MINIT_FUNCTION(curl) #endif #if LIBCURL_VERSION_NUM >= 0x071001 /* Available since 7.16.1 */ + REGISTER_CURL_CONSTANT(CURLE_SSH); REGISTER_CURL_CONSTANT(CURLOPT_FTP_SSL_CCC); + REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES); + REGISTER_CURL_CONSTANT(CURLOPT_SSH_PRIVATE_KEYFILE); + REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE); REGISTER_CURL_CONSTANT(CURLFTPSSL_CCC_ACTIVE); REGISTER_CURL_CONSTANT(CURLFTPSSL_CCC_NONE); REGISTER_CURL_CONSTANT(CURLFTPSSL_CCC_PASSIVE); @@ -940,13 +944,13 @@ PHP_MINIT_FUNCTION(curl) #if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */ REGISTER_CURL_CONSTANT(CURLOPT_KRBLEVEL); + REGISTER_CURL_CONSTANT(CURLOPT_NEW_DIRECTORY_PERMS); + REGISTER_CURL_CONSTANT(CURLOPT_NEW_FILE_PERMS); #endif #if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */ REGISTER_CURL_CONSTANT(CURLOPT_APPEND); REGISTER_CURL_CONSTANT(CURLOPT_DIRLISTONLY); - REGISTER_CURL_CONSTANT(CURLOPT_NEW_DIRECTORY_PERMS); - REGISTER_CURL_CONSTANT(CURLOPT_NEW_FILE_PERMS); REGISTER_CURL_CONSTANT(CURLOPT_USE_SSL); /* Curl SSL Constants */ REGISTER_CURL_CONSTANT(CURLUSESSL_ALL); @@ -955,6 +959,10 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLUSESSL_TRY); #endif +#if LIBCURL_VERSION_NUM >= 0x071101 /* Available since 7.17.1 */ + REGISTER_CURL_CONSTANT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5); +#endif + #if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */ REGISTER_CURL_CONSTANT(CURLOPT_PROXY_TRANSFER_MODE); #endif @@ -964,7 +972,6 @@ PHP_MINIT_FUNCTION(curl) #endif #if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */ - REGISTER_CURL_CONSTANT(CURLE_SSH); REGISTER_CURL_CONSTANT(CURLINFO_APPCONNECT_TIME); REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_IP); @@ -972,10 +979,6 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_CRLFILE); REGISTER_CURL_CONSTANT(CURLOPT_ISSUERCERT); REGISTER_CURL_CONSTANT(CURLOPT_KEYPASSWD); - REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES); - REGISTER_CURL_CONSTANT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5); - REGISTER_CURL_CONSTANT(CURLOPT_SSH_PRIVATE_KEYFILE); - REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_ANY); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_DEFAULT); @@ -2085,6 +2088,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #endif #if LIBCURL_VERSION_NUM >= 0x071001 /* Available since 7.16.1 */ case CURLOPT_FTP_SSL_CCC: + case CURLOPT_SSH_AUTH_TYPES: #endif #if LIBCURL_VERSION_NUM >= 0x071002 /* Available since 7.16.2 */ case CURLOPT_CONNECTTIMEOUT_MS: @@ -2092,6 +2096,10 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu case CURLOPT_HTTP_TRANSFER_DECODING: case CURLOPT_TIMEOUT_MS: #endif +#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */ + case CURLOPT_NEW_DIRECTORY_PERMS: + case CURLOPT_NEW_FILE_PERMS: +#endif #if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */ case CURLOPT_USE_SSL: #elif LIBCURL_VERSION_NUM >= 0x070b00 /* Available since 7.11.0 */ @@ -2100,8 +2108,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */ case CURLOPT_APPEND: case CURLOPT_DIRLISTONLY: - case CURLOPT_NEW_DIRECTORY_PERMS: - case CURLOPT_NEW_FILE_PERMS: #else case CURLOPT_FTPAPPEND: case CURLOPT_FTPLISTONLY: @@ -2111,7 +2117,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #endif #if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */ case CURLOPT_ADDRESS_SCOPE: - case CURLOPT_SSH_AUTH_TYPES: #endif #if LIBCURL_VERSION_NUM > 0x071301 /* Available since 7.19.1 */ case CURLOPT_CERTINFO: @@ -2187,7 +2192,7 @@ static int _php_curl_setopt(php_curl *c
[PHP-CVS] com php-src: Fixed bug #62912 (CURLINFO_PRIMARY_IP is not exposed): NEWS ext/curl/interface.c
Commit:4c83ecc75452a23799c39f9bbb95b617fa46bf84 Author:Pierrick Charron Fri, 24 Aug 2012 10:16:40 -0400 Parents: 2c74536e6ec2a3c8edc25bfe84d19c9632c68a76 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4c83ecc75452a23799c39f9bbb95b617fa46bf84 Log: Fixed bug #62912 (CURLINFO_PRIMARY_IP is not exposed) CURLINFO_PRIMARY_* and CURLINFO_LOCAL_* where available in curl_getinfo but the constant itself was not exposed to php userland Bugs: https://bugs.php.net/62912 Changed paths: M NEWS M ext/curl/interface.c Diff: diff --git a/NEWS b/NEWS index b51f28e..5e482d2 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ PHP NEWS constructor). (Stas) - CURL: + . Fixed bug #62912 (CURLINFO_PRIMARY_* AND CURLINFO_LOCAL_* not exposed). + (Pierrick) . Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick) - DateTime: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index b57ce1b..d75e5c0 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -713,6 +713,14 @@ PHP_MINIT_FUNCTION(curl) #if LIBCURL_VERSION_NUM >= 0x071202 REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL); #endif +#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */ + REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_IP); +#endif +#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */ + REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT); + REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP); + REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT); +#endif /* cURL protocol constants (curl_version) */ @@ -2447,6 +2455,8 @@ PHP_FUNCTION(curl_getinfo) create_certinfo(ci, listcode TSRMLS_CC); CAAZ("certinfo", listcode); } +#endif +#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */ if (curl_easy_getinfo(ch->cp, CURLINFO_PRIMARY_IP, &s_code) == CURLE_OK) { CAAS("primary_ip", s_code); } @@ -2473,10 +2483,10 @@ PHP_FUNCTION(curl_getinfo) } else { switch (option) { /* string variable types */ -#if LIBCURL_VERSION_NUM >= 0x071500 +#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */ case CURLINFO_PRIMARY_IP: #endif -#if LIBCURL_VERSION_NUM >= 0x071500 +#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */ case CURLINFO_LOCAL_IP: #endif case CURLINFO_PRIVATE: @@ -2496,7 +2506,7 @@ PHP_FUNCTION(curl_getinfo) break; } /* Long variable types */ -#if LIBCURL_VERSION_NUM >= 0x071500 +#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */ case CURLINFO_PRIMARY_PORT: case CURLINFO_LOCAL_PORT: #endif -- 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': ext/curl/interface.c
Commit:2118ab9ab4cb4ea8b473852559b0914347992767 Author:Pierrick Charron Thu, 16 Aug 2012 14:51:28 -0400 Parents: f84947c688203b627895078218647599085333ed 8ac61a3e60329a10dfc85036ef46d78e53f8de95 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2118ab9ab4cb4ea8b473852559b0914347992767 Log: Merge branch 'PHP-5.4' * PHP-5.4: Fixed bug #62839 Bugs: https://bugs.php.net/62839 Changed paths: MM ext/curl/interface.c Diff: diff --cc ext/curl/interface.c index 0deae0f,b57ce1b..8050351 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@@ -1920,10 -1606,11 +1920,10 @@@ PHP_FUNCTION(curl_copy_handle dupch->uses = 0; ch->uses++; if (ch->handlers->write->stream) { - Z_ADDREF_P(dupch->handlers->write->stream); - dupch->handlers->write->stream = ch->handlers->write->stream; + Z_ADDREF_P(ch->handlers->write->stream); } + dupch->handlers->write->stream = ch->handlers->write->stream; dupch->handlers->write->method = ch->handlers->write->method; - dupch->handlers->write->type = ch->handlers->write->type; if (ch->handlers->read->stream) { Z_ADDREF_P(ch->handlers->read->stream); } -- 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.3' into PHP-5.4: ext/curl/interface.c
Commit:8ac61a3e60329a10dfc85036ef46d78e53f8de95 Author:Pierrick Charron Thu, 16 Aug 2012 14:50:06 -0400 Parents: 2e1d31d123ea5f310719c6c3c51587834907b7bf 9cf0139460c7531ebe8fdd523ba6cf7067a7f282 Branches: PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8ac61a3e60329a10dfc85036ef46d78e53f8de95 Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Fixed bug #62839 Bugs: https://bugs.php.net/62839 Changed paths: MM ext/curl/interface.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #62839: NEWS ext/curl/interface.c ext/curl/tests/bug62839.phpt
Commit:9cf0139460c7531ebe8fdd523ba6cf7067a7f282 Author:Pierrick Charron Thu, 16 Aug 2012 14:48:44 -0400 Parents: 8649e4236b12ce9b90356a5804be96bd1f67bcd6 Branches: PHP-5.3 PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9cf0139460c7531ebe8fdd523ba6cf7067a7f282 Log: Fixed bug #62839 curl_copy_handle segfault with CURLOPT_FILE. The refcount was incremented before the assignement. Bugs: https://bugs.php.net/62839 Changed paths: M NEWS M ext/curl/interface.c A ext/curl/tests/bug62839.phpt Diff: diff --git a/NEWS b/NEWS index 8da7256..7f5c48b 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ PHP NEWS with run-test.php). (Laruence) - CURL: + . Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick) . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false). (r.hampartsum...@gmail.com, Laruence) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 94be60f..7b72873 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1610,9 +1610,9 @@ PHP_FUNCTION(curl_copy_handle) dupch->uses = 0; ch->uses++; if (ch->handlers->write->stream) { - Z_ADDREF_P(dupch->handlers->write->stream); - dupch->handlers->write->stream = ch->handlers->write->stream; + Z_ADDREF_P(ch->handlers->write->stream); } + dupch->handlers->write->stream = ch->handlers->write->stream; dupch->handlers->write->method = ch->handlers->write->method; dupch->handlers->write->type = ch->handlers->write->type; if (ch->handlers->read->stream) { diff --git a/ext/curl/tests/bug62839.phpt b/ext/curl/tests/bug62839.phpt new file mode 100644 index 000..39e6fc9 --- /dev/null +++ b/ext/curl/tests/bug62839.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #62839 (curl_copy_handle segfault with CURLOPT_FILE) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +DONE! -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #62615 (test ext/curl/tests/curl_escape.phpt failed).: ext/curl/tests/curl_escape.phpt
Commit:edece6ec84484690d7ddf8fe971a48747059ba60 Author:Pierrick Charron Thu, 26 Jul 2012 19:13:42 -0400 Parents: 80497ea7dfade2ccd032ef65103c0a113338653a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=edece6ec84484690d7ddf8fe971a48747059ba60 Log: Fixed bug #62615 (test ext/curl/tests/curl_escape.phpt failed). curl_easy_escape was modified in 5.21.2 to not escape "unreserved" characters so this test will fail on version older than 5.21.2 Bugs: https://bugs.php.net/62615 Changed paths: M ext/curl/tests/curl_escape.phpt Diff: diff --git a/ext/curl/tests/curl_escape.phpt b/ext/curl/tests/curl_escape.phpt index 7c90fb9..e759144 100644 Binary files a/ext/curl/tests/curl_escape.phpt and b/ext/curl/tests/curl_escape.phpt differ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: NEWS File: NEWS
Commit:c467e81c86b3f4d312459553c23792492009a917 Author:Pierrick Charron Fri, 8 Jun 2012 18:02:49 +0200 Parents: 59eaa7c877e6bacb4783f929b924e2582c4a82f1 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c467e81c86b3f4d312459553c23792492009a917 Log: NEWS File Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 348a06e..ee7dc76 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHPNEWS ||| ?? ??? 2012, PHP 5.4.5 +- Zend Engine: + . Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that +includes a semi-colon). (Pierrick) - Core: . Fixed bug #61998 (Using traits with method aliases appears to result in @@ -55,6 +58,7 @@ PHP NEWS - 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) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon): NEWS Zend/zend_ini_scanner.l ext/standard/tests/file/bug51094.phpt
Commit:fed5923dbc849659321a4f9aa96634ddd1655229 Author:Pierrick Charron Thu, 7 Jun 2012 17:44:20 +0200 Parents: c56ff39c05be5b846973760ef8bdad8401defe24 Branches: PHP-5.3 PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fed5923dbc849659321a4f9aa96634ddd1655229 Log: Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon) Modify the scanner to check if the first char of the raw data is an opening " in which case we need to find the closing one. Otherwise just search for the next end of value char [\r\n;\000] Bugs: https://bugs.php.net/51094 Changed paths: M NEWS M Zend/zend_ini_scanner.l A ext/standard/tests/file/bug51094.phpt Diff: diff --git a/NEWS b/NEWS index 42eb5b4..a6b41f4 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ PHPNEWS ||| ?? ??? 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) diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 0c452e6..8aeb076 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -347,7 +347,7 @@ DOLLAR_CURLY "${" SECTION_RAW_CHARS [^\]\n\r] SINGLE_QUOTED_CHARS [^'] -RAW_VALUE_CHARS [^\n\r;\000] +RAW_VALUE_CHARS [^"\n\r;\000] LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR}))) VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR}) @@ -445,12 +445,33 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR}) return '='; } -{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */ - /* Eat leading and trailing double quotes */ - if (yytext[0] == '"' && yytext[yyleng - 1] == '"') { - SCNG(yy_text)++; - yyleng = yyleng - 2; +["] { + while (YYCURSOR < YYLIMIT) { + switch (*YYCURSOR++) { + case '\n': + SCNG(lineno)++; + break; + case '\r': + if (*YYCURSOR != '\n') { + SCNG(lineno)++; + } + break; + case '"': + yyleng = YYCURSOR - SCNG(yy_text) - 2; + SCNG(yy_text)++; + RETURN_TOKEN(TC_RAW, yytext, yyleng); + case '\\': + if (YYCURSOR < YYLIMIT) { + YYCURSOR++; + } + break; + } } + yyleng = YYCURSOR - SCNG(yy_text); + RETURN_TOKEN(TC_RAW, yytext, yyleng); +} + +{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */ RETURN_TOKEN(TC_RAW, yytext, yyleng); } diff --git a/ext/standard/tests/file/bug51094.phpt b/ext/standard/tests/file/bug51094.phpt new file mode 100644 index 000..7823558 --- /dev/null +++ b/ext/standard/tests/file/bug51094.phpt @@ -0,0 +1,22 @@ +--TEST-- +Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon). +--FILE-- +http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed the libcurl version checking for CURLOPT_MAIL_AUTH: ext/curl/interface.c
Commit:d41fb16a52a374b070d35253c9599c8d6f609b7a Author:Your Name Sun, 27 May 2012 00:21:08 -0700 Parents: f75c1ed201102aedfe9e04b24c6d74fe2f74b53d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d41fb16a52a374b070d35253c9599c8d6f609b7a Log: Fixed the libcurl version checking for CURLOPT_MAIL_AUTH Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 09f4974..f6e0b05 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1036,7 +1036,6 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SERVER_CSEQ); REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SESSION_ID); REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_PRET); - REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_FROM); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_RCPT); REGISTER_CURL_CONSTANT(CURLOPT_RTSP_CLIENT_CSEQ); @@ -1107,6 +1106,10 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_DNS_SERVERS); #endif +#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH); +#endif + #if CURLOPT_FTPASCII != 0 REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII); #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Added support for CURLOPT_MAIL_AUTH: ext/curl/interface.c
Commit:f75c1ed201102aedfe9e04b24c6d74fe2f74b53d Author:Your Name Sun, 27 May 2012 00:02:53 -0700 Parents: e7a7f533e32813b13255efa236b711f6d1f6325d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f75c1ed201102aedfe9e04b24c6d74fe2f74b53d Log: Added support for CURLOPT_MAIL_AUTH Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 3533991..09f4974 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -18,6 +18,7 @@ /* $Id$ */ +#include #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #ifdef HAVE_CONFIG_H @@ -1035,6 +1036,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SERVER_CSEQ); REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SESSION_ID); REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_PRET); + REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_FROM); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_RCPT); REGISTER_CURL_CONSTANT(CURLOPT_RTSP_CLIENT_CSEQ); @@ -2214,6 +2216,9 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #if LIBCURL_VERSION_NUM >= 0x071800 /* Available since 7.24.0 */ case CURLOPT_DNS_SERVERS: #endif +#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */ +case CURLOPT_MAIL_AUTH: +#endif { #if LIBCURL_VERSION_NUM < 0x071100 char *copystr = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: VIM uses spaces as tabs and that doesn't comply with the coding standard. I think I'd fixed it so it's using real tabs now.: ext/curl/interface.c
Commit:60c47285941490a5cc91aada4a7f0cfbbc42561d Author:Your Name Sun, 27 May 2012 15:39:45 -0700 Parents: 0667da8cb42d7df70175b47a910ae127d5cf6246 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=60c47285941490a5cc91aada4a7f0cfbbc42561d Log: VIM uses spaces as tabs and that doesn't comply with the coding standard. I think I'd fixed it so it's using real tabs now. Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index c066d6b..14836cc 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2219,7 +2219,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu case CURLOPT_DNS_SERVERS: #endif #if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */ -case CURLOPT_MAIL_AUTH: + case CURLOPT_MAIL_AUTH: #endif { #if LIBCURL_VERSION_NUM < 0x071100 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Removed syslog.h. That should never have been commited.: ext/curl/interface.c
Commit:0667da8cb42d7df70175b47a910ae127d5cf6246 Author:Your Name Sun, 27 May 2012 01:50:29 -0700 Parents: d41fb16a52a374b070d35253c9599c8d6f609b7a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0667da8cb42d7df70175b47a910ae127d5cf6246 Log: Removed syslog.h. That should never have been commited. Changed paths: M ext/curl/interface.c Diff: diff --git a/ext/curl/interface.c b/ext/curl/interface.c index f6e0b05..c066d6b 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -18,7 +18,6 @@ /* $Id$ */ -#include #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #ifdef HAVE_CONFIG_H -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/pdo_mysql/mysql_statement.c
I looked at the git log/diff and I think there is a problem with the mailing system. It did not send the diff from the good parent for the merge. Pierrick On 24 March 2012 18:07, Pierrick Charron wrote: > Hmmm I think I have the same issue as Hannes. All those changes are not > the one I did on the 5.3 branch. > Any clue on how to deal with that ? > > Thanks > Pierrick > > > On 24 March 2012 17:59, Pierrick Charron wrote: > >> Commit:7f05a39fce42029c126d6dc315ffdad43d27c8e9 >> Author:Pierrick Charron Sat, 24 Mar 2012 >> 17:59:46 -0400 >> Parents: 10809686f0dbcbbf0eb06c968d65e0febe1dc034 >> da2da13f935b2775635cd21b47a78fbf025a462d >> Branches: PHP-5.4 master >> >> Link: >> http://git.php.net/?p=php-src.git;a=commitdiff;h=7f05a39fce42029c126d6dc315ffdad43d27c8e9 >> >> Log: >> Merge branch 'PHP-5.3' into PHP-5.4 >> >> Changed paths: >> MM ext/pdo_mysql/mysql_statement.c >> >> >> Diff: >> 7f05a39fce42029c126d6dc315ffdad43d27c8e9 >> diff --combined ext/pdo_mysql/mysql_statement.c >> index 20e67e4,115e74c..0c2689f >> --- a/ext/pdo_mysql/mysql_statement.c >> +++ b/ext/pdo_mysql/mysql_statement.c >> @@@ -59,10 -59,12 +59,10 @@@ static int pdo_mysql_stmt_dtor(pdo_stmt >>pefree(S->einfo.errmsg, stmt->dbh->is_persistent); >>S->einfo.errmsg = NULL; >>} >> -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND >>if (S->stmt) { >>pdo_mysql_stmt_close(S->stmt); >>S->stmt = NULL; >>} >> -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */ >> >> #ifndef PDO_USE_MYSQLND >>if (S->params) { >> @@@ -75,6 -77,9 +75,6 @@@ >>efree(S->in_length); >>} >> >> -#endif /* PDO_USE_MYSQLND */ >> - >> -#ifdef HAVE_MYSQL_STMT_PREPARE >>if (S->bound_result) >>{ >>int i; >> @@@ -86,9 -91,10 +86,9 @@@ >>efree(S->out_null); >>efree(S->out_length); >>} >> -#endif /* HAVE_MYSQL_STMT_PREPARE */ >> +#endif >> >> >> -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND >>if (S->H->server) { >>while (mysql_more_results(S->H->server)) { >>MYSQL_RES *res; >> @@@ -101,8 -107,8 +101,8 @@@ >>mysql_free_result(res); >>} >>} >> - } >> -#endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */ >> + } >> + >> #if PDO_USE_MYSQLND >>if (!S->stmt && S->current_data) { >>mnd_free(S->current_data); >> @@@ -158,7 -164,7 +158,7 @@@ static int pdo_mysql_fill_stmt_from_res >> } >> /* }}} */ >> >> -#ifdef HAVE_MYSQL_STMT_PREPARE >> +#ifndef PDO_USE_MYSQLND >> static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt >> TSRMLS_DC) /* {{{ */ >> { >>pdo_mysql_stmt *S = stmt->driver_data; >> @@@ -316,13 -322,14 +316,12 @@@ static int pdo_mysql_stmt_execute(pdo_s >> { >>pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; >>pdo_mysql_db_handle *H = S->H; >>PDO_DBG_ENTER("pdo_mysql_stmt_execute"); >>PDO_DBG_INF_FMT("stmt=%p", S->stmt); >> >>if (S->stmt) { >>PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt)); >>} >> -#endif >> >>/* ensure that we free any previous unfetched results */ >>if (S->result) { >> @@@ -341,6 -348,7 +340,6 @@@ >> >> static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ >> */ >> { >> -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND >>pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; >>pdo_mysql_db_handle *H = S->H; >>long row_count; >> @@@ -402,7 -410,7 +401,7 @@@ >> #endif >> >> /* ensure that we free any previous unfetched results */ >> -#if HAVE_MYSQL_STMT_PREPARE >> +#ifndef PDO_USE_MYSQLND >>if (S->stmt) { >>stmt->column_count = (int)mysql_num_fields(S->result); >>mysql_stmt_free_result(S->stmt); >> @@@ -424,6 -432,10 +423,6 @@@ >>} else { >>PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt >> TSRM
Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/pdo_mysql/mysql_statement.c
Hmmm I think I have the same issue as Hannes. All those changes are not the one I did on the 5.3 branch. Any clue on how to deal with that ? Thanks Pierrick On 24 March 2012 17:59, Pierrick Charron wrote: > Commit:7f05a39fce42029c126d6dc315ffdad43d27c8e9 > Author:Pierrick Charron Sat, 24 Mar 2012 > 17:59:46 -0400 > Parents: 10809686f0dbcbbf0eb06c968d65e0febe1dc034 > da2da13f935b2775635cd21b47a78fbf025a462d > Branches: PHP-5.4 master > > Link: > http://git.php.net/?p=php-src.git;a=commitdiff;h=7f05a39fce42029c126d6dc315ffdad43d27c8e9 > > Log: > Merge branch 'PHP-5.3' into PHP-5.4 > > Changed paths: > MM ext/pdo_mysql/mysql_statement.c > > > Diff: > 7f05a39fce42029c126d6dc315ffdad43d27c8e9 > diff --combined ext/pdo_mysql/mysql_statement.c > index 20e67e4,115e74c..0c2689f > --- a/ext/pdo_mysql/mysql_statement.c > +++ b/ext/pdo_mysql/mysql_statement.c > @@@ -59,10 -59,12 +59,10 @@@ static int pdo_mysql_stmt_dtor(pdo_stmt >pefree(S->einfo.errmsg, stmt->dbh->is_persistent); >S->einfo.errmsg = NULL; >} > -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND >if (S->stmt) { >pdo_mysql_stmt_close(S->stmt); >S->stmt = NULL; >} > -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */ > > #ifndef PDO_USE_MYSQLND >if (S->params) { > @@@ -75,6 -77,9 +75,6 @@@ >efree(S->in_length); >} > > -#endif /* PDO_USE_MYSQLND */ > - > -#ifdef HAVE_MYSQL_STMT_PREPARE >if (S->bound_result) >{ >int i; > @@@ -86,9 -91,10 +86,9 @@@ >efree(S->out_null); >efree(S->out_length); >} > -#endif /* HAVE_MYSQL_STMT_PREPARE */ > +#endif > > > -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND >if (S->H->server) { >while (mysql_more_results(S->H->server)) { >MYSQL_RES *res; > @@@ -101,8 -107,8 +101,8 @@@ >mysql_free_result(res); >} >} > - } > -#endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */ > + } > + > #if PDO_USE_MYSQLND >if (!S->stmt && S->current_data) { >mnd_free(S->current_data); > @@@ -158,7 -164,7 +158,7 @@@ static int pdo_mysql_fill_stmt_from_res > } > /* }}} */ > > -#ifdef HAVE_MYSQL_STMT_PREPARE > +#ifndef PDO_USE_MYSQLND > static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt > TSRMLS_DC) /* {{{ */ > { >pdo_mysql_stmt *S = stmt->driver_data; > @@@ -316,13 -322,14 +316,12 @@@ static int pdo_mysql_stmt_execute(pdo_s > { >pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; >pdo_mysql_db_handle *H = S->H; >PDO_DBG_ENTER("pdo_mysql_stmt_execute"); >PDO_DBG_INF_FMT("stmt=%p", S->stmt); > >if (S->stmt) { >PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt)); >} > -#endif > >/* ensure that we free any previous unfetched results */ >if (S->result) { > @@@ -341,6 -348,7 +340,6 @@@ > > static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ > */ > { > -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND >pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; >pdo_mysql_db_handle *H = S->H; >long row_count; > @@@ -402,7 -410,7 +401,7 @@@ > #endif > > /* ensure that we free any previous unfetched results */ > -#if HAVE_MYSQL_STMT_PREPARE > +#ifndef PDO_USE_MYSQLND >if (S->stmt) { >stmt->column_count = (int)mysql_num_fields(S->result); >mysql_stmt_free_result(S->stmt); > @@@ -424,6 -432,10 +423,6 @@@ >} else { >PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt > TSRMLS_CC)); >} > -#else > - strcpy(stmt->error_code, "HYC00"); > - PDO_DBG_RETURN(0); > -#endif /* HAVE_MYSQL_STMT_PREPARE */ > } > /* }}} */ > > @@@ -445,6 -457,7 +444,6 @@@ static int pdo_mysql_stmt_param_hook(pd > #ifndef PDO_USE_MYSQLND >PDO_MYSQL_PARAM_BIND *b; > #endif > -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND >pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; > >PDO_DBG_ENTER("pdo_mysql_stmt_param_hook"); > @@@ -576,7 -589,7 +575,7 @@@ >break; >} >} > -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */ > +
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/pdo_mysql/mysql_statement.c
Commit:7f05a39fce42029c126d6dc315ffdad43d27c8e9 Author:Pierrick Charron Sat, 24 Mar 2012 17:59:46 -0400 Parents: 10809686f0dbcbbf0eb06c968d65e0febe1dc034 da2da13f935b2775635cd21b47a78fbf025a462d Branches: PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7f05a39fce42029c126d6dc315ffdad43d27c8e9 Log: Merge branch 'PHP-5.3' into PHP-5.4 Changed paths: MM ext/pdo_mysql/mysql_statement.c Diff: 7f05a39fce42029c126d6dc315ffdad43d27c8e9 diff --combined ext/pdo_mysql/mysql_statement.c index 20e67e4,115e74c..0c2689f --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@@ -59,10 -59,12 +59,10 @@@ static int pdo_mysql_stmt_dtor(pdo_stmt pefree(S->einfo.errmsg, stmt->dbh->is_persistent); S->einfo.errmsg = NULL; } -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND if (S->stmt) { pdo_mysql_stmt_close(S->stmt); S->stmt = NULL; } -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */ #ifndef PDO_USE_MYSQLND if (S->params) { @@@ -75,6 -77,9 +75,6 @@@ efree(S->in_length); } -#endif /* PDO_USE_MYSQLND */ - -#ifdef HAVE_MYSQL_STMT_PREPARE if (S->bound_result) { int i; @@@ -86,9 -91,10 +86,9 @@@ efree(S->out_null); efree(S->out_length); } -#endif /* HAVE_MYSQL_STMT_PREPARE */ +#endif -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND if (S->H->server) { while (mysql_more_results(S->H->server)) { MYSQL_RES *res; @@@ -101,8 -107,8 +101,8 @@@ mysql_free_result(res); } } - } -#endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */ + } + #if PDO_USE_MYSQLND if (!S->stmt && S->current_data) { mnd_free(S->current_data); @@@ -158,7 -164,7 +158,7 @@@ static int pdo_mysql_fill_stmt_from_res } /* }}} */ -#ifdef HAVE_MYSQL_STMT_PREPARE +#ifndef PDO_USE_MYSQLND static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ { pdo_mysql_stmt *S = stmt->driver_data; @@@ -316,13 -322,14 +316,12 @@@ static int pdo_mysql_stmt_execute(pdo_s { pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; pdo_mysql_db_handle *H = S->H; PDO_DBG_ENTER("pdo_mysql_stmt_execute"); PDO_DBG_INF_FMT("stmt=%p", S->stmt); if (S->stmt) { PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt)); } -#endif /* ensure that we free any previous unfetched results */ if (S->result) { @@@ -341,6 -348,7 +340,6 @@@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ { -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; pdo_mysql_db_handle *H = S->H; long row_count; @@@ -402,7 -410,7 +401,7 @@@ #endif /* ensure that we free any previous unfetched results */ -#if HAVE_MYSQL_STMT_PREPARE +#ifndef PDO_USE_MYSQLND if (S->stmt) { stmt->column_count = (int)mysql_num_fields(S->result); mysql_stmt_free_result(S->stmt); @@@ -424,6 -432,10 +423,6 @@@ } else { PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt TSRMLS_CC)); } -#else - strcpy(stmt->error_code, "HYC00"); - PDO_DBG_RETURN(0); -#endif /* HAVE_MYSQL_STMT_PREPARE */ } /* }}} */ @@@ -445,6 -457,7 +444,6 @@@ static int pdo_mysql_stmt_param_hook(pd #ifndef PDO_USE_MYSQLND PDO_MYSQL_PARAM_BIND *b; #endif -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; PDO_DBG_ENTER("pdo_mysql_stmt_param_hook"); @@@ -576,7 -589,7 +575,7 @@@ break; } } -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */ + PDO_DBG_RETURN(1); } /* }}} */ @@@ -597,6 -610,7 +596,6 @@@ static int pdo_mysql_stmt_fetch(pdo_stm PDO_DBG_RETURN(1); } #else -# if HAVE_MYSQL_STMT_PREPARE int ret; if (S->stmt) { @@@ -617,6 -631,7 +616,6 @@@ PDO_DBG_RETURN(1); } -# endif /* HAVE_MYSQL_STMT_PREPARE */ #endif /* PDO_USE_MYSQLND */ if (!S->result) { @@@ -707,12 -722,15 +706,12 @@@ static int pdo_mysql_stmt_get_col(pdo_s } /* With mysqlnd data is stored inside mysqlnd, not S->current_data */ -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND if (!S->stmt) { if (S->current_data == NULL || !S->result
[PHP-CVS] com php-src: Remove unused variable: ext/pdo_mysql/mysql_statement.c
Commit:da2da13f935b2775635cd21b47a78fbf025a462d Author:Pierrick Charron Sat, 24 Mar 2012 17:49:58 -0400 Parents: 948d326b294becccf1e1a34851bce380f2381b96 Branches: PHP-5.3 PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da2da13f935b2775635cd21b47a78fbf025a462d Log: Remove unused variable Changed paths: M ext/pdo_mysql/mysql_statement.c Diff: da2da13f935b2775635cd21b47a78fbf025a462d diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index c4d322f..115e74c 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -322,7 +322,6 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ { pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; pdo_mysql_db_handle *H = S->H; - my_ulonglong row_count; PDO_DBG_ENTER("pdo_mysql_stmt_execute"); PDO_DBG_INF_FMT("stmt=%p", S->stmt); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS ext/standard/string.c
Test for bug #55871 is already covering this issue. P. On 1 March 2012 11:35, Antony Dovgal wrote: > On 03/01/2012 07:10 PM, Pierrick Charron wrote: >> >> pierrick Thu, 01 Mar 2012 15:10:29 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=323710 >> >> Log: >> Fixed memory leak in substr_replace > > > +test ? > > -- > Wbr, > Antony Dovgal > --- > http://pinba.org - realtime profiling for PHP > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- 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_4/ NEWS ext/standard/string.c
pierrick Thu, 01 Mar 2012 15:10:29 + Revision: http://svn.php.net/viewvc?view=revision&revision=323710 Log: Fixed memory leak in substr_replace Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/standard/string.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-01 15:10:23 UTC (rev 323709) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-01 15:10:29 UTC (rev 323710) @@ -1,7 +1,10 @@ PHPNEWS ||| ?? ??? 2012, PHP 5.4.1 RC1 - + +- Standard: + . Fixed memory leak in substr_replace. (Pierrick) + 01 Mar 2012, PHP 5.4.0 - autoconf 2.59+ is now supported (and required) for generating the Modified: php/php-src/branches/PHP_5_4/ext/standard/string.c === --- php/php-src/branches/PHP_5_4/ext/standard/string.c 2012-03-01 15:10:23 UTC (rev 323709) +++ php/php-src/branches/PHP_5_4/ext/standard/string.c 2012-03-01 15:10:29 UTC (rev 323710) @@ -2518,6 +2518,9 @@ if(Z_REFCOUNT_P(orig_str) != refcount) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument was modified while replacing"); + if(Z_TYPE_PP(tmp_repl) != IS_STRING) { + zval_dtor(repl_str); + } break; } -- 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/standard/ string.c
pierrick Fri, 20 Jan 2012 13:20:14 + Revision: http://svn.php.net/viewvc?view=revision&revision=322497 Log: Remove memory leak in substr_replace (to commit in 5.4 after code freeze) Changed paths: U php/php-src/trunk/ext/standard/string.c Modified: php/php-src/trunk/ext/standard/string.c === --- php/php-src/trunk/ext/standard/string.c 2012-01-20 12:31:37 UTC (rev 322496) +++ php/php-src/trunk/ext/standard/string.c 2012-01-20 13:20:14 UTC (rev 322497) @@ -2518,6 +2518,9 @@ if(Z_REFCOUNT_P(orig_str) != refcount) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument was modified while replacing"); + if(Z_TYPE_PP(tmp_repl) != IS_STRING) { + zval_dtor(repl_str); + } break; } -- 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/curl/ interface.c multi.c
pierrick Fri, 23 Dec 2011 21:01:05 + Revision: http://svn.php.net/viewvc?view=revision&revision=321359 Log: Coding standards Changed paths: U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/multi.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-23 19:52:57 UTC (rev 321358) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-23 21:01:05 UTC (rev 321359) @@ -960,7 +960,7 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */ -REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL); + REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL); #endif #if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */ @@ -1743,14 +1743,14 @@ char *split; if(org) { -do { + do { char *key; char *val; char *tmp; -split = strstr(s, "; "); -if(split) -*split = '\0'; + split = strstr(s, "; "); + if(split) + *split = '\0'; key = s; tmp = memchr(key, '=', 64); @@ -2672,7 +2672,7 @@ case CURLOPT_SHARE: { php_curlsh *sh = NULL; - ZEND_FETCH_RESOURCE(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle); + ZEND_FETCH_RESOURCE(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle); if (sh) { curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } @@ -3237,7 +3237,7 @@ if (ch->handlers->fnmatch) { if (ch->handlers->fnmatch->func_name) { zval_ptr_dtor(&ch->handlers->fnmatch->func_name); - } + } efree(ch->handlers->fnmatch); ch->handlers->fnmatch = NULL; } Modified: php/php-src/trunk/ext/curl/multi.c === --- php/php-src/trunk/ext/curl/multi.c 2011-12-23 19:52:57 UTC (rev 321358) +++ php/php-src/trunk/ext/curl/multi.c 2011-12-23 21:01:05 UTC (rev 321359) @@ -125,8 +125,8 @@ static int curl_compare_resources( zval *z1, zval **z2 ) /* {{{ */ { return (Z_TYPE_P( z1 ) == Z_TYPE_PP( z2 ) && -Z_TYPE_P( z1 ) == IS_RESOURCE && -Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) ); + Z_TYPE_P( z1 ) == IS_RESOURCE && + Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) ); } /* }}} */ -- 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/curl/ interface.c
pierrick Wed, 14 Dec 2011 04:02:56 + Revision: http://svn.php.net/viewvc?view=revision&revision=321002 Log: Unregister appropriate curl wrappers Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-14 03:45:44 UTC (rev 321001) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-14 04:02:56 UTC (rev 321002) @@ -1165,10 +1165,18 @@ PHP_MSHUTDOWN_FUNCTION(curl) { #ifdef PHP_CURL_URL_WRAPPERS - php_unregister_url_stream_wrapper("http" TSRMLS_CC); - php_unregister_url_stream_wrapper("https" TSRMLS_CC); - php_unregister_url_stream_wrapper("ftp" TSRMLS_CC); - php_unregister_url_stream_wrapper("ldap" TSRMLS_CC); + { + curl_version_info_data *info = curl_version_info(CURLVERSION_NOW); + char **p = (char **)info->protocols; + + while (*p != NULL) { + /* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */ + if (strncasecmp(*p, "file", sizeof("file")-1) != 0) { + php_unregister_url_stream_wrapper(*p TSRMLS_CC); + } + (void) *p++; + } + } #endif curl_global_cleanup(); #ifdef PHP_CURL_NEED_OPENSSL_TSL -- 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/curl/ config.m4 config.w32 interface.c
pierrick Wed, 14 Dec 2011 03:45:44 + Revision: http://svn.php.net/viewvc?view=revision&revision=321001 Log: Remove dead code # curl_version_info was introduced in 7.10 and the PHP requirement is 7.10.5 Changed paths: U php/php-src/trunk/ext/curl/config.m4 U php/php-src/trunk/ext/curl/config.w32 U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/config.m4 === --- php/php-src/trunk/ext/curl/config.m42011-12-14 03:31:55 UTC (rev 321000) +++ php/php-src/trunk/ext/curl/config.m42011-12-14 03:45:44 UTC (rev 321001) @@ -131,13 +131,6 @@ $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR ]) - PHP_CHECK_LIBRARY(curl,curl_version_info, - [ -AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ]) - ],[],[ -$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR - ]) - PHP_CHECK_LIBRARY(curl,curl_easy_strerror, [ AC_DEFINE(HAVE_CURL_EASY_STRERROR,1,[ ]) Modified: php/php-src/trunk/ext/curl/config.w32 === --- php/php-src/trunk/ext/curl/config.w32 2011-12-14 03:31:55 UTC (rev 321000) +++ php/php-src/trunk/ext/curl/config.w32 2011-12-14 03:45:44 UTC (rev 321001) @@ -18,7 +18,6 @@ AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL'); AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL'); AC_DEFINE('HAVE_CURL_MULTI_STRERROR', 1, 'Have curl_multi_strerror in cURL'); - AC_DEFINE('HAVE_CURL_VERSION_INFO', 1, 'Have curl_version_info in cURL'); ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB"); // TODO: check for curl_version_info // AC_DEFINE('PHP_CURL_URL_WRAPPERS', 0, 'Use curl for URL wrappers [experimental]'); Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-14 03:31:55 UTC (rev 321000) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-14 03:45:44 UTC (rev 321001) @@ -1141,7 +1141,6 @@ } #ifdef PHP_CURL_URL_WRAPPERS -# if HAVE_CURL_VERSION_INFO { curl_version_info_data *info = curl_version_info(CURLVERSION_NOW); char **p = (char **)info->protocols; @@ -1155,18 +1154,6 @@ (void) *p++; } } -# else - php_unregister_url_stream_wrapper("http"); - php_register_url_stream_wrapper("http", &php_curl_wrapper TSRMLS_CC); - php_unregister_url_stream_wrapper("https"); - php_register_url_stream_wrapper("https", &php_curl_wrapper TSRMLS_CC); - php_unregister_url_stream_wrapper("ftp"); - php_register_url_stream_wrapper("ftp", &php_curl_wrapper TSRMLS_CC); - php_unregister_url_stream_wrapper("ftps"); - php_register_url_stream_wrapper("ftps", &php_curl_wrapper TSRMLS_CC); - php_unregister_url_stream_wrapper("ldap"); - php_register_url_stream_wrapper("ldap", &php_curl_wrapper TSRMLS_CC); -# endif #endif return SUCCESS; -- 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/curl/tests/responder/get.php branches/PHP_5_4/ext/curl/tests/responder/get.php trunk/ext/curl/tests/responder/get.php
pierrick Thu, 08 Dec 2011 18:57:01 + Revision: http://svn.php.net/viewvc?view=revision&revision=320688 Log: Fix curl_copy_handle_basic_008.phpt when display_errors is On (Thanks Chris Jones) Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php U php/php-src/branches/PHP_5_4/ext/curl/tests/responder/get.php U php/php-src/trunk/ext/curl/tests/responder/get.php Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php === --- php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php 2011-12-08 18:37:34 UTC (rev 320687) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php 2011-12-08 18:57:01 UTC (rev 320688) @@ -1,5 +1,6 @@ -- 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/curl/tests/bug27023.phpt branches/PHP_5_4/ext/curl/tests/bug27023.phpt trunk/ext/curl/tests/bug27023.phpt
pierrick Wed, 07 Dec 2011 16:46:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=320585 Log: Fix test Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt U php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt U php/php-src/trunk/ext/curl/tests/bug27023.phpt Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt 2011-12-07 16:32:50 UTC (rev 320584) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt 2011-12-07 16:46:48 UTC (rev 320585) @@ -33,7 +33,7 @@ curl_setopt($ch, CURLOPT_POSTFIELDS, $params); var_dump(curl_exec($ch)); -$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt;type=text/plain'); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); var_dump(curl_exec($ch)); Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt 2011-12-07 16:32:50 UTC (rev 320584) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt 2011-12-07 16:46:48 UTC (rev 320585) @@ -33,7 +33,7 @@ curl_setopt($ch, CURLOPT_POSTFIELDS, $params); var_dump(curl_exec($ch)); -$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt;type=text/plain'); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); var_dump(curl_exec($ch)); Modified: php/php-src/trunk/ext/curl/tests/bug27023.phpt === --- php/php-src/trunk/ext/curl/tests/bug27023.phpt 2011-12-07 16:32:50 UTC (rev 320584) +++ php/php-src/trunk/ext/curl/tests/bug27023.phpt 2011-12-07 16:46:48 UTC (rev 320585) @@ -33,7 +33,7 @@ curl_setopt($ch, CURLOPT_POSTFIELDS, $params); var_dump(curl_exec($ch)); -$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt;type=text/plain'); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); var_dump(curl_exec($ch)); -- 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/curl/tests/bug27023.phpt branches/PHP_5_3/ext/curl/tests/responder/get.php branches/PHP_5_4/ext/curl/tests/bug27023.phpt branches/PHP_5_4/ext/curl/tes
pierrick Wed, 07 Dec 2011 16:32:50 + Revision: http://svn.php.net/viewvc?view=revision&revision=320584 Log: Add new test for CURLOPT_POSTFIELDS Changed paths: A php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt U php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php A php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt U php/php-src/branches/PHP_5_4/ext/curl/tests/responder/get.php A php/php-src/trunk/ext/curl/tests/bug27023.phpt U php/php-src/trunk/ext/curl/tests/responder/get.php Added: php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug27023.phpt 2011-12-07 16:32:50 UTC (rev 320584) @@ -0,0 +1,48 @@ +--TEST-- +Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files) +--SKIPIF-- + +--FILE-- + '@' . __DIR__ . '/curl_testdata1.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + + +curl_close($ch); +?> +--EXPECTF-- +string(%d) "curl_testdata1.txt|application/octet-stream" +string(%d) "curl_testdata1.txt|text/plain" +string(%d) "foo.txt|application/octet-stream" +string(%d) "foo.txt|text/plain" +string(%d) "foo.txt|text/plain" Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php === --- php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php 2011-12-07 16:27:28 UTC (rev 320583) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/responder/get.php 2011-12-07 16:32:50 UTC (rev 320584) @@ -25,6 +25,11 @@ case 'contenttype': header('Content-Type: text/plain;charset=utf-8'); break; +case 'file': + if (isset($_FILES['file'])) { + echo $_FILES['file']['name'] . '|' . $_FILES['file']['type']; + } + break; default: echo "Hello World!\n"; echo "Hello World!"; Added: php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/bug27023.phpt 2011-12-07 16:32:50 UTC (rev 320584) @@ -0,0 +1,48 @@ +--TEST-- +Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files) +--SKIPIF-- + +--FILE-- + '@' . __DIR__ . '/curl_testdata1.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + + +curl_close($ch); +?> +--EXPECTF-- +string(%d) "curl_testdata1.txt|application/octet-stream" +string(%d) "curl_testdata1.txt|text/plain" +string(%d) "foo.txt|application/octet-stream" +string(%d) "foo.txt|text/plain" +string(%d) "foo.txt|text/plain" Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/responder/get.php === --- php/php-src/branches/PHP_5_4/ext/curl/tests/responder/get.php 2011-12-07 16:27:28 UTC (rev 320583) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/responder/get.php 2011-12-07 16:32:50 UTC (rev 320584) @@ -25,6 +25,11 @@ case 'contenttype': header('Content-Type: text/plain;charset=utf-8'); break; +case 'file': + if (isset($_FILES['file'])) { + echo $_FILES['file']['name'] . '|' . $_FILES['file']['type']; + } + break; default: echo "Hello World!\n"; echo "Hello World!"; Adde
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
pierrick Tue, 06 Dec 2011 06:44:22 + Revision: http://svn.php.net/viewvc?view=revision&revision=320485 Log: Coding standard Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_compile.c U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-12-06 06:30:46 UTC (rev 320484) +++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-12-06 06:44:22 UTC (rev 320485) @@ -6486,7 +6486,7 @@ GET_NODE(colon_token, opline->result); - jmp_token->u.op .opline_num = op_number; + jmp_token->u.op.opline_num = op_number; INC_BPC(CG(active_op_array)); } Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2011-12-06 06:30:46 UTC (rev 320484) +++ php/php-src/trunk/Zend/zend_compile.c 2011-12-06 06:44:22 UTC (rev 320485) @@ -6486,7 +6486,7 @@ GET_NODE(colon_token, opline->result); - jmp_token->u.op .opline_num = op_number; + jmp_token->u.op.opline_num = op_number; INC_BPC(CG(active_op_array)); } -- 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/curl/ interface.c
pierrick Mon, 05 Dec 2011 22:23:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=320466 Log: We should free the memory of any curl_slist returned by curl_easy_getinfo Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-05 21:55:40 UTC (rev 320465) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-05 22:23:19 UTC (rev 320466) @@ -3031,6 +3031,7 @@ add_next_index_string(return_value, slist->data, 1); slist = slist->next; } + curl_slist_free_all(slist); } else { RETURN_FALSE; } -- 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/EXTENSIONS branches/PHP_5_4/EXTENSIONS trunk/EXTENSIONS
pierrick Sun, 04 Dec 2011 16:46:45 + Revision: http://svn.php.net/viewvc?view=revision&revision=320370 Log: Added myself as curl maintainer Changed paths: U php/php-src/branches/PHP_5_3/EXTENSIONS U php/php-src/branches/PHP_5_4/EXTENSIONS U php/php-src/trunk/EXTENSIONS Modified: php/php-src/branches/PHP_5_3/EXTENSIONS === --- php/php-src/branches/PHP_5_3/EXTENSIONS 2011-12-04 14:52:40 UTC (rev 320369) +++ php/php-src/branches/PHP_5_3/EXTENSIONS 2011-12-04 16:46:45 UTC (rev 320370) @@ -337,7 +337,7 @@ STATUS: Working --- EXTENSION: curl -PRIMARY MAINTAINER: Sterling Hughes ,Ilia Alshanetsky +PRIMARY MAINTAINER: Sterling Hughes , Ilia Alshanetsky , Pierrick Charron MAINTENANCE: Maintained STATUS: Working SINCE: 4.0.2 Modified: php/php-src/branches/PHP_5_4/EXTENSIONS === --- php/php-src/branches/PHP_5_4/EXTENSIONS 2011-12-04 14:52:40 UTC (rev 320369) +++ php/php-src/branches/PHP_5_4/EXTENSIONS 2011-12-04 16:46:45 UTC (rev 320370) @@ -337,7 +337,7 @@ STATUS: Working --- EXTENSION: curl -PRIMARY MAINTAINER: Sterling Hughes ,Ilia Alshanetsky +PRIMARY MAINTAINER: Sterling Hughes , Ilia Alshanetsky , Pierrick Charron MAINTENANCE: Maintained STATUS: Working SINCE: 4.0.2 Modified: php/php-src/trunk/EXTENSIONS === --- php/php-src/trunk/EXTENSIONS2011-12-04 14:52:40 UTC (rev 320369) +++ php/php-src/trunk/EXTENSIONS2011-12-04 16:46:45 UTC (rev 320370) @@ -337,7 +337,7 @@ STATUS: Working --- EXTENSION: curl -PRIMARY MAINTAINER: Sterling Hughes ,Ilia Alshanetsky +PRIMARY MAINTAINER: Sterling Hughes , Ilia Alshanetsky , Pierrick Charron MAINTENANCE: Maintained STATUS: Working SINCE: 4.0.2 -- 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/curl/ interface.c
pierrick Sat, 03 Dec 2011 21:24:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=320321 Log: Update curl MINFO Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 21:24:03 UTC (rev 320320) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 21:24:19 UTC (rev 320321) @@ -469,43 +469,41 @@ unsigned int i; static const struct feat feats[] = { -#if LIBCURL_VERSION_NUM > 0x070a06 /* 7.10.7 */ +#if LIBCURL_VERSION_NUM >= 0x070a07 /* 7.10.7 */ {"AsynchDNS", CURL_VERSION_ASYNCHDNS}, #endif -#if LIBCURL_VERSION_NUM > 0x070a05 /* 7.10.6 */ +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ + {"CharConv", CURL_VERSION_CONV}, +#endif +#if LIBCURL_VERSION_NUM >= 0x070a06 /* 7.10.6 */ {"Debug", CURL_VERSION_DEBUG}, {"GSS-Negotiate", CURL_VERSION_GSSNEGOTIATE}, #endif -#if LIBCURL_VERSION_NUM > 0x070b02 /* 7.12.0 */ +#if LIBCURL_VERSION_NUM >= 0x070c00 /* 7.12.0 */ {"IDN", CURL_VERSION_IDN}, #endif -#ifdef CURL_VERSION_IPV6 {"IPv6", CURL_VERSION_IPV6}, -#endif -#if LIBCURL_VERSION_NUM > 0x070b00 /* 7.11.1 */ + {"krb4", CURL_VERSION_KERBEROS4}, +#if LIBCURL_VERSION_NUM >= 0x070b01 /* 7.11.1 */ {"Largefile", CURL_VERSION_LARGEFILE}, #endif -#if LIBCURL_VERSION_NUM > 0x070a05 /* 7.10.6 */ + {"libz", CURL_VERSION_LIBZ}, +#if LIBCURL_VERSION_NUM >= 0x070a06 /* 7.10.6 */ {"NTLM", CURL_VERSION_NTLM}, #endif -#if LIBCURL_VERSION_NUM > 0x070a07 /* 7.10.8 */ +#if LIBCURL_VERSION_NUM >= 0x071600 /* 7.22.0 */ + {"NTLMWB", CURL_VERSION_NTLM_WB}, +#endif +#if LIBCURL_VERSION_NUM >= 0x070a08 /* 7.10.8 */ {"SPNEGO", CURL_VERSION_SPNEGO}, #endif -#ifdef CURL_VERSION_SSL {"SSL", CURL_VERSION_SSL}, -#endif -#if LIBCURL_VERSION_NUM > 0x070d01 /* 7.13.2 */ +#if LIBCURL_VERSION_NUM >= 0x070d02 /* 7.13.2 */ {"SSPI", CURL_VERSION_SSPI}, #endif -#ifdef CURL_VERSION_KERBEROS4 - {"krb4", CURL_VERSION_KERBEROS4}, +#if LIBCURL_VERSION_NUM >= 0x071504 /* 7.21.4 */ + {"TLS-SRP", CURL_VERSION_TLSAUTH_SRP}, #endif -#ifdef CURL_VERSION_LIBZ - {"libz", CURL_VERSION_LIBZ}, -#endif -#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */ - {"CharConv", CURL_VERSION_CONV}, -#endif {NULL, 0} }; -- 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 PHP_5_3/ext/curl/interface.c PHP_5_3/ext/curl/tests/curl_copy_handle_basic_008.phpt PHP_5_4/NEWS PHP_5_4/ext/curl/interface.c PHP_5_4/ext/curl/tests/
pierrick Sun, 04 Dec 2011 01:34:54 + Revision: http://svn.php.net/viewvc?view=revision&revision=320341 Log: Fixed bug #60439curl_copy_handle segfault when used with CURLOPT_PROGRESSFUNCTION Bug: https://bugs.php.net/60439 (Open) curl_copy_handle segfault when used with CURLOPT_PROGRESSFUNCTION Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c A php/php-src/branches/PHP_5_3/ext/curl/tests/curl_copy_handle_basic_008.phpt U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/curl/interface.c A php/php-src/branches/PHP_5_4/ext/curl/tests/curl_copy_handle_basic_008.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-12-04 01:16:17 UTC (rev 320340) +++ php/php-src/branches/PHP_5_3/NEWS 2011-12-04 01:34:54 UTC (rev 320341) @@ -26,6 +26,10 @@ - BCmath: . Fixed bug #60377 (bcscale related crashes on 64bits platforms). (shm) +- cURL: + . Fixed bug #60439 (curl_copy_handle segfault when used with +CURLOPT_PROGRESSFUNCTION). (Pierrick) + - Date: . Fixed bug #60373 (Startup errors with log_errors on cause segfault). (Derick) Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2011-12-04 01:16:17 UTC (rev 320340) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2011-12-04 01:34:54 UTC (rev 320341) @@ -1649,11 +1649,18 @@ zval_add_ref(&ch->handlers->write_header->func_name); dupch->handlers->write_header->func_name = ch->handlers->write_header->func_name; } + + if (ch->handlers->progress->func_name) { + zval_add_ref(&ch->handlers->progress->func_name); + dupch->handlers->progress->func_name = ch->handlers->progress->func_name; + } + dupch->handlers->progress->method = ch->handlers->progress->method; curl_easy_setopt(dupch->cp, CURLOPT_ERRORBUFFER, dupch->err.str); curl_easy_setopt(dupch->cp, CURLOPT_FILE, (void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_INFILE,(void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch); + curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch); efree(dupch->to_free); dupch->to_free = ch->to_free; Added: php/php-src/branches/PHP_5_3/ext/curl/tests/curl_copy_handle_basic_008.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/curl_copy_handle_basic_008.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/curl_copy_handle_basic_008.phpt 2011-12-04 01:34:54 UTC (rev 320341) @@ -0,0 +1,25 @@ +--TEST-- +Test curl_copy_handle() with CURLOPT_PROGRESSFUNCTION +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Hello World! +Hello World! +Hello World! +Hello World! Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-12-04 01:16:17 UTC (rev 320340) +++ php/php-src/branches/PHP_5_4/NEWS 2011-12-04 01:34:54 UTC (rev 320341) @@ -10,6 +10,10 @@ - CLI SAPI: . Implement FR #60390 (Missing $_SERVER['SERVER_PORT']). (Pierre) +- cURL: + . Fixed bug #60439 (curl_copy_handle segfault when used with +CURLOPT_PROGRESSFUNCTION). (Pierrick) + - Intl: . Added support for UTS #46. (Gustavo) Modified: php/php-src/branches/PHP_5_4/ext/curl/interface.c === --- php/php-src/branches/PHP_5_4/ext/curl/interface.c 2011-12-04 01:16:17 UTC (rev 320340) +++ php/php-src/branches/PHP_5_4/ext/curl/interface.c 2011-12-04 01:34:54 UTC (rev 320341) @@ -1645,11 +1645,18 @@ zval_add_ref(&ch->handlers->write_header->func_name); dupch->handlers->write_header->func_name = ch->handlers->write_header->func_name; } + + if (ch->handlers->progress->func_name) { + zval_add_ref(&ch->handlers->progress->func_name); + dupch->handlers->progress->func_name = ch->handlers->progress->func_name; + } + dupch->handlers->progress->method = ch->handlers->progress->method; curl_easy_setopt(dupch->cp, CURLOPT_ERRORBUFFER, dupch->err.str); curl_easy_setopt(dupch->cp, CURLOPT_FILE, (void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_INFILE,(void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch); + curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch); efree(dupch->to_free); dupch->to_free = ch->to_free; Added: php/
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c tests/curl_copy_handle_basic_008.phpt
pierrick Sun, 04 Dec 2011 01:16:17 + Revision: http://svn.php.net/viewvc?view=revision&revision=320340 Log: Fix segfault when using curl_copy_handle with CURLOPT_PROGRESSFUNCTION Changed paths: U php/php-src/trunk/ext/curl/interface.c A php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-04 00:19:12 UTC (rev 320339) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-04 01:16:17 UTC (rev 320340) @@ -1965,6 +1965,26 @@ curl_easy_setopt(dupch->cp, CURLOPT_INFILE,(void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch); + if (ch->handlers->progress) { + dupch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); + if (ch->handlers->progress->func_name) { + zval_add_ref(&ch->handlers->progress->func_name); + dupch->handlers->progress->func_name = ch->handlers->progress->func_name; + } + dupch->handlers->progress->method = ch->handlers->progress->method; + curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch); + } + + if (ch->handlers->fnmatch) { + dupch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); + if (ch->handlers->fnmatch->func_name) { + zval_add_ref(&ch->handlers->fnmatch->func_name); + dupch->handlers->fnmatch->func_name = ch->handlers->fnmatch->func_name; + } + dupch->handlers->fnmatch->method = ch->handlers->fnmatch->method; + curl_easy_setopt(dupch->cp, CURLOPT_FNMATCH_DATA, (void *) dupch); + } + efree(dupch->to_free); dupch->to_free = ch->to_free; Added: php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt === --- php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt (rev 0) +++ php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt 2011-12-04 01:16:17 UTC (rev 320340) @@ -0,0 +1,25 @@ +--TEST-- +Test curl_copy_handle() with CURLOPT_PROGRESSFUNCTION +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Hello World! +Hello World! +Hello World! +Hello World! -- 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/curl/ interface.c php_curl.h
pierrick Sun, 04 Dec 2011 00:19:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=320339 Log: add CURLOPT_WILDCARDMATCH and CURLOPT_FNMATCH_FUNCTION Changed paths: U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/php_curl.h Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-04 00:03:56 UTC (rev 320338) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-04 00:19:12 UTC (rev 320339) @@ -1067,12 +1067,17 @@ REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP); REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT); REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT); + REGISTER_CURL_CONSTANT(CURLOPT_FNMATCH_FUNCTION); + REGISTER_CURL_CONSTANT(CURLOPT_WILDCARDMATCH); REGISTER_CURL_CONSTANT(CURLPROTO_RTMP); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPE); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPS); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPT); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTE); - REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTS); + REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTS); + REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_FAIL); + REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_MATCH); + REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_NOMATCH); #endif #if LIBCURL_VERSION_NUM >= 0x071502 /* Available since 7.21.2 */ @@ -1275,6 +1280,71 @@ } /* }}} */ +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ +/* {{{ curl_fnmatch + */ +static int curl_fnmatch(void *ctx, const char *pattern, const char *string) +{ + php_curl *ch = (php_curl *) ctx; + php_curl_fnmatch *t = ch->handlers->fnmatch; + int rval = CURL_FNMATCHFUNC_FAIL; + switch (t->method) { + case PHP_CURL_USER: { + zval **argv[3]; + zval *zhandle = NULL; + zval *zpattern = NULL; + zval *zstring = NULL; + zval *retval_ptr; + int error; + zend_fcall_info fci; + TSRMLS_FETCH_FROM_CTX(ch->thread_ctx); + + MAKE_STD_ZVAL(zhandle); + MAKE_STD_ZVAL(zpattern); + MAKE_STD_ZVAL(zstring); + + ZVAL_RESOURCE(zhandle, ch->id); + zend_list_addref(ch->id); + ZVAL_STRING(zpattern, pattern, 1); + ZVAL_STRING(zstring, string, 1); + + argv[0] = &zhandle; + argv[1] = &zpattern; + argv[2] = &zstring; + + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = t->func_name; + fci.object_ptr = NULL; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = 3; + fci.params = argv; + fci.no_separation = 0; + fci.symbol_table = NULL; + + ch->in_callback = 1; + error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC); + ch->in_callback = 0; + if (error == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_FNMATCH_FUNCTION"); + } else if (retval_ptr) { + if (Z_TYPE_P(retval_ptr) != IS_LONG) { + convert_to_long_ex(&retval_ptr); + } + rval = Z_LVAL_P(retval_ptr); + zval_ptr_dtor(&retval_ptr); + } + zval_ptr_dtor(argv[0]); + zval_ptr_dtor(argv[1]); + zval_ptr_dtor(argv[2]); + break; + } + } + return rval; +} +/* }}} */ +#endif + /* {{{ curl_progress */ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) @@ -1650,6 +1720,9 @@ (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); (*ch)->handlers->progress = NULL; +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ + (*ch)->handlers->fnmatch = NULL; +#endif (*ch)->in_callback = 0; (*ch)->header.str_len = 0; @@ -2034,6 +2107,9 @@ case CURLOPT_RTSP_REQUEST: case CURLOPT_RTSP_SERVER_CSEQ: #endif +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ + case CURLOPT_WILDCARDMATCH: +#endif #if LIBCURL
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Sat, 03 Dec 2011 23:53:27 + Revision: http://svn.php.net/viewvc?view=revision&revision=320335 Log: Add the curl handle to the progress callback function Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:53:05 UTC (rev 320334) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:53:27 UTC (rev 320335) @@ -1290,7 +1290,8 @@ switch (t->method) { case PHP_CURL_USER: { - zval **argv[4]; + zval **argv[5]; + zval *handle = NULL; zval *zdltotal = NULL; zval *zdlnow = NULL; zval *zultotal = NULL; @@ -1300,27 +1301,31 @@ zend_fcall_info fci; TSRMLS_FETCH_FROM_CTX(ch->thread_ctx); + MAKE_STD_ZVAL(handle); MAKE_STD_ZVAL(zdltotal); MAKE_STD_ZVAL(zdlnow); MAKE_STD_ZVAL(zultotal); MAKE_STD_ZVAL(zulnow); + ZVAL_RESOURCE(handle, ch->id); + zend_list_addref(ch->id); ZVAL_LONG(zdltotal, (long) dltotal); ZVAL_LONG(zdlnow, (long) dlnow); ZVAL_LONG(zultotal, (long) ultotal); ZVAL_LONG(zulnow, (long) ulnow); - argv[0] = &zdltotal; - argv[1] = &zdlnow; - argv[2] = &zultotal; - argv[3] = &zulnow; + argv[0] = &handle; + argv[1] = &zdltotal; + argv[2] = &zdlnow; + argv[3] = &zultotal; + argv[4] = &zulnow; fci.size = sizeof(fci); fci.function_table = EG(function_table); fci.function_name = t->func_name; fci.object_ptr = NULL; fci.retval_ptr_ptr = &retval_ptr; - fci.param_count = 4; + fci.param_count = 5; fci.params = argv; fci.no_separation = 0; fci.symbol_table = NULL; @@ -1343,6 +1348,7 @@ zval_ptr_dtor(argv[1]); zval_ptr_dtor(argv[2]); zval_ptr_dtor(argv[3]); + zval_ptr_dtor(argv[4]); break; } } -- 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/curl/ interface.c
pierrick Sat, 03 Dec 2011 23:43:44 + Revision: http://svn.php.net/viewvc?view=revision&revision=320332 Log: The progress handle don't need to be allocated unless curl_setopt with CURLOPT_PROGRESSFUNCTION is called Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:40:38 UTC (rev 320331) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:43:44 UTC (rev 320332) @@ -1643,7 +1643,7 @@ (*ch)->handlers->write= ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); - (*ch)->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); + (*ch)->handlers->progress = NULL; (*ch)->in_callback = 0; (*ch)->header.str_len = 0; @@ -2447,7 +2447,9 @@ case CURLOPT_PROGRESSFUNCTION: curl_easy_setopt(ch->cp, CURLOPT_PROGRESSFUNCTION, curl_progress); curl_easy_setopt(ch->cp, CURLOPT_PROGRESSDATA, ch); - if (ch->handlers->progress->func_name) { + if (NULL == ch->handlers->progress) { + ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); + } else if (ch->handlers->progress->func_name) { zval_ptr_dtor(&ch->handlers->progress->func_name); ch->handlers->progress->fci_cache = empty_fcall_info_cache; } @@ -3020,9 +3022,6 @@ if (ch->handlers->write_header->func_name) { zval_ptr_dtor(&ch->handlers->write_header->func_name); } - if (ch->handlers->progress->func_name) { - zval_ptr_dtor(&ch->handlers->progress->func_name); - } if (ch->handlers->passwd) { zval_ptr_dtor(&ch->handlers->passwd); } @@ -3046,7 +3045,14 @@ efree(ch->handlers->write); efree(ch->handlers->write_header); efree(ch->handlers->read); - efree(ch->handlers->progress); + + if (ch->handlers->progress) { + if (ch->handlers->progress->func_name) { + zval_ptr_dtor(&ch->handlers->progress->func_name); + } + efree(ch->handlers->progress); + } + efree(ch->handlers); efree(ch); } @@ -3093,12 +3099,13 @@ ch->handlers->std_err = NULL; } - if (ch->handlers->progress->func_name) { - zval_ptr_dtor(&ch->handlers->progress->func_name); - ch->handlers->progress->fci_cache = empty_fcall_info_cache; - ch->handlers->progress->func_name = NULL; + if (ch->handlers->progress) { + if (ch->handlers->progress->func_name) { + zval_ptr_dtor(&ch->handlers->progress->func_name); + } + efree(ch->handlers->progress); + ch->handlers->progress = NULL; } - ch->handlers->progress->method = 0; } /* }}} */ -- 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/curl/ interface.c
pierrick Sat, 03 Dec 2011 23:21:43 + Revision: http://svn.php.net/viewvc?view=revision&revision=320329 Log: useless variable Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:08:55 UTC (rev 320328) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:21:43 UTC (rev 320329) @@ -1281,7 +1281,6 @@ { php_curl *ch = (php_curl *) clientp; php_curl_progress *t = ch->handlers->progress; - int length = -1; size_t rval = 0; #if PHP_CURL_DEBUG @@ -1331,7 +1330,6 @@ ch->in_callback = 0; if (error == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_PROGRESSFUNCTION"); - length = -1; } else if (retval_ptr) { if (Z_TYPE_P(retval_ptr) != IS_LONG) { convert_to_long_ex(&retval_ptr); -- 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/curl/tests/ curl_basic_022.phpt
pierrick Sat, 03 Dec 2011 20:19:53 + Revision: http://svn.php.net/viewvc?view=revision&revision=320316 Log: Test curl_getinfo() function with CURLINFO_EFFECTIVE_URL parameter Changed paths: A php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt Added: php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt === --- php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt (rev 0) +++ php/php-src/trunk/ext/curl/tests/curl_basic_022.phpt2011-12-03 20:19:53 UTC (rev 320316) @@ -0,0 +1,25 @@ +--TEST-- +Test curl_getinfo() function with CURLINFO_COOKIELIST parameter +--SKIPIF-- += 7.14.1"); +} +?> +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + string(38) ".php.net TRUE/ FALSE 2147368447 C1 v1" + [1]=> + string(38) ".php.net TRUE/ FALSE 2147368447 C2 v2" +} -- 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/curl/ interface.c
pierrick Sat, 03 Dec 2011 20:16:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=320314 Log: Clean curl_getinfo and add new constants from newer libcurl versions Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 20:14:06 UTC (rev 320313) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 20:16:32 UTC (rev 320314) @@ -832,7 +832,8 @@ REGISTER_CURL_CONSTANT(CURLAUTH_NTLM); #endif -#if LIBCURL_VERSION_NUM >= 0x070a07 /* Available since 7.10.7 */ +#if LIBCURL_VERSION_NUM >= 0x070a07 /* Available since 7.10.7 */ + REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CONNECTCODE); REGISTER_CURL_CONSTANT(CURLOPT_FTP_CREATE_MISSING_DIRS); REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH); #endif @@ -840,7 +841,9 @@ #if LIBCURL_VERSION_NUM >= 0x070a08 /* Available since 7.10.8 */ REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED); REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL); + REGISTER_CURL_CONSTANT(CURLINFO_HTTPAUTH_AVAIL); REGISTER_CURL_CONSTANT(CURLINFO_RESPONSE_CODE); + REGISTER_CURL_CONSTANT(CURLINFO_PROXYAUTH_AVAIL); REGISTER_CURL_CONSTANT(CURLOPT_FTP_RESPONSE_TIMEOUT); REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE); REGISTER_CURL_CONSTANT(CURLOPT_MAXFILESIZE); @@ -874,7 +877,17 @@ REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY); #endif +#if LIBCURL_VERSION_NUM >= 0x070c02 /* Available since 7.12.2 */ + REGISTER_CURL_CONSTANT(CURLINFO_OS_ERRNO); +#endif + +#if LIBCURL_VERSION_NUM >= 0x070c03 /* Available since 7.12.3 */ + REGISTER_CURL_CONSTANT(CURLINFO_NUM_CONNECTS); + REGISTER_CURL_CONSTANT(CURLINFO_SSL_ENGINES); +#endif + #if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */ + REGISTER_CURL_CONSTANT(CURLINFO_COOKIELIST); REGISTER_CURL_CONSTANT(CURLOPT_COOKIELIST); REGISTER_CURL_CONSTANT(CURLOPT_IGNORE_CONTENT_LENGTH); #endif @@ -899,6 +912,10 @@ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD); #endif +#if LIBCURL_VERSION_NUM >- 0x070f04 /* Available since 7.15.4 */ + REGISTER_CURL_CONSTANT(CURLINFO_FTP_ENTRY_PATH); +#endif + #if LIBCURL_VERSION_NUM >= 0x070f05 /* Available since 7.15.5 */ REGISTER_CURL_CONSTANT(CURLOPT_FTP_ALTERNATIVE_TO_USER); REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE); @@ -950,15 +967,18 @@ #if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */ REGISTER_CURL_CONSTANT(CURLE_SSH); + REGISTER_CURL_CONSTANT(CURLINFO_APPCONNECT_TIME); + REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_IP); + REGISTER_CURL_CONSTANT(CURLOPT_ADDRESS_SCOPE); REGISTER_CURL_CONSTANT(CURLOPT_CRLFILE); REGISTER_CURL_CONSTANT(CURLOPT_ISSUERCERT); REGISTER_CURL_CONSTANT(CURLOPT_KEYPASSWD); + REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES); REGISTER_CURL_CONSTANT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5); REGISTER_CURL_CONSTANT(CURLOPT_SSH_PRIVATE_KEYFILE); REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE); - REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_ANY); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_DEFAULT); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_HOST); @@ -983,12 +1003,15 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */ + REGISTER_CURL_CONSTANT(CURLINFO_CONDITION_UNMET); + REGISTER_CURL_CONSTANT(CURLOPT_NOPROXY); REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_SOCKS5_GSSAPI_NEC); REGISTER_CURL_CONSTANT(CURLOPT_SOCKS5_GSSAPI_SERVICE); REGISTER_CURL_CONSTANT(CURLOPT_TFTP_BLKSIZE); + REGISTER_CURL_CONSTANT(CURLPROTO_ALL); REGISTER_CURL_CONSTANT(CURLPROTO_DICT); REGISTER_CURL_CONSTANT(CURLPROTO_FILE); @@ -1009,6 +1032,10 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_CLIENT_CSEQ); + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_CSEQ_RECV); + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SERVER_CSEQ); + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SESSION_ID); REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_PRET); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_FROM); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_RCPT); @@ -1039,6 +1066,9 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ + REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP); + REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT); + REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT); REGISTER_CURL_CONSTANT(CURLPROTO_RTMP); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPE); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPS); @@ -2786,18 +2816,25 @@ if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_TIME, &d_code) == CURLE_OK) { CAAD("redirect_time", d_code); } -#if LIBCURL_VERSION_NUM > 0x071301 +#if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */ + if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_URL, &s_code) == CURLE_OK) { + CAAS("redirect_url", s_code); + } +#endif +#if LIBCURL_VERSION_NUM >=
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/tests/ curl_reset.phpt
pierrick Sat, 03 Dec 2011 20:14:06 + Revision: http://svn.php.net/viewvc?view=revision&revision=320313 Log: Fix test for libcurl < 7.12.1 Changed paths: U php/php-src/trunk/ext/curl/tests/curl_reset.phpt Modified: php/php-src/trunk/ext/curl/tests/curl_reset.phpt === --- php/php-src/trunk/ext/curl/tests/curl_reset.phpt2011-12-03 19:41:28 UTC (rev 320312) +++ php/php-src/trunk/ext/curl/tests/curl_reset.phpt2011-12-03 20:14:06 UTC (rev 320313) @@ -1,7 +1,9 @@ --TEST-- Test curl_reset --SKIPIF-- - += 7.12.1)"); +?> --FILE-- -- 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/curl/tests/curl_setopt_array_basic.phpt branches/PHP_5_4/ext/curl/tests/curl_setopt_array_basic.phpt trunk/ext/curl/tests/curl_setopt_array_basic.phpt
pierrick Fri, 02 Dec 2011 04:16:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=320265 Log: Cleans up test file Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/tests/curl_setopt_array_basic.phpt U php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_array_basic.phpt U php/php-src/trunk/ext/curl/tests/curl_setopt_array_basic.phpt Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/curl_setopt_array_basic.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/curl_setopt_array_basic.phpt 2011-12-02 03:54:50 UTC (rev 320264) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/curl_setopt_array_basic.phpt 2011-12-02 04:16:46 UTC (rev 320265) @@ -46,6 +46,7 @@ curl_close($ch); var_dump($returnContent); +isset($tempname) and is_file($tempname) and @unlink($tempname); ?> --EXPECT-- Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_array_basic.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_array_basic.phpt 2011-12-02 03:54:50 UTC (rev 320264) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_array_basic.phpt 2011-12-02 04:16:46 UTC (rev 320265) @@ -46,6 +46,7 @@ curl_close($ch); var_dump($returnContent); +isset($tempname) and is_file($tempname) and @unlink($tempname); ?> --EXPECT-- Modified: php/php-src/trunk/ext/curl/tests/curl_setopt_array_basic.phpt === --- php/php-src/trunk/ext/curl/tests/curl_setopt_array_basic.phpt 2011-12-02 03:54:50 UTC (rev 320264) +++ php/php-src/trunk/ext/curl/tests/curl_setopt_array_basic.phpt 2011-12-02 04:16:46 UTC (rev 320265) @@ -46,6 +46,7 @@ curl_close($ch); var_dump($returnContent); +isset($tempname) and is_file($tempname) and @unlink($tempname); ?> --EXPECT-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
Doh ! For once it's not the ZTS which broke :p I reverted the commit until I come up with a clean solution for both ZTS and non-ZTS Thanks On 24 November 2011 01:45, Antony Dovgal wrote: > On 11/24/2011 02:20 AM, Pierrick Charron wrote: >> >> pierrick Wed, 23 Nov 2011 22:20:28 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=319729 >> >> Log: >> Implemented FR #55540, added functions curl_share_init(), >> curl_share_setopt() and curl_share_close(). > > This patch breaks non-ZTS build of trunk: > > /local/qa/HEAD_non-ZTS/ext/curl/php_curl.h:157:2: error: expected > specifier-qualifier-list before ‘MUTEX_T’ > /local/qa/HEAD_non-ZTS/ext/curl/interface.c: In function ‘_php_curl_setopt’: > /local/qa/HEAD_non-ZTS/ext/curl/interface.c:2449:8: warning: ‘return’ with > no value, in function returning non-void > make: *** [ext/curl/interface.lo] Error 1 > > -- > Wbr, > Antony Dovgal > --- > http://pinba.org - realtime profiling for PHP > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
umber); - le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NULL, "curl_share", module_number); REGISTER_INI_ENTRIES(); @@ -1007,14 +989,6 @@ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD); #endif - /* Constant for curl_share_setopt */ - REGISTER_CURL_CONSTANT(CURLOPT_SHARE); - REGISTER_CURL_CONSTANT(CURLSHOPT_SHARE); - REGISTER_CURL_CONSTANT(CURLSHOPT_UNSHARE); - REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_COOKIE); - REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_DNS); - REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_SSL_SESSION); - #ifdef PHP_CURL_NEED_OPENSSL_TSL if (!CRYPTO_get_id_callback()) { int i, c = CRYPTO_num_locks(); @@ -2443,15 +2417,6 @@ curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0); } break; - case CURLOPT_SHARE: - { -php_curlsh *sh = NULL; - ZEND_FETCH_RESOURCE(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle); -if (sh) { - curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); -} - } - } SAVE_CURL_ERROR(ch, error); Modified: php/php-src/trunk/ext/curl/package.xml === --- php/php-src/trunk/ext/curl/package.xml 2011-11-24 12:46:45 UTC (rev 319750) +++ php/php-src/trunk/ext/curl/package.xml 2011-11-24 12:49:11 UTC (rev 319751) @@ -39,7 +39,6 @@ - Modified: php/php-src/trunk/ext/curl/php_curl.h === --- php/php-src/trunk/ext/curl/php_curl.h 2011-11-24 12:46:45 UTC (rev 319750) +++ php/php-src/trunk/ext/curl/php_curl.h 2011-11-24 12:49:11 UTC (rev 319751) @@ -53,8 +53,6 @@ #define le_curl_name "cURL handle" extern int le_curl_multi_handle; #define le_curl_multi_handle_name "cURL Multi Handle" -extern int le_curl_share_handle; -#define le_curl_share_handle_name "cURL Share Handle" PHP_MINIT_FUNCTION(curl); PHP_MSHUTDOWN_FUNCTION(curl); @@ -77,12 +75,7 @@ PHP_FUNCTION(curl_multi_getcontent); PHP_FUNCTION(curl_multi_info_read); PHP_FUNCTION(curl_multi_close); -PHP_FUNCTION(curl_share_init); -PHP_FUNCTION(curl_share_close); -PHP_FUNCTION(curl_share_setopt); - void _php_curl_multi_close(zend_rsrc_list_entry * TSRMLS_DC); -void _php_curl_share_close(zend_rsrc_list_entry * TSRMLS_DC); typedef struct { zval*func_name; @@ -152,11 +145,6 @@ zend_llist easyh; } php_curlm; -typedef struct { - CURLSH *share; - MUTEX_T locks[CURL_LOCK_DATA_LAST]; -} php_curlsh; - void _php_curl_cleanup_handle(php_curl *); void _php_curl_multi_cleanup_list(void *data); int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC); Deleted: php/php-src/trunk/ext/curl/share.c === --- php/php-src/trunk/ext/curl/share.c 2011-11-24 12:46:45 UTC (rev 319750) +++ php/php-src/trunk/ext/curl/share.c 2011-11-24 12:49:11 UTC (rev 319751) @@ -1,151 +0,0 @@ -/* - +--+ - | PHP Version 5| - +--+ - | Copyright (c) 1997-2011 The PHP Group| - +--+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | lice...@php.net so we can mail you a copy immediately. | - +--+ - | Author: Pierrick Charron | - +--+ -*/ - -/* $Id$ */ - -#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "php.h" - -#if HAVE_CURL - -#include "php_curl.h" - -#include - -static void _php_curl_share_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess, void *ctx) { - php_curlsh *sh = (php_curlsh *) ctx; - tsrm_mutex_lock(&sh->locks[data]); -} - -static void _php_curl_share_unlock(CURL *handle, curl_lock_data data, void *ctx) { - php_curlsh *sh = (php_curlsh *) ctx; - tsrm_mutex_unlock(&sh->locks[data]); -} - - -/* {{{ proto void curl_share_init() - Initialize a share curl handle */ -PHP_FUNCTION(curl_share_init) -{ - php_curlsh *sh; - - if (zend_parse_parameters_none() == FAILURE) { - return; - } - - sh = ecalloc(1, size
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
I will. I'm still working on few things on the curl ext and once it will be done i'll take some time to document everything :) Pierrick On 23 November 2011 18:30, Pierre Joye wrote: > hi Pierrick! > > Don't forget the UPGRADING guide :) > > Cheers, > > On Wed, Nov 23, 2011 at 11:20 PM, Pierrick Charron wrote: >> pierrick Wed, 23 Nov 2011 22:20:28 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=319729 >> >> Log: >> Implemented FR #55540, added functions curl_share_init(), >> curl_share_setopt() and curl_share_close(). >> >> Bug: https://bugs.php.net/55540 (Assigned) no curl_share? nice... >> >> Changed paths: >> U php/php-src/trunk/NEWS >> U php/php-src/trunk/ext/curl/config.m4 >> U php/php-src/trunk/ext/curl/config.w32 >> U php/php-src/trunk/ext/curl/curl.dsp >> U php/php-src/trunk/ext/curl/interface.c >> U php/php-src/trunk/ext/curl/package.xml >> U php/php-src/trunk/ext/curl/php_curl.h >> A php/php-src/trunk/ext/curl/share.c >> >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
mber); le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number); + le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NULL, "curl_share", module_number); REGISTER_INI_ENTRIES(); @@ -989,6 +1007,14 @@ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD); #endif + /* Constant for curl_share_setopt */ + REGISTER_CURL_CONSTANT(CURLOPT_SHARE); + REGISTER_CURL_CONSTANT(CURLSHOPT_SHARE); + REGISTER_CURL_CONSTANT(CURLSHOPT_UNSHARE); + REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_COOKIE); + REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_DNS); + REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_SSL_SESSION); + #ifdef PHP_CURL_NEED_OPENSSL_TSL if (!CRYPTO_get_id_callback()) { int i, c = CRYPTO_num_locks(); @@ -2417,6 +2443,15 @@ curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0); } break; + case CURLOPT_SHARE: + { +php_curlsh *sh = NULL; + ZEND_FETCH_RESOURCE(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle); +if (sh) { + curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); +} + } + } SAVE_CURL_ERROR(ch, error); Modified: php/php-src/trunk/ext/curl/package.xml === --- php/php-src/trunk/ext/curl/package.xml 2011-11-23 21:58:16 UTC (rev 319728) +++ php/php-src/trunk/ext/curl/package.xml 2011-11-23 22:20:28 UTC (rev 319729) @@ -39,6 +39,7 @@ + Modified: php/php-src/trunk/ext/curl/php_curl.h === --- php/php-src/trunk/ext/curl/php_curl.h 2011-11-23 21:58:16 UTC (rev 319728) +++ php/php-src/trunk/ext/curl/php_curl.h 2011-11-23 22:20:28 UTC (rev 319729) @@ -53,6 +53,8 @@ #define le_curl_name "cURL handle" extern int le_curl_multi_handle; #define le_curl_multi_handle_name "cURL Multi Handle" +extern int le_curl_share_handle; +#define le_curl_share_handle_name "cURL Share Handle" PHP_MINIT_FUNCTION(curl); PHP_MSHUTDOWN_FUNCTION(curl); @@ -75,7 +77,12 @@ PHP_FUNCTION(curl_multi_getcontent); PHP_FUNCTION(curl_multi_info_read); PHP_FUNCTION(curl_multi_close); +PHP_FUNCTION(curl_share_init); +PHP_FUNCTION(curl_share_close); +PHP_FUNCTION(curl_share_setopt); + void _php_curl_multi_close(zend_rsrc_list_entry * TSRMLS_DC); +void _php_curl_share_close(zend_rsrc_list_entry * TSRMLS_DC); typedef struct { zval*func_name; @@ -145,6 +152,11 @@ zend_llist easyh; } php_curlm; +typedef struct { + CURLSH *share; + MUTEX_T locks[CURL_LOCK_DATA_LAST]; +} php_curlsh; + void _php_curl_cleanup_handle(php_curl *); void _php_curl_multi_cleanup_list(void *data); int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC); Added: php/php-src/trunk/ext/curl/share.c === --- php/php-src/trunk/ext/curl/share.c (rev 0) +++ php/php-src/trunk/ext/curl/share.c 2011-11-23 22:20:28 UTC (rev 319729) @@ -0,0 +1,151 @@ +/* + +--+ + | PHP Version 5| + +--+ + | Copyright (c) 1997-2011 The PHP Group| + +--+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is| + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | lice...@php.net so we can mail you a copy immediately. | + +--+ + | Author: Pierrick Charron | + +--+ +*/ + +/* $Id$ */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" + +#if HAVE_CURL + +#include "php_curl.h" + +#include + +static void _php_curl_share_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess, void *ctx) { + php_curlsh *sh = (php_curlsh *) ctx; + tsrm_mutex_lock(&sh->locks[data]); +} + +static void _php_curl_share_unlock(CURL *handle, curl_lock_data data, void *ctx) { + php_curlsh *sh = (php_curlsh *) ctx; + tsrm_mutex_unlock(&sh->locks[data]); +} + + +/* {{{ proto void curl_share_init() + Initialize a share curl handle */ +PHP_FUNCTION(curl_share_init) +{ + php_curlsh *sh
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Wed, 23 Nov 2011 19:36:52 + Revision: http://svn.php.net/viewvc?view=revision&revision=319724 Log: Fix build for libcurl < 7.20.0 Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-23 18:46:03 UTC (rev 319723) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-23 19:36:52 UTC (rev 319724) @@ -2328,9 +2328,11 @@ case CURLOPT_PREQUOTE: name = "CURLOPT_PREQUOTE"; break; +#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ case CURLOPT_MAIL_RCPT: name = "CURLOPT_MAIL_RCPT"; break; +#endif #if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ case CURLOPT_RESOLVE: name = "CURLOPT_RESOLVE"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/interface.c ext/curl/tests/bug54995.phpt
pierrick Wed, 23 Nov 2011 05:45:27 + Revision: http://svn.php.net/viewvc?view=revision&revision=319706 Log: Fixed bug #54995 Bug: https://bugs.php.net/54995 (Assigned) Missing CURLINFO_RESPONSE_CODE support Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/interface.c A php/php-src/trunk/ext/curl/tests/bug54995.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-23 01:20:49 UTC (rev 319705) +++ php/php-src/trunk/NEWS 2011-11-23 05:45:27 UTC (rev 319706) @@ -26,5 +26,6 @@ (Pierrick) . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant still exists for backward compatibility but is doing nothing). (Pierrick) + . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick) <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-23 01:20:49 UTC (rev 319705) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-23 05:45:27 UTC (rev 319706) @@ -788,6 +788,7 @@ /* Info constants */ REGISTER_CURL_CONSTANT(CURLINFO_EFFECTIVE_URL); REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CODE); + REGISTER_CURL_CONSTANT(CURLINFO_RESPONSE_CODE); REGISTER_CURL_CONSTANT(CURLINFO_HEADER_SIZE); REGISTER_CURL_CONSTANT(CURLINFO_REQUEST_SIZE); REGISTER_CURL_CONSTANT(CURLINFO_TOTAL_TIME); Added: php/php-src/trunk/ext/curl/tests/bug54995.phpt === --- php/php-src/trunk/ext/curl/tests/bug54995.phpt (rev 0) +++ php/php-src/trunk/ext/curl/tests/bug54995.phpt 2011-11-23 05:45:27 UTC (rev 319706) @@ -0,0 +1,30 @@ +--TEST-- +Bug #54995 (Missing CURLINFO_RESPONSE_CODE support) +--SKIPIF-- + 0x070a08) { + exit("skip: tests works a versions of curl >= 7.10.8"); +} +if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined"); +} +?> +--FILE-- + +--EXPECTF-- +bool(true) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
Thanks :) On 22 November 2011 16:10, Felipe Pena wrote: > felipe Tue, 22 Nov 2011 21:10:24 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=319702 > > Log: > - Fix build (using libcurl 7.21.0) > > Changed paths: > U php/php-src/trunk/ext/curl/interface.c > > Modified: php/php-src/trunk/ext/curl/interface.c > === > --- php/php-src/trunk/ext/curl/interface.c 2011-11-22 20:01:32 UTC (rev > 319701) > +++ php/php-src/trunk/ext/curl/interface.c 2011-11-22 21:10:24 UTC (rev > 319702) > @@ -767,10 +767,10 @@ > REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECORD); > REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECEIVE); > #endif > -#if LIBCURL_VERSION_NUM >= 0x071403 /* Available since 7.21.3 */ > +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ > REGISTER_CURL_CONSTANT(CURLOPT_RESOLVE); > #endif > -#if LIBCURL_VERSION_NUM >= 0x071406 /* Available since 7.21.6 */ > +#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */ > REGISTER_CURL_CONSTANT(CURLOPT_ACCEPT_ENCODING); > REGISTER_CURL_CONSTANT(CURLOPT_TRANSFER_ENCODING); > #endif > @@ -1970,7 +1970,7 @@ > case CURLOPT_SSLENGINE: > case CURLOPT_SSLENGINE_DEFAULT: > case CURLOPT_SSLCERTTYPE: > -#if LIBCURL_VERSION_NUM >= 0x071406 /* Available since 7.21.6 */ > +#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */ > case CURLOPT_ACCEPT_ENCODING: > case CURLOPT_TRANSFER_ENCODING: > #else > @@ -2300,7 +2300,7 @@ > #if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ > case CURLOPT_MAIL_RCPT: > #endif > -#if LIBCURL_VERSION_NUM >= 0x071403 /* Available since 7.21.3 */ > +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ > case CURLOPT_RESOLVE: > #endif > { > @@ -2330,9 +2330,11 @@ > case CURLOPT_MAIL_RCPT: > name = "CURLOPT_MAIL_RCPT"; > break; > +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ > case CURLOPT_RESOLVE: > name = "CURLOPT_RESOLVE"; > break; > +#endif > } > php_error_docref(NULL TSRMLS_CC, E_WARNING, > "You must pass either an object or an array with the %s argument", name); > RETVAL_FALSE; > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- 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/curl/tests/curl_multi_getcontent_basic3.phpt branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt trunk/ext/curl/tests/curl_multi_getcont
pierrick Tue, 22 Nov 2011 18:50:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=319697 Log: Fix test to remove dependancy over php.net Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt U php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt U php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt 2011-11-22 18:30:13 UTC (rev 319696) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt 2011-11-22 18:50:57 UTC (rev 319697) @@ -6,6 +6,9 @@ --SKIPIF-- --FILE-- http://php.net/robots.txt";); + $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); + curl_setopt($ch1, CURLOPT_URL, "{$host}/get.php?test=getpost&get_param=Hello%20World"); curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); @@ -46,20 +50,13 @@ echo $results2; ?> ---EXPECT-- -User-agent: * -Disallow: /backend/ -Disallow: /distributions/ -Disallow: /stats/ -Disallow: /server-status/ -Disallow: /source.php -Disallow: /search.php -Disallow: /mod.php -Disallow: /manual/add-note.php - -Disallow: /harming/humans -Disallow: /ignoring/human/orders -Disallow: /harm/to/self - +--EXPECTF-- +array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(0) { +} CURL2 - Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt 2011-11-22 18:30:13 UTC (rev 319696) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt 2011-11-22 18:50:57 UTC (rev 319697) @@ -6,6 +6,9 @@ --SKIPIF-- --FILE-- http://php.net/robots.txt";); + $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); + curl_setopt($ch1, CURLOPT_URL, "{$host}/get.php?test=getpost&get_param=Hello%20World"); curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); @@ -46,20 +50,13 @@ echo $results2; ?> ---EXPECT-- -User-agent: * -Disallow: /backend/ -Disallow: /distributions/ -Disallow: /stats/ -Disallow: /server-status/ -Disallow: /source.php -Disallow: /search.php -Disallow: /mod.php -Disallow: /manual/add-note.php - -Disallow: /harming/humans -Disallow: /ignoring/human/orders -Disallow: /harm/to/self - +--EXPECTF-- +array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(0) { +} CURL2 - Modified: php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt === --- php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt 2011-11-22 18:30:13 UTC (rev 319696) +++ php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt 2011-11-22 18:50:57 UTC (rev 319697) @@ -6,6 +6,9 @@ --SKIPIF-- --FILE-- http://php.net/robots.txt";); + $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); + curl_setopt($ch1, CURLOPT_URL, "{$host}/get.php?test=getpost&get_param=Hello%20World"); curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); @@ -46,20 +50,13 @@ echo $results2; ?> ---EXPECT-- -User-agent: * -Disallow: /backend/ -Disallow: /distributions/ -Disallow: /stats/ -Disallow: /server-status/ -Disallow: /source.php -Disallow: /search.php -Disallow: /mod.php -Disallow: /manual/add-note.php - -Disallow: /harming/humans -Disallow: /ignoring/human/orders -Disallow: /harm/to/self - +--EXPECTF-- +array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(0) { +} CURL2 - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/interface.c ext/curl/tests/curl_setopt_basic003.phpt
pierrick Tue, 22 Nov 2011 17:33:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=319693 Log: Add new cURL CURLOPT_* options Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/tests/curl_setopt_basic003.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-22 17:13:26 UTC (rev 319692) +++ php/php-src/trunk/NEWS 2011-11-22 17:33:48 UTC (rev 319693) @@ -5,7 +5,25 @@ - General improvements: . World domination -- Curl: +- cURL: + . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, +CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS, +CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE, +CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST, CURLOPT_IGNORE_CONTENT_LENGTH, +CURLOPT_CONNECT_ONLY, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE, +CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_SSL_SESSIONID_CACHE, +CURLOPT_FTP_SSL_CCC, CURLOPT_HTTP_CONTENT_DECODING, +CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_PROXY_TRANSFER_MODE, +CURLOPT_ADDRESS_SCOPE, CURLOPT_CRLFILE, CURLOPT_ISSUERCERT, +CURLOPT_USERNAME, CURLOPT_PASSWORD, CURLOPT_PROXYUSERNAME, +CURLOPT_PROXYPASSWORD, CURLOPT_NOPROXY, CURLOPT_SOCKS5_GSSAPI_NEC, +CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPT_TFTP_BLKSIZE, +CURLOPT_SSH_KNOWNHOSTS, CURLOPT_FTP_USE_PRET, CURLOPT_MAIL_FROM, +CURLOPT_MAIL_RCPT, CURLOPT_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_SERVER_CSEQ, +CURLOPT_RTSP_SESSION_ID, CURLOPT_RTSP_STREAM_URI, CURLOPT_RTSP_TRANSPORT, +CURLOPT_RTSP_REQUEST, CURLOPT_RESOLVE, CURLOPT_ACCEPT_ENCODING, +CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL. +(Pierrick) . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant still exists for backward compatibility but is doing nothing). (Pierrick) Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-22 17:13:26 UTC (rev 319692) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-22 17:33:48 UTC (rev 319693) @@ -535,11 +535,12 @@ of options and which version they were introduced */ /* Constants for curl_setopt() */ -#if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE is available since curl 7.10.8 */ +#if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE and CURLOPT_FTP_RESPONSE_TIMEOUT are available since curl 7.10.8 */ REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6); + REGISTER_CURL_CONSTANT(CURLOPT_FTP_RESPONSE_TIMEOUT); #endif REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE); REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT); @@ -561,7 +562,16 @@ REGISTER_CURL_CONSTANT(CURLOPT_POST); REGISTER_CURL_CONSTANT(CURLOPT_FTPLISTONLY); REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND); +#if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_APPEND); + REGISTER_CURL_CONSTANT(CURLOPT_DIRLISTONLY); + REGISTER_CURL_CONSTANT(CURLOPT_NEW_DIRECTORY_PERMS); + REGISTER_CURL_CONSTANT(CURLOPT_NEW_FILE_PERMS); +#endif REGISTER_CURL_CONSTANT(CURLOPT_NETRC); +#if LIBCURL_VERSION_NUM >= 0x070b00 /* Option available since 7.11.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_NETRC_FILE); +#endif REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION); #if CURLOPT_FTPASCII != 0 REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII); @@ -602,8 +612,14 @@ REGISTER_CURL_CONSTANT(CURLOPT_RETURNTRANSFER); REGISTER_CURL_CONSTANT(CURLOPT_QUOTE); REGISTER_CURL_CONSTANT(CURLOPT_POSTQUOTE); +#if LIBCURL_VERSION_NUM >= 0x070905 /* Available since 7.9.5 */ + REGISTER_CURL_CONSTANT(CURLOPT_PREQUOTE); +#endif REGISTER_CURL_CONSTANT(CURLOPT_INTERFACE); REGISTER_CURL_CONSTANT(CURLOPT_KRB4LEVEL); +#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */ + REGISTER_CURL_CONSTANT(CURLOPT_KRBLEVEL); +#endif REGISTER_CURL_CONSTANT(CURLOPT_HTTPPROXYTUNNEL); REGISTER_CURL_CONSTANT(CURLOPT_FILETIME); REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION); @@ -675,7 +691,93 @@ #endif REGISTER_CURL_CONSTANT(CURLOPT_PRIVATE); - +#if LIBCURL_VERSION_NUM >= 0x070a08 /* Available since 7.10.8 */ + REGISTER_CURL_CONSTANT(CURLOPT_MAXFILESIZE); +#endif +#if LIBCURL_VERSION_NUM >= 0x070d00 /* Available since 7.13.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_FTP_ACCOUNT); +#endif +#if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */ + REGISTER_CURL_CONSTANT(CURLOPT_COOKIELIST); + REGISTER_CURL_CONSTANT(CURLOPT_IGNORE_CONTENT_LENGTH); +#endif +#if LIBCURL_VERSION_NUM >= 0x070f02 /* Available since 7.15.2 */ + REGISTER_CURL_CONSTANT(CURLOPT_CONNECT_ONLY); + REGISTER_CURL_CONSTANT(CURLOPT_LOCALPORT); + REGISTER_CURL_CONSTANT(CUR
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/interface.c ext/curl/php_curl.h
pierrick Tue, 22 Nov 2011 17:13:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=319692 Log: Fixed bug #55635 Bug: https://bugs.php.net/55635 (Assigned) CURLOPT_BINARYTRANSFER no longer used? Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/php_curl.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-22 16:52:42 UTC (rev 319691) +++ php/php-src/trunk/NEWS 2011-11-22 17:13:26 UTC (rev 319692) @@ -5,4 +5,8 @@ - General improvements: . World domination +- Curl: + . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant + still exists for backward compatibility but is doing nothing). (Pierrick) + <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-22 16:52:42 UTC (rev 319691) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-22 17:13:26 UTC (rev 319692) @@ -261,7 +261,6 @@ ch->handlers->write->stream = NULL; ch->handlers->write->method = PHP_CURL_STDOUT; - ch->handlers->write->type = PHP_CURL_ASCII; curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch); } } @@ -1536,7 +1535,6 @@ ch->cp = cp; ch->handlers->write->method = PHP_CURL_STDOUT; - ch->handlers->write->type = PHP_CURL_ASCII; ch->handlers->read->method = PHP_CURL_DIRECT; ch->handlers->write_header->method = PHP_CURL_IGNORE; @@ -1610,7 +1608,6 @@ dupch->handlers->write->stream = ch->handlers->write->stream; } dupch->handlers->write->method = ch->handlers->write->method; - dupch->handlers->write->type = ch->handlers->write->type; if (ch->handlers->read->stream) { Z_ADDREF_P(ch->handlers->read->stream); } @@ -1953,13 +1950,7 @@ } break; case CURLOPT_BINARYTRANSFER: - convert_to_long_ex(zvalue); - - if (Z_LVAL_PP(zvalue)) { - ch->handlers->write->type = PHP_CURL_BINARY; - } else { - ch->handlers->write->type = PHP_CURL_ASCII; - } + /* Do nothing, just backward compatibility */ break; case CURLOPT_WRITEFUNCTION: if (ch->handlers->write->func_name) { Modified: php/php-src/trunk/ext/curl/php_curl.h === --- php/php-src/trunk/ext/curl/php_curl.h 2011-11-22 16:52:42 UTC (rev 319691) +++ php/php-src/trunk/ext/curl/php_curl.h 2011-11-22 17:13:26 UTC (rev 319692) @@ -41,14 +41,12 @@ #define curl_module_ptr &curl_module_entry #define CURLOPT_RETURNTRANSFER 19913 -#define CURLOPT_BINARYTRANSFER 19914 +#define CURLOPT_BINARYTRANSFER 19914 /* For Backward compatibility */ #define PHP_CURL_STDOUT 0 #define PHP_CURL_FILE 1 #define PHP_CURL_USER 2 #define PHP_CURL_DIRECT 3 #define PHP_CURL_RETURN 4 -#define PHP_CURL_ASCII 5 -#define PHP_CURL_BINARY 6 #define PHP_CURL_IGNORE 7 extern int le_curl; @@ -85,7 +83,6 @@ FILE*fp; smart_str buf; int method; - int type; zval*stream; } php_curl_write; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING
I personally think that we should do both. As of 5.4 get_magic_quotes_* are mark them as deprecated to discourage people using it and will always return false. Thanks Pierrick On 22 November 2011 08:29, Peter Cowburn wrote: > Hi docs folks, > > What are your thoughts on how to treat the > get_magic_quotes_(gpc|runtime) functions, in the documentation. > Traditionally we mark functions as deprecated if they're deprecated in > the code (e.g. PHP_DEP_FE), but that's not the case for these two. > > Should we just say in the change log that they'll always return false, > or should the term "deprecated" be used? > > Peter > > On 22 November 2011 13:16, Pierre Joye wrote: >> they are, we only not raise notices or warnings anymore to keep the >> user experience at a good level. So please keep them in here :) >> >> On Tue, Nov 22, 2011 at 2:11 PM, Pierrick Charron wrote: >>> pierrick Tue, 22 Nov 2011 13:11:20 + >>> >>> Revision: http://svn.php.net/viewvc?view=revision&revision=319679 >>> >>> Log: >>> Those functions are not deprecated (r319249 #55371) >>> >>> Bug: https://bugs.php.net/55371 (Closed) get_magic_quotes_gpc() throws >>> deprecation warning >>> >>> Changed paths: >>> U php/php-src/branches/PHP_5_4/UPGRADING >>> >>> Modified: php/php-src/branches/PHP_5_4/UPGRADING >>> === >>> --- php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 12:47:49 UTC >>> (rev 319678) >>> +++ php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 13:11:20 UTC >>> (rev 319679) >>> @@ -258,8 +258,6 @@ >>> 7. Deprecated >>> = >>> >>> -- get_magic_quotes_gpc() >>> -- get_magic_quotes_runtime() >>> - mcrypt_generic_end() >>> - mysql_list_dbs() >>> >>> >>> >>> -- >>> PHP CVS Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >> >> >> >> -- >> Pierre >> >> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING
Ok I just reverted the commit. It just look weird that they are deprecated in the UPGRADING but not in the code but I understand that it's better to tell people to avoid using them anyway :) On 22 November 2011 08:16, Pierre Joye wrote: > they are, we only not raise notices or warnings anymore to keep the > user experience at a good level. So please keep them in here :) > > On Tue, Nov 22, 2011 at 2:11 PM, Pierrick Charron wrote: >> pierrick Tue, 22 Nov 2011 13:11:20 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=319679 >> >> Log: >> Those functions are not deprecated (r319249 #55371) >> >> Bug: https://bugs.php.net/55371 (Closed) get_magic_quotes_gpc() throws >> deprecation warning >> >> Changed paths: >> U php/php-src/branches/PHP_5_4/UPGRADING >> >> Modified: php/php-src/branches/PHP_5_4/UPGRADING >> === >> --- php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 12:47:49 UTC (rev >> 319678) >> +++ php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 13:11:20 UTC (rev >> 319679) >> @@ -258,8 +258,6 @@ >> 7. Deprecated >> = >> >> -- get_magic_quotes_gpc() >> -- get_magic_quotes_runtime() >> - mcrypt_generic_end() >> - mysql_list_dbs() >> >> >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- 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_4/ UPGRADING
pierrick Tue, 22 Nov 2011 13:20:50 + Revision: http://svn.php.net/viewvc?view=revision&revision=319680 Log: Revert last commit Keep get_magic_quotes_gpc and get_magic_quotes_runtime as deprecated even if it's not the case in the code Changed paths: U php/php-src/branches/PHP_5_4/UPGRADING Modified: php/php-src/branches/PHP_5_4/UPGRADING === --- php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 13:11:20 UTC (rev 319679) +++ php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 13:20:50 UTC (rev 319680) @@ -258,6 +258,8 @@ 7. Deprecated = +- get_magic_quotes_gpc() +- get_magic_quotes_runtime() - mcrypt_generic_end() - mysql_list_dbs() -- 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_4/ UPGRADING
pierrick Tue, 22 Nov 2011 13:11:20 + Revision: http://svn.php.net/viewvc?view=revision&revision=319679 Log: Those functions are not deprecated (r319249 #55371) Bug: https://bugs.php.net/55371 (Closed) get_magic_quotes_gpc() throws deprecation warning Changed paths: U php/php-src/branches/PHP_5_4/UPGRADING Modified: php/php-src/branches/PHP_5_4/UPGRADING === --- php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 12:47:49 UTC (rev 319678) +++ php/php-src/branches/PHP_5_4/UPGRADING 2011-11-22 13:11:20 UTC (rev 319679) @@ -258,8 +258,6 @@ 7. Deprecated = -- get_magic_quotes_gpc() -- get_magic_quotes_runtime() - mcrypt_generic_end() - mysql_list_dbs() -- 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/curl/tests/bug48203_multi.phpt branches/PHP_5_4/ext/curl/tests/bug48203_multi.phpt trunk/ext/curl/tests/bug48203_multi.phpt
pierrick Tue, 22 Nov 2011 08:29:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=319664 Log: Fix this test to work with all version (even old) of libcurl Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt U php/php-src/branches/PHP_5_4/ext/curl/tests/bug48203_multi.phpt U php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt 2011-11-22 07:12:20 UTC (rev 319663) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt 2011-11-22 08:29:26 UTC (rev 319664) @@ -72,7 +72,7 @@ Warning: curl_multi_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_multi.php on line 36 %A Ok for CURLOPT_STDERR - +%A Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/bug48203_multi.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/bug48203_multi.phpt 2011-11-22 07:12:20 UTC (rev 319663) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/bug48203_multi.phpt 2011-11-22 08:29:26 UTC (rev 319664) @@ -72,7 +72,7 @@ Warning: curl_multi_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_multi.php on line 36 %A Ok for CURLOPT_STDERR - +%A Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 Modified: php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt === --- php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt2011-11-22 07:12:20 UTC (rev 319663) +++ php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt2011-11-22 08:29:26 UTC (rev 319664) @@ -72,7 +72,7 @@ Warning: curl_multi_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_multi.php on line 36 %A Ok for CURLOPT_STDERR - +%A Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php