[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri Apr 17 01:32:57 2009 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3376r2=1.3377diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3376 php-src/ChangeLog:1.3377 --- php-src/ChangeLog:1.3376Thu Apr 16 01:32:41 2009 +++ php-src/ChangeLog Fri Apr 17 01:32:55 2009 @@ -1,3 +1,172 @@ +2009-04-16 Ilia Alshanetsky i...@prohost.org + +* ext/pdo_firebird/firebird_driver.c + ext/pdo_firebird/firebird_driver.c: + + MFB: Fixed compiler warning + +* (PHP_5_3) + ext/pdo_firebird/firebird_driver.c: + + Fixed compiler warning + +2009-04-16 Pierre-Alain Joye pierre@gmail.com + +* (PHP_5_2) + ext/curl/interface.c: + - fix zts build + +2009-04-16 Hannes Magnusson hannes.magnus...@gmail.com + +* (PHP_5_2) + NEWS: + BFN + +* (PHP_5_2) + ZendEngine2/zend_compile.c + ZendEngine2/tests/bug47981.phpt: + MFH: Fixed bug#47981 (error handler not called regardless) + +2009-04-16 Pierre-Alain Joye pierre@gmail.com + +* (PHP_5_2) + ext/curl/interface.c: + - improve file:// deactivation in curl_init and do not allow to enable it + again manually + +2009-04-16 Hannes Magnusson hannes.magnus...@gmail.com + +* (PHP_5_3) + ZendEngine2/zend_compile.c + ZendEngine2/tests/bug47981.phpt: + MFH: Fixed bug#47981 (error handler not called regardless) + +* ZendEngine2/tests/bug47981.phpt + ZendEngine2/tests/bug47981.phpt + ZendEngine2/tests/bug47981.phpt: +1.1.4; + Fixed bug#47981 (error handler not called regardless) + +* ZendEngine2/zend_compile.c: + Fixed bug#47981 (error handler not called regardless) + +* run-tests.php: + Make it possible to run on PHP5.2 + +* run-tests.php: + Sync WS with 5.3 + +2009-04-16 Zoe Slattery zoe.slatt...@googlemail.com + +* (PHP_5_3) + ext/standard/tests/array/count_recursive.phpt + ext/standard/tests/array/end.phpt + ext/standard/tests/dir/dir_variation8.phpt + ext/standard/tests/file/005_variation.phpt + ext/standard/tests/file/copy_variation12.phpt + ext/standard/tests/file/file_get_contents_basic.phpt + ext/standard/tests/file/file_get_contents_error.phpt + ext/standard/tests/file/fscanf_variation51.phpt + ext/standard/tests/file/fscanf_variation52.phpt + ext/standard/tests/file/fscanf_variation53.phpt + ext/standard/tests/file/is_dir_variation1.phpt + ext/standard/tests/file/is_dir_variation2.phpt + ext/standard/tests/file/is_file_error.phpt + ext/standard/tests/file/mkdir_rmdir_variation2.phpt + ext/standard/tests/file/readlink_realpath_variation3.phpt + ext/standard/tests/file/rename_basic.phpt + ext/standard/tests/file/rename_variation.phpt + ext/standard/tests/file/rename_variation1.phpt + ext/standard/tests/file/rename_variation2.phpt + ext/standard/tests/file/rename_variation3.phpt + ext/standard/tests/file/rename_variation4.phpt + ext/standard/tests/file/rename_variation8.phpt + ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt + ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt + ext/standard/tests/general_functions/bug44394_2.phpt + ext/standard/tests/general_functions/is_array.phpt + ext/standard/tests/general_functions/is_bool.phpt + ext/standard/tests/general_functions/is_float.phpt + ext/standard/tests/general_functions/is_int.phpt + ext/standard/tests/general_functions/is_null.phpt + ext/standard/tests/general_functions/is_numeric.phpt + ext/standard/tests/general_functions/is_object.phpt + ext/standard/tests/general_functions/is_scalar.phpt + ext/standard/tests/general_functions/is_string.phpt + ext/standard/tests/general_functions/strval.phpt + ext/standard/tests/strings/strstr.phpt + ext/standard/tests/strings/vfprintf_error1.phpt + ext/standard/tests/strings/vfprintf_error2.phpt + ext/standard/tests/strings/vfprintf_error3.phpt + ext/standard/tests/strings/vfprintf_error4.phpt: + fixing incorrect --CLEAN-- sections + +2009-04-16 Dmitry Stogov dmi...@zend.com + +* ext/standard/tests/filters/chunked_001.phpt + ext/standard/tests/filters/chunked_001.phpt: + + file chunked_001.phpt was initially added on branch PHP_5_3. + +* (PHP_5_3) + NEWS + ext/standard/filters.c + ext/standard/filters.c + ext/standard/http_fopen_wrapper.c + ext/standard/http_fopen_wrapper.c + ext/standard/tests/filters/chunked_001.phpt: + - Added dechunk filter which can decode HTTP responces with chunked + transfer-encoding. HTTP streams use this filter automatically in case + Transfer-Encoding: chunked header presents in responce. It's possible to + disable this
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
sebastian Thu Apr 16 06:47:37 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: Fugbix typo. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.558r2=1.2027.2.547.2.965.2.559diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.558 php-src/NEWS:1.2027.2.547.2.965.2.559 --- php-src/NEWS:1.2027.2.547.2.965.2.558 Tue Apr 14 15:48:37 2009 +++ php-src/NEWSThu Apr 16 06:47:36 2009 @@ -525,7 +525,7 @@ . Added pcntl_sigtimedwait(). - Improved SOAP extension: - . Added support for element names in context of XMLShema's any. (Dmitry) + . Added support for element names in context of XMLSchema's any. (Dmitry) . Added ability to use Traversable objects instead of plain arrays. (Joshua Reese, Dmitry) . Fixed possible crash bug caused by an uninitialized value. (Zdash Urf) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/curl interface.c
pajoye Thu Apr 16 09:47:33 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/curl interface.c Log: - disable file:// when safe_mode or open_basedir are enabled http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.43r2=1.62.2.14.2.44diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.43 php-src/ext/curl/interface.c:1.62.2.14.2.44 --- php-src/ext/curl/interface.c:1.62.2.14.2.43 Mon Mar 16 15:09:51 2009 +++ php-src/ext/curl/interface.cThu Apr 16 09:47:33 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.43 2009/03/16 15:09:51 felipe Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.44 2009/04/16 09:47:33 pajoye Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -162,31 +162,43 @@ #define php_curl_ret(__ret) RETVAL_FALSE; return; #endif -#define PHP_CURL_CHECK_OPEN_BASEDIR(str, len, __ret) \ - if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) \ - strncasecmp(str, file:, sizeof(file:) - 1) == 0) \ - { \ - php_url *tmp_url; \ - \ - if (!(tmp_url = php_url_parse_ex(str, len))) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid URL '%s', str); \ - php_curl_ret(__ret); \ - } \ - \ - if (tmp_url-host || !php_memnstr(str, tmp_url-path, strlen(tmp_url-path), str + len)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, URL '%s' contains unencoded control characters, str); \ - php_url_free(tmp_url); \ - php_curl_ret(__ret); \ - } \ - \ - if (tmp_url-query || tmp_url-fragment || php_check_open_basedir(tmp_url-path TSRMLS_CC) || \ - (PG(safe_mode) !php_checkuid(tmp_url-path, rb+, CHECKUID_CHECK_MODE_PARAM)) \ - ) { \ - php_url_free(tmp_url); \ - php_curl_ret(__ret); \ - } \ - php_url_free(tmp_url); \ +static int php_curl_option_url(php_curl *ch, const char *url, const int len) { + CURLcode error=CURLE_OK; +#if LIBCURL_VERSION_NUM 0x071100 + char *copystr = NULL; +#endif + + /* Disable file:// if open_basedir or safe_mode are used */ + if ((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) { +#if LIBCURL_VERSION_NUM = 0x071304 + error = curl_easy_setopt(ch-cp, CURLOPT_PROTOCOLS, CURLPROTO_ALL
[PHP-CVS] cvs: php-src /ext/standard filters.c http_fopen_wrapper.c /ext/standard/tests/filters chunked_001.phpt
dmitry Thu Apr 16 10:34:15 2009 UTC Modified files: /php-src/ext/standard filters.c http_fopen_wrapper.c /php-src/ext/standard/tests/filters chunked_001.phpt Log: - Added dechunk filter which can decode HTTP responces with chunked transfer-encoding. HTTP streams use this filter automatically in case Transfer-Encoding: chunked header presents in responce. It's possible to disable this behaviour using http=array(auto_decode=0) in stream context - Fixed bug #47021 (SoapClient stumbles over WSDL delivered with Transfer-Encoding: chunked) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filters.c?r1=1.63r2=1.64diff_format=u Index: php-src/ext/standard/filters.c diff -u php-src/ext/standard/filters.c:1.63 php-src/ext/standard/filters.c:1.64 --- php-src/ext/standard/filters.c:1.63 Tue Mar 10 23:39:39 2009 +++ php-src/ext/standard/filters.c Thu Apr 16 10:34:15 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: filters.c,v 1.63 2009/03/10 23:39:39 helly Exp $ */ +/* $Id: filters.c,v 1.64 2009/04/16 10:34:15 dmitry Exp $ */ #include php.h #include php_globals.h @@ -1978,6 +1978,225 @@ /* }}} */ +/* {{{ chunked filter implementation */ +typedef enum _php_chunked_filter_state { + CHUNK_SIZE_START, + CHUNK_SIZE, + CHUNK_SIZE_EXT_START, + CHUNK_SIZE_EXT, + CHUNK_SIZE_CR, + CHUNK_SIZE_LF, + CHUNK_BODY, + CHUNK_BODY_CR, + CHUNK_BODY_LF, + CHUNK_TRAILER, + CHUNK_ERROR +} php_chunked_filter_state; + +typedef struct _php_chunked_filter_data { + php_chunked_filter_state state; + int chunk_size; + int persistent; +} php_chunked_filter_data; + +static int php_dechunk(char *buf, int len, php_chunked_filter_data *data) +{ + char *p = buf; + char *end = p + len; + char *out = buf; + int out_len = 0; + + while (p end) { + switch (data-state) { + case CHUNK_SIZE_START: + data-chunk_size = 0; + case CHUNK_SIZE: + while (p end) { + if (*p = '0' *p = '9') { + data-chunk_size = (data-chunk_size * 16) + (*p - '0'); + } else if (*p = 'A' *p = 'F') { + data-chunk_size = (data-chunk_size * 16) + (*p - 'A' + 10); + } else if (*p = 'a' *p = 'f') { + data-chunk_size = (data-chunk_size * 16) + (*p - 'a' + 10); + } else if (data-state == CHUNK_SIZE_START) { + data-state = CHUNK_ERROR; + break; + } else { + data-state = CHUNK_SIZE_EXT_START; + break; + } + data-state = CHUNK_SIZE; + p++; + } + if (data-state == CHUNK_ERROR) { + continue; + } else if (p == end) { + return out_len; + } + case CHUNK_SIZE_EXT_START: + if (*p == ';'|| *p == '\r' || *p == '\n') { + data-state = CHUNK_SIZE_EXT; + } else { + data-state = CHUNK_ERROR; + continue; + } + case CHUNK_SIZE_EXT: + /* skip extension */ + while (p end *p != '\r' *p != '\n') { + p++; + } + if (p == end) { + return out_len; + } + case CHUNK_SIZE_CR: + if (*p == '\r') { + p++; + if (p == end) { + data-state = CHUNK_SIZE_LF; + return out_len; + } + } + case CHUNK_SIZE_LF: + if (*p == '\n') { + p++; + if (data-chunk_size == 0) { +
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard filters.c http_fopen_wrapper.c /ext/standard/tests/filters chunked_001.phpt
On Thu, Apr 16, 2009 at 12:16, Dmitry Stogov dmi...@php.net wrote: dmitry Thu Apr 16 10:16:27 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filters chunked_001.phpt Modified files: /php-src NEWS /php-src/ext/standard filters.c http_fopen_wrapper.c Log: - Added dechunk filter which can decode HTTP responces with chunked transfer-encoding. HTTP streams use this filter automatically in case Transfer-Encoding: chunked header presents in responce. It's possible to disable this behaviour using http=array(auto_decode=0) in stream context - Fixed bug #47021 (SoapClient stumbles over WSDL delivered with Transfer-Encoding: chunked) Although its great that this is implemented as a filter I'm a bit sceptical on removing the header from the response, and enabling this by default is quite a big change considering PHP has never supported chunked encoding and bunch of userland implementations exist for it. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions bug44394_2.phpt is_array.phpt is_bool.phpt is_float.phpt is_int.phpt is_null.phpt is_numeric.phpt is_object.phpt is_scalar.phpt is
zoe Thu Apr 16 10:52:48 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions is_bool.phpt is_array.phpt is_null.phpt strval.phpt bug44394_2.phpt is_string.phpt is_object.phpt is_int.phpt is_numeric.phpt is_scalar.phpt is_float.phpt Log: fixing incorrect --CLEAN-- sections http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_bool.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/general_functions/is_bool.phpt diff -u php-src/ext/standard/tests/general_functions/is_bool.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/general_functions/is_bool.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/general_functions/is_bool.phpt:1.1.2.1.2.1 Fri Jun 20 13:02:33 2008 +++ php-src/ext/standard/tests/general_functions/is_bool.phpt Thu Apr 16 10:52:47 2009 @@ -135,13 +135,12 @@ var_dump( is_bool(TRUE, FALSE) ); echo Done\n; -? ---CLEAN-- // close resources fclose($fp); closedir($dfp); +? --EXPECTF-- *** Testing is_bool() with valid boolean values *** -- Iteration 1 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_array.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/general_functions/is_array.phpt diff -u php-src/ext/standard/tests/general_functions/is_array.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/general_functions/is_array.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/general_functions/is_array.phpt:1.1.2.1.2.1 Fri Jun 20 13:02:33 2008 +++ php-src/ext/standard/tests/general_functions/is_array.phpt Thu Apr 16 10:52:47 2009 @@ -106,12 +106,10 @@ var_dump( is_array ($fp, $fp) ); echo Done\n; -? ---CLEAN-- /* close resources */ fclose($fp); closedir($dfp); - +? --EXPECTF-- *** Testing is_array() on different type of arrays *** -- Iteration 1 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_null.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/general_functions/is_null.phpt diff -u php-src/ext/standard/tests/general_functions/is_null.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/general_functions/is_null.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/general_functions/is_null.phpt:1.1.2.1.2.1 Fri Jun 20 13:02:33 2008 +++ php-src/ext/standard/tests/general_functions/is_null.phpt Thu Apr 16 10:52:47 2009 @@ -135,13 +135,12 @@ var_dump( is_null(NULL, null) ); echo Done\n; -? ---CLEAN-- // close the resources used fclose($fp); closedir($dfp); +? --EXPECTF-- *** Testing is_null() with valid null values *** -- Iteration 1 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/strval.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/standard/tests/general_functions/strval.phpt diff -u php-src/ext/standard/tests/general_functions/strval.phpt:1.1.2.2.2.1 php-src/ext/standard/tests/general_functions/strval.phpt:1.1.2.2.2.2 --- php-src/ext/standard/tests/general_functions/strval.phpt:1.1.2.2.2.1 Fri Jun 20 14:53:57 2008 +++ php-src/ext/standard/tests/general_functions/strval.phptThu Apr 16 10:52:47 2009 @@ -149,13 +149,12 @@ var_dump( strval( $scalars[0], $scalars[1]) ); echo Done\n; -? ---CLEAN-- // close the resources used fclose($fp); closedir($dfp); +? --EXPECTF-- *** Testing str_val() with scalar values*** -- Iteration 1 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394_2.phpt?r1=1.1.2.5r2=1.1.2.6diff_format=u Index: php-src/ext/standard/tests/general_functions/bug44394_2.phpt diff -u php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.1.2.5 php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.1.2.6 --- php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.1.2.5 Thu Aug 21 10:30:49 2008 +++ php-src/ext/standard/tests/general_functions/bug44394_2.phptThu Apr 16 10:52:47 2009 @@ -26,7 +26,6 @@ ? --CLEAN-- ?php -unlink(__DIR__ . '/sess_'.session_id()); foreach (glob(__DIR__ . '/sess_*') as $filename) { unlink($filename); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_string.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/general_functions/is_string.phpt diff -u
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array count_recursive.phpt end.phpt
zoe Thu Apr 16 10:54:45 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array count_recursive.phpt end.phpt Log: fixing incorrect --CLEAN-- sections http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/count_recursive.phpt?r1=1.4.8.1r2=1.4.8.2diff_format=u Index: php-src/ext/standard/tests/array/count_recursive.phpt diff -u php-src/ext/standard/tests/array/count_recursive.phpt:1.4.8.1 php-src/ext/standard/tests/array/count_recursive.phpt:1.4.8.2 --- php-src/ext/standard/tests/array/count_recursive.phpt:1.4.8.1 Fri Nov 2 19:41:11 2007 +++ php-src/ext/standard/tests/array/count_recursive.phpt Thu Apr 16 10:54:45 2009 @@ -125,7 +125,6 @@ echo \nDone; ---CLEAN-- /* closing the resource handles */ fclose( $resource1 ); closedir( $resource2 ); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/end.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/standard/tests/array/end.phpt diff -u php-src/ext/standard/tests/array/end.phpt:1.1.2.2.2.1 php-src/ext/standard/tests/array/end.phpt:1.1.2.2.2.2 --- php-src/ext/standard/tests/array/end.phpt:1.1.2.2.2.1 Fri Nov 2 19:41:11 2007 +++ php-src/ext/standard/tests/array/end.phpt Thu Apr 16 10:54:45 2009 @@ -123,13 +123,12 @@ echo Done\n; -? ---CLEAN-- /* cleaning resource handles */ fclose( $file_handle ); //file resource handle deleted closedir( $dir_handle ); //dir resource handle deleted +? --EXPECTF-- *** Testing end() on different arrays *** -- Iteration 1 -- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
derick Thu Apr 16 09:57:08 2009 UTC Modified files: /CVSROOTavail Log: - Give Stefan phpruntests access as well. http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1516r2=1.1517diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1516 CVSROOT/avail:1.1517 --- CVSROOT/avail:1.1516Wed Apr 15 16:32:36 2009 +++ CVSROOT/avail Thu Apr 16 09:57:08 2009 @@ -363,7 +363,7 @@ avail|olafurw,nlopess,pbiggar|php-benchmarks # phpruntests karma -avail|zoe|phpruntests +avail|zoe,spriebsch|phpruntests # SVN conversion repo avail|gwynne|SVNROOT -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard filters.c http_fopen_wrapper.c /ext/standard/tests/filters chunked_001.phpt
Hannes Magnusson wrote: On Thu, Apr 16, 2009 at 12:16, Dmitry Stogov dmi...@php.net wrote: dmitry Thu Apr 16 10:16:27 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filters chunked_001.phpt Modified files: /php-srcNEWS /php-src/ext/standard filters.c http_fopen_wrapper.c Log: - Added dechunk filter which can decode HTTP responces with chunked transfer-encoding. HTTP streams use this filter automatically in case Transfer-Encoding: chunked header presents in responce. It's possible to disable this behaviour using http=array(auto_decode=0) in stream context - Fixed bug #47021 (SoapClient stumbles over WSDL delivered with Transfer-Encoding: chunked) Although its great that this is implemented as a filter I'm a bit sceptical on removing the header from the response, and enabling this by default is quite a big change considering PHP has never supported chunked encoding and bunch of userland implementations exist for it. -Hannes The header needs to be taken out so the caller knows that the content is no longer chunked. It would however be nice if some header was added indicating that the data had been chunked. Similar to how ext/http does it where it changes the Transfer-Encoding header to X-Original-Transfer-Encoding. Rob -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard filters.c http_fopen_wrapper.c /ext/standard/tests/filters chunked_001.phpt
dmitry Thu Apr 16 10:16:27 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filters chunked_001.phpt Modified files: /php-srcNEWS /php-src/ext/standard filters.c http_fopen_wrapper.c Log: - Added dechunk filter which can decode HTTP responces with chunked transfer-encoding. HTTP streams use this filter automatically in case Transfer-Encoding: chunked header presents in responce. It's possible to disable this behaviour using http=array(auto_decode=0) in stream context - Fixed bug #47021 (SoapClient stumbles over WSDL delivered with Transfer-Encoding: chunked) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.559r2=1.2027.2.547.2.965.2.560diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.559 php-src/NEWS:1.2027.2.547.2.965.2.560 --- php-src/NEWS:1.2027.2.547.2.965.2.559 Thu Apr 16 06:47:36 2009 +++ php-src/NEWSThu Apr 16 10:16:26 2009 @@ -6,6 +6,11 @@ - Upgraded bundled PCRE to version 7.9. (Nuno) - Added 'n' flag to fopen to allow passing O_NONBLOCK to the underlying open(2) system call. (Mikko) +- Added dechunk filter which can decode HTTP responces with chunked + transfer-encoding. HTTP streams use this filter automatically in case + Transfer-Encoding: chunked header presents in responce. It's possible to + disable this behaviour using http=array(auto_decode=0) in stream + context. (Dmitry) - Fixed bug #47880 (crashes in call_user_func_array()). (Dmitry) - Fixed bug #47856 (stristr() converts needle to lower-case). (Ilia) @@ -28,6 +33,8 @@ - Fixed bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote). (Dmitry) - Fixed bug #47038 (Memory leak in include). (Dmitry) +- Fixed bug #47021 (SoapClient stumbles over WSDL delivered with + Transfer-Encoding: chunked). (Dmitry) - Fixed bug #46108 (DateTime - Memory leak when unserializing). (Felipe) - Fixed bug #44861 (scrollable cursor don't work with pgsql). (Matteo) - Fixed bug #44409 (PDO::FETCH_SERIALIZE calls __construct()). (Matteo) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filters.c?r1=1.44.2.6.2.4.2.3r2=1.44.2.6.2.4.2.4diff_format=u Index: php-src/ext/standard/filters.c diff -u php-src/ext/standard/filters.c:1.44.2.6.2.4.2.3 php-src/ext/standard/filters.c:1.44.2.6.2.4.2.4 --- php-src/ext/standard/filters.c:1.44.2.6.2.4.2.3 Wed Dec 31 11:15:45 2008 +++ php-src/ext/standard/filters.c Thu Apr 16 10:16:27 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: filters.c,v 1.44.2.6.2.4.2.3 2008/12/31 11:15:45 sebastian Exp $ */ +/* $Id: filters.c,v 1.44.2.6.2.4.2.4 2009/04/16 10:16:27 dmitry Exp $ */ #include php.h #include php_globals.h @@ -1897,6 +1897,220 @@ /* }}} */ +/* {{{ chunked filter implementation */ +typedef enum _php_chunked_filter_state { + CHUNK_SIZE_START, + CHUNK_SIZE, + CHUNK_SIZE_EXT_START, + CHUNK_SIZE_EXT, + CHUNK_SIZE_CR, + CHUNK_SIZE_LF, + CHUNK_BODY, + CHUNK_BODY_CR, + CHUNK_BODY_LF, + CHUNK_TRAILER, + CHUNK_ERROR +} php_chunked_filter_state; + +typedef struct _php_chunked_filter_data { + php_chunked_filter_state state; + int chunk_size; + int persistent; +} php_chunked_filter_data; + +static int php_dechunk(char *buf, int len, php_chunked_filter_data *data) +{ + char *p = buf; + char *end = p + len; + char *out = buf; + int out_len = 0; + + while (p end) { + switch (data-state) { + case CHUNK_SIZE_START: + data-chunk_size = 0; + case CHUNK_SIZE: + while (p end) { + if (*p = '0' *p = '9') { + data-chunk_size = (data-chunk_size * 16) + (*p - '0'); + } else if (*p = 'A' *p = 'F') { + data-chunk_size = (data-chunk_size * 16) + (*p - 'A' + 10); + } else if (*p = 'a' *p = 'f') { + data-chunk_size = (data-chunk_size * 16) + (*p - 'a' + 10); + } else if (data-state == CHUNK_SIZE_START) { + data-state = CHUNK_ERROR; + break; + } else { + data-state = CHUNK_SIZE_EXT_START; + break; + } + data-state = CHUNK_SIZE; + p++; + } + if (data-state ==
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file 005_variation.phpt copy_variation12.phpt file_get_contents_basic.phpt file_get_contents_error.phpt fscanf_variation51.phpt fscanf_variation52.p
zoe Thu Apr 16 12:14:38 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filefile_get_contents_error.phpt mkdir_rmdir_variation2.phpt 005_variation.phpt fscanf_variation53.phpt rename_variation8.phpt fscanf_variation52.phpt is_dir_variation2.phpt fscanf_variation51.phpt is_dir_variation1.phpt rename_variation.phpt rename_variation4.phpt rename_variation3.phpt rename_variation2.phpt rename_variation1.phpt rename_basic.phpt readlink_realpath_variation3.phpt copy_variation12.phpt is_file_error.phpt symlink_link_linkinfo_is_link_basic2.phpt symlink_link_linkinfo_is_link_variation6.phpt file_get_contents_basic.phpt Log: fixing incorrect --CLEAN-- sections http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_get_contents_error.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/file/file_get_contents_error.phpt diff -u php-src/ext/standard/tests/file/file_get_contents_error.phpt:1.1.4.2 php-src/ext/standard/tests/file/file_get_contents_error.phpt:1.1.4.3 --- php-src/ext/standard/tests/file/file_get_contents_error.phpt:1.1.4.2 Wed Nov 26 10:10:17 2008 +++ php-src/ext/standard/tests/file/file_get_contents_error.phptThu Apr 16 12:14:38 2009 @@ -38,9 +38,12 @@ --CLEAN-- ?php $file_path = dirname(__FILE__); -unlink($file_path./file_put_contents_error.tmp); -unlink($file_path./file_put_contents1.tmp); - +if(file_exists($file_path./file_put_contents_error.tmp)) { + unlink($file_path./file_put_contents_error.tmp); +} +if(file_exists($file_path./file_put_contents1.tmp)) { + unlink($file_path./file_put_contents1.tmp); +} ? --EXPECTF-- *** Testing error conditions *** @@ -61,4 +64,4 @@ Warning: file_get_contents(): length must be greater than or equal to zero in %s on line %d bool(false) -*** Done *** \ No newline at end of file +*** Done *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt?r1=1.1.2.2.2.2r2=1.1.2.2.2.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt diff -u php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.1.2.2.2.2 php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.1.2.2.2.3 --- php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.1.2.2.2.2 Fri Dec 12 12:44:48 2008 +++ php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt Thu Apr 16 12:14:38 2009 @@ -50,7 +50,6 @@ --CLEAN-- ?php rmdir(dirname(__FILE__)./mkdir_variation2/test/); -rmdir(dirname(__FILE__)./mkdir_variation2/test1/); rmdir(dirname(__FILE__)./mkdir_variation2/); ? --EXPECTF-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/005_variation.phpt?r1=1.1.2.1r2=1.1.2.1.2.1diff_format=u Index: php-src/ext/standard/tests/file/005_variation.phpt diff -u php-src/ext/standard/tests/file/005_variation.phpt:1.1.2.1 php-src/ext/standard/tests/file/005_variation.phpt:1.1.2.1.2.1 --- php-src/ext/standard/tests/file/005_variation.phpt:1.1.2.1 Mon Jun 11 16:14:59 2007 +++ php-src/ext/standard/tests/file/005_variation.phpt Thu Apr 16 12:14:38 2009 @@ -156,13 +156,27 @@ --CLEAN-- ?php $file_path = dirname(__FILE__); -unlink($file_path./005_variation_softlink.tmp); -unlink($file_path./005_variation_hardlink.tmp); -unlink($file_path./005_variation1.tmp); -unlink($file_path./005_variation_copy.tmp); -unlink($file_path./005_variation_touch.tmp); -unlink($file_path./005_variation_touch_fly.tmp); -unlink($file_path./005_variation_touch_new.tmp); +if(file_exists($file_path./005_variation_softlink.tmp)) { + unlink($file_path./005_variation_softlink.tmp); +} +if(file_exists($file_path./005_variation_hardlink.tmp)) { + unlink($file_path./005_variation_hardlink.tmp); +} +if(file_exists($file_path./005_variation1.tmp)) { + unlink($file_path./005_variation1.tmp); +} +if(file_exists($file_path./005_variation_copy.tmp)) { + unlink($file_path./005_variation_copy.tmp); +} +if(file_exists($file_path./005_variation_touch.tmp)) { + unlink($file_path./005_variation_touch.tmp); +} +if(file_exists($file_path./005_variation_touch_fly.tmp)) { + unlink($file_path./005_variation_touch_fly.tmp); +}
[PHP-CVS] cvs: php-src / run-tests.php
bjori Thu Apr 16 13:40:47 2009 UTC Modified files: /php-srcrun-tests.php Log: Make it possible to run on PHP5.2 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.394r2=1.395diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.394 php-src/run-tests.php:1.395 --- php-src/run-tests.php:1.394 Thu Apr 16 13:39:31 2009 +++ php-src/run-tests.php Thu Apr 16 13:40:47 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.394 2009/04/16 13:39:31 bjori Exp $ */ +/* $Id: run-tests.php,v 1.395 2009/04/16 13:40:47 bjori Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -59,11 +59,26 @@ exit; } -// __DIR__ is available from 5.3.0 +// Version constants only available as of 5.2.8 +if (!defined(PHP_VERSION_ID)) { + list($major, $minor, $bug) = explode(., phpversion(), 3); + $bug = (int)$bug; // Many distros make up their own versions + if ($bug 10) { + $bug = 0$bug; + } + + define(PHP_VERSION_ID, {$major}0{$minor}$bug); + define(PHP_MAJOR_VERSION, $major); +} + +// __DIR__ and FILE_BINARY is available from 5.3.0 if (PHP_VERSION_ID 50300) { define('__DIR__', realpath(dirname(__FILE__))); + define('FILE_BINARY', 0); } + + // If timezone is not set, use UTC. if (ini_get('date.timezone') == '') { date_default_timezone_set('UTC'); @@ -617,7 +632,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.394 $' . \n; + echo '$Revision: 1.395 $' . \n; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / run-tests.php
bjori Thu Apr 16 13:41:25 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcrun-tests.php Log: MFH: Make it possible to run on 5.2 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.35.2.63r2=1.226.2.37.2.35.2.64diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.35.2.63 php-src/run-tests.php:1.226.2.37.2.35.2.64 --- php-src/run-tests.php:1.226.2.37.2.35.2.63 Thu Mar 12 20:42:46 2009 +++ php-src/run-tests.php Thu Apr 16 13:41:25 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.35.2.63 2009/03/12 20:42:46 zoe Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.35.2.64 2009/04/16 13:41:25 bjori Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -59,11 +59,26 @@ exit; } -// __DIR__ is available from 5.3.0 +// Version constants only available as of 5.2.8 +if (!defined(PHP_VERSION_ID)) { + list($major, $minor, $bug) = explode(., phpversion(), 3); + $bug = (int)$bug; // Many distros make up their own versions + if ($bug 10) { + $bug = 0$bug; + } + + define(PHP_VERSION_ID, {$major}0{$minor}$bug); + define(PHP_MAJOR_VERSION, $major); +} + +// __DIR__ and FILE_BINARY is available from 5.3.0 if (PHP_VERSION_ID 50300) { define('__DIR__', realpath(dirname(__FILE__))); + define('FILE_BINARY', 0); } + + // If timezone is not set, use UTC. if (ini_get('date.timezone') == '') { date_default_timezone_set('UTC'); @@ -617,7 +632,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.35.2.63 $' . \n; + echo '$Revision: 1.226.2.37.2.35.2.64 $' . \n; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php
bjori Thu Apr 16 13:41:50 2009 UTC Modified files: (Branch: PHP_5_2) /php-srcrun-tests.php Log: MFH: make it possible to run on 5.2.7 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.59r2=1.226.2.37.2.60diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.59 php-src/run-tests.php:1.226.2.37.2.60 --- php-src/run-tests.php:1.226.2.37.2.59 Thu Mar 12 20:45:43 2009 +++ php-src/run-tests.php Thu Apr 16 13:41:50 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.59 2009/03/12 20:45:43 zoe Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.60 2009/04/16 13:41:50 bjori Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -59,11 +59,26 @@ exit; } -// __DIR__ is available from 5.3.0 +// Version constants only available as of 5.2.8 +if (!defined(PHP_VERSION_ID)) { + list($major, $minor, $bug) = explode(., phpversion(), 3); + $bug = (int)$bug; // Many distros make up their own versions + if ($bug 10) { + $bug = 0$bug; + } + + define(PHP_VERSION_ID, {$major}0{$minor}$bug); + define(PHP_MAJOR_VERSION, $major); +} + +// __DIR__ and FILE_BINARY is available from 5.3.0 if (PHP_VERSION_ID 50300) { define('__DIR__', realpath(dirname(__FILE__))); + define('FILE_BINARY', 0); } + + // If timezone is not set, use UTC. if (ini_get('date.timezone') == '') { date_default_timezone_set('UTC'); @@ -617,7 +632,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.59 $' . \n; + echo '$Revision: 1.226.2.37.2.60 $' . \n; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php
bjori Thu Apr 16 13:43:28 2009 UTC Modified files: (Branch: PHP_5_2) /php-srcrun-tests.php Log: MFH: sync WS http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.60r2=1.226.2.37.2.61diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.60 php-src/run-tests.php:1.226.2.37.2.61 --- php-src/run-tests.php:1.226.2.37.2.60 Thu Apr 16 13:41:50 2009 +++ php-src/run-tests.php Thu Apr 16 13:43:28 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.60 2009/04/16 13:41:50 bjori Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.61 2009/04/16 13:43:28 bjori Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -632,7 +632,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.60 $' . \n; + echo '$Revision: 1.226.2.37.2.61 $' . \n; exit(1); default: @@ -1753,7 +1753,7 @@ $wanted_re = preg_replace('/\r\n/', \n, $wanted); if (isset($section_text['EXPECTF'])) { - + // do preg_quote, but miss out any %r delimited sections $temp = ; $r = %r; @@ -1773,7 +1773,7 @@ $start = $end = $length; } // quote a non re portion of the string - $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); + $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); // add the re unquoted. $temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')'; $startOffset = $end + 2; @@ -1828,14 +1828,14 @@ $php = $old_php; } -if (!$leaked !$failed_headers) { -if (isset($section_text['XFAIL'] )) { -$warn = true; -$info = (warn: XFAIL section but test passes); -}else { -show_result(PASS, $tested, $tested_file, '', $temp_filenames); -return 'PASSED'; -} + if (!$leaked !$failed_headers) { + if (isset($section_text['XFAIL'] )) { + $warn = true; + $info = (warn: XFAIL section but test passes); + }else { + show_result(PASS, $tested, $tested_file, '', $temp_filenames); + return 'PASSED'; + } } } @@ -1857,14 +1857,14 @@ $php = $old_php; } -if (!$leaked !$failed_headers) { -if (isset($section_text['XFAIL'] )) { -$warn = true; -$info = (warn: XFAIL section but test passes); -}else { -show_result(PASS, $tested, $tested_file, '', $temp_filenames); -return 'PASSED'; -} + if (!$leaked !$failed_headers) { + if (isset($section_text['XFAIL'] )) { + $warn = true; + $info = (warn: XFAIL section but test passes); + }else { + show_result(PASS, $tested, $tested_file, '', $temp_filenames); + return 'PASSED'; + } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/curl interface.c
pajoye Thu Apr 16 14:26:09 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/curl interface.c Log: - fix zts build http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.45r2=1.62.2.14.2.46diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.45 php-src/ext/curl/interface.c:1.62.2.14.2.46 --- php-src/ext/curl/interface.c:1.62.2.14.2.45 Thu Apr 16 13:51:55 2009 +++ php-src/ext/curl/interface.cThu Apr 16 14:26:09 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.45 2009/04/16 13:51:55 pajoye Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.46 2009/04/16 14:26:09 pajoye Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -168,6 +168,7 @@ #if LIBCURL_VERSION_NUM 0x071100 char *copystr = NULL; #endif + TSRMLS_FETCH(); /* Disable file:// if open_basedir or safe_mode are used */ if ((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) { @@ -1171,7 +1172,7 @@ if (argc 0) { if (!php_curl_option_url(ch, Z_STRVAL_PP(url), Z_STRLEN_PP(url))) { - _php_curl_close_ex(ch); + _php_curl_close_ex(ch TSRMLS_CC); RETURN_FALSE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard mail.c
The initial type change does the trick for the formula itself. And yes, the code relies on an integer being 64bit Ilia Alshanetsky On 15-Apr-09, at 2:05 PM, Matt Wilmas wrote: Hi Ilia, - Original Message - From: Ilia Alshanetsky Sent: Wednesday, April 15, 2009 iliaa Wed Apr 15 14:24:38 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard mail.c Log: Fixed bug #47969 (ezmlm_hash() returns different values depend on OS) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/mail.c?r1=1.87.2.1.2.7.2.9r2=1.87.2.1.2.7.2.10diff_format=u [...] @@ -76,7 +76,7 @@ PHP_FUNCTION(ezmlm_hash) { char *str = NULL; - unsigned long h = 5381L; + unsigned int h = 5381; You're relying on int being 32-bit? Couldn't it be 64-bit as well? http://en.wikipedia.org/wiki/64-bit#64-bit_data_models BTW, (unsigned long) cast is still used in the loop, although I guess it's not affecting that expression... And the cast in RETURN_LONG((int) h); isn't needed, but that was true before. Just noticed while checking if I was missing something else. :-) - Matt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_firebird firebird_driver.c
iliaa Thu Apr 16 22:14:28 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdo_firebird firebird_driver.c Log: Fixed compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/firebird_driver.c?r1=1.17.2.2.2.4.2.6r2=1.17.2.2.2.4.2.7diff_format=u Index: php-src/ext/pdo_firebird/firebird_driver.c diff -u php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.4.2.6 php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.4.2.7 --- php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.4.2.6 Sun Feb 15 21:51:00 2009 +++ php-src/ext/pdo_firebird/firebird_driver.c Thu Apr 16 22:14:28 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: firebird_driver.c,v 1.17.2.2.2.4.2.6 2009/02/15 21:51:00 felipe Exp $ */ +/* $Id: firebird_driver.c,v 1.17.2.2.2.4.2.7 2009/04/16 22:14:28 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -25,6 +25,9 @@ #define _GNU_SOURCE #include php.h +#ifdef ZEND_ENGINE_2 +# include zend_exceptions.h +#else #include php_ini.h #include ext/standard/info.h #include pdo/php_pdo.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_firebird firebird_driver.c
iliaa Thu Apr 16 22:14:44 2009 UTC Modified files: /php-src/ext/pdo_firebird firebird_driver.c Log: MFB: Fixed compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/firebird_driver.c?r1=1.27r2=1.28diff_format=u Index: php-src/ext/pdo_firebird/firebird_driver.c diff -u php-src/ext/pdo_firebird/firebird_driver.c:1.27 php-src/ext/pdo_firebird/firebird_driver.c:1.28 --- php-src/ext/pdo_firebird/firebird_driver.c:1.27 Tue Mar 10 23:39:28 2009 +++ php-src/ext/pdo_firebird/firebird_driver.c Thu Apr 16 22:14:44 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: firebird_driver.c,v 1.27 2009/03/10 23:39:28 helly Exp $ */ +/* $Id: firebird_driver.c,v 1.28 2009/04/16 22:14:44 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -25,6 +25,9 @@ #define _GNU_SOURCE #include php.h +#ifdef ZEND_ENGINE_2 +# include zend_exceptions.h +#else #include php_ini.h #include ext/standard/info.h #include pdo/php_pdo.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo_firebird firebird_driver.c
iliaa Thu Apr 16 22:14:52 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo_firebird firebird_driver.c Log: MFB: Fixed compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/firebird_driver.c?r1=1.17.2.2.2.6r2=1.17.2.2.2.7diff_format=u Index: php-src/ext/pdo_firebird/firebird_driver.c diff -u php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.6 php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.7 --- php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.6 Wed Dec 31 11:17:41 2008 +++ php-src/ext/pdo_firebird/firebird_driver.c Thu Apr 16 22:14:52 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: firebird_driver.c,v 1.17.2.2.2.6 2008/12/31 11:17:41 sebastian Exp $ */ +/* $Id: firebird_driver.c,v 1.17.2.2.2.7 2009/04/16 22:14:52 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -25,6 +25,9 @@ #define _GNU_SOURCE #include php.h +#ifdef ZEND_ENGINE_2 +# include zend_exceptions.h +#else #include php_ini.h #include ext/standard/info.h #include pdo/php_pdo.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/curl interface.c
pajoye Thu Apr 16 13:51:55 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/curl interface.c Log: - improve file:// deactivation in curl_init and do not allow to enable it again manually http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.44r2=1.62.2.14.2.45diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.44 php-src/ext/curl/interface.c:1.62.2.14.2.45 --- php-src/ext/curl/interface.c:1.62.2.14.2.44 Thu Apr 16 09:47:33 2009 +++ php-src/ext/curl/interface.cThu Apr 16 13:51:55 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.44 2009/04/16 09:47:33 pajoye Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.45 2009/04/16 13:51:55 pajoye Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -147,6 +147,7 @@ #endif /* }}} */ +static void _php_curl_close_ex(php_curl *ch TSRMLS_DC); static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC); #define SAVE_CURL_ERROR(__handle, __err) (__handle)-err.no = (int) __err; @@ -1170,6 +1171,7 @@ if (argc 0) { if (!php_curl_option_url(ch, Z_STRVAL_PP(url), Z_STRLEN_PP(url))) { + _php_curl_close_ex(ch); RETURN_FALSE; } } @@ -1331,6 +1333,13 @@ case CURLOPT_PROTOCOLS: #endif convert_to_long_ex(zvalue); +#if LIBCURL_VERSION_NUM = 0x71304 + if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set); + RETVAL_FALSE; + return 1; + } +#endif error = curl_easy_setopt(ch-cp, option, Z_LVAL_PP(zvalue)); break; case CURLOPT_FOLLOWLOCATION: @@ -2011,10 +2020,8 @@ /* {{{ _php_curl_close() List destructor for curl handles */ -static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) +static void _php_curl_close_ex(php_curl *ch TSRMLS_DC) { - php_curl *ch = (php_curl *) rsrc-ptr; - #if PHP_CURL_DEBUG fprintf(stderr, DTOR CALLED, ch = %x\n, ch); #endif @@ -2053,6 +2060,15 @@ } /* }}} */ +/* {{{ _php_curl_close() + List destructor for curl handles */ +static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) +{ + php_curl *ch = (php_curl *) rsrc-ptr; + _php_curl_close_ex(ch TSRMLS_CC); +} +/* }}} */ + #endif /* HAVE_CURL */ /* -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php