[PHP-CVS] com php-src: Fix these SAPI hooks so that the TSRMLS parameters are correctly passed as required by the sapi struct: sapi/tux/php_tux.c
Commit:520d969feade9076bd93578992cee09c4e4a07ec Author:Kalle Sommer Nielsen Wed, 18 Dec 2013 09:01:44 +0100 Parents: 432e91f1121595e2dacd6f5ee6436b5f8c12dde6 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=520d969feade9076bd93578992cee09c4e4a07ec Log: Fix these SAPI hooks so that the TSRMLS parameters are correctly passed as required by the sapi struct # Not sure if this builds either Changed paths: M sapi/tux/php_tux.c Diff: diff --git a/sapi/tux/php_tux.c b/sapi/tux/php_tux.c index 968dd9e..1dbcf38 100644 --- a/sapi/tux/php_tux.c +++ b/sapi/tux/php_tux.c @@ -96,7 +96,7 @@ static int sapi_tux_ub_write(const char *str, uint str_length TSRMLS_DC) return n; } -static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers) +static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { char buf[1024]; struct iovec *vec; @@ -107,7 +107,6 @@ static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers) size_t len; char *status_line; int locate_cl; - TSRMLS_FETCH(); max_headers = 30; n = 1; @@ -158,11 +157,10 @@ static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers) return SAPI_HEADER_SENT_SUCCESSFULLY; } -static int sapi_tux_read_post(char *buffer, uint count_bytes) +static int sapi_tux_read_post(char *buffer, uint count_bytes TSRMLS_DC) { #if 0 int amount = 0; - TSRMLS_FETCH(); TG(req)->objectlen = count_bytes; TG(req)->object_addr = buffer; @@ -177,10 +175,8 @@ static int sapi_tux_read_post(char *buffer, uint count_bytes) #endif } -static char *sapi_tux_read_cookies(void) +static char *sapi_tux_read_cookies(TSRMLS_D) { - TSRMLS_FETCH(); - return TG(req)->cookies; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Pass the TSRMLS parameters to the sapi flush hook, this shaves off a few TSRMLS_FETCH() calls in our various SAPIs: main/SAPI.c main/SAPI.h sapi/apache/mod_php5.c sapi/apache2fi
Commit:ed5a8d510f6e4ae865008fe711efbbc5452adf42 Author:Kalle Sommer Nielsen Wed, 18 Dec 2013 09:06:39 +0100 Parents: f70f89c1b1e0bbd2b2b6940bb0a4e12a2be07770 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ed5a8d510f6e4ae865008fe711efbbc5452adf42 Log: Pass the TSRMLS parameters to the sapi flush hook, this shaves off a few TSRMLS_FETCH() calls in our various SAPIs Changed paths: M main/SAPI.c M main/SAPI.h M sapi/apache/mod_php5.c M sapi/apache2filter/sapi_apache2.c M sapi/apache2handler/sapi_apache2.c M sapi/apache_hooks/mod_php5.c M sapi/cgi/cgi_main.c M sapi/cli/php_cli.c M sapi/cli/php_cli_server.c M sapi/embed/php_embed.c M sapi/fpm/fpm/fpm_main.c M sapi/litespeed/lsapi_main.c M sapi/milter/php_milter.c M sapi/nsapi/nsapi.c Diff: diff --git a/main/SAPI.c b/main/SAPI.c index c9ba5d5..4cdb6f9 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -992,7 +992,7 @@ SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, ch SAPI_API int sapi_flush(TSRMLS_D) { if (sapi_module.flush) { - sapi_module.flush(SG(server_context)); + sapi_module.flush(SG(server_context) TSRMLS_CC); return SUCCESS; } else { return FAILURE; diff --git a/main/SAPI.h b/main/SAPI.h index 928fca9..3097cf1 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -227,7 +227,7 @@ struct _sapi_module_struct { int (*deactivate)(TSRMLS_D); int (*ub_write)(const char *str, unsigned int str_length TSRMLS_DC); - void (*flush)(void *server_context); + void (*flush)(void *server_context TSRMLS_DC); struct stat *(*get_stat)(TSRMLS_D); char *(*getenv)(char *name, size_t name_len TSRMLS_DC); diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c index 8361f7f..2803903 100644 --- a/sapi/apache/mod_php5.c +++ b/sapi/apache/mod_php5.c @@ -108,7 +108,7 @@ static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{ sapi_apache_flush */ -static void sapi_apache_flush(void *server_context) +static void sapi_apache_flush(void *server_context TSRMLS_DC) { if (server_context) { #if MODULE_MAGIC_NUMBER > 19970110 diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 8ce490e..c992c1c 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -245,14 +245,13 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC) } static void -php_apache_sapi_flush(void *server_context) +php_apache_sapi_flush(void *server_context TSRMLS_DC) { php_struct *ctx; apr_bucket_brigade *bb; apr_bucket_alloc_t *ba; apr_bucket *b; ap_filter_t *f; /* output filters */ - TSRMLS_FETCH(); ctx = server_context; diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index b7f95e0..cf1a83f 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -287,11 +287,10 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC) } static void -php_apache_sapi_flush(void *server_context) +php_apache_sapi_flush(void *server_context TSRMLS_DC) { php_struct *ctx; request_rec *r; - TSRMLS_FETCH(); ctx = server_context; diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c index 66adb48..4827932 100644 --- a/sapi/apache_hooks/mod_php5.c +++ b/sapi/apache_hooks/mod_php5.c @@ -253,7 +253,7 @@ static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{ sapi_apache_flush */ -static void sapi_apache_flush(void *server_context) +static void sapi_apache_flush(void *server_context TSRMLS_DC) { if (server_context) { #if MODULE_MAGIC_NUMBER > 19970110 diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 66ecce6..6fc5a86 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -324,14 +324,14 @@ static int sapi_fcgi_ub_write(const char *str, uint str_length TSRMLS_DC) return str_length; } -static void sapi_cgi_flush(void *server_context) +static void sapi_cgi_flush(void *server_context TSRMLS_DC) { if (fflush(stdout) == EOF) { php_handle_aborted_connection(); } } -static void sapi_fcgi_flush(void *server_context) +static void sapi_fcgi_flush(void *server_context TSRMLS_DC) { fcgi_request *request = (fcgi_request*) server_context; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 2fd3dbe..cb52cd7 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -320,7 +320,7 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{ } /* }}} */ -static void sapi_cli_flush(void *server_context) /* {{{ */ +static void sapi_cli_flush(void *server_context TSRMLS_DC) /* {{{ */ { /* Ignore EBADF here, it's caused by th
[PHP-CVS] com php-src: Kill another TSRMLS_FETCH() in zend_indent(): Zend/zend_indent.c Zend/zend_indent.h main/main.c sapi/cgi/cgi_main.c sapi/cli/php_cli.c sapi/pi3web/pi3web_sapi.c
Commit:1433dec2d0c00fcda5bebaeebefca8264deb912a Author:Kalle Sommer Nielsen Thu, 12 Dec 2013 22:09:38 +0100 Parents: 0fc8e6af0a0ff8eeb15746978ce1e6009ed76f11 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1433dec2d0c00fcda5bebaeebefca8264deb912a Log: Kill another TSRMLS_FETCH() in zend_indent() Changed paths: M Zend/zend_indent.c M Zend/zend_indent.h M main/main.c M sapi/cgi/cgi_main.c M sapi/cli/php_cli.c M sapi/pi3web/pi3web_sapi.c Diff: diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c index fea78d9..42e4321 100644 --- a/Zend/zend_indent.c +++ b/Zend/zend_indent.c @@ -47,7 +47,7 @@ static void handle_whitespace(int *emit_whitespace) } -ZEND_API void zend_indent() +ZEND_API void zend_indent(TSRMLS_D) { zval token; int token_type; @@ -55,7 +55,6 @@ ZEND_API void zend_indent() int nest_level=0; int emit_whitespace[256]; int i; - TSRMLS_FETCH(); memset(emit_whitespace, 0, sizeof(int)*256); diff --git a/Zend/zend_indent.h b/Zend/zend_indent.h index bba02a7..f38e87e 100644 --- a/Zend/zend_indent.h +++ b/Zend/zend_indent.h @@ -23,7 +23,7 @@ #define ZEND_INDENT_H BEGIN_EXTERN_C() -ZEND_API void zend_indent(void); +ZEND_API void zend_indent(TSRMLS_D); END_EXTERN_C() #endif /* ZEND_INDENT_H */ diff --git a/main/main.c b/main/main.c index 6f7e149..05b34b7 100644 --- a/main/main.c +++ b/main/main.c @@ -2643,9 +2643,9 @@ PHPAPI int php_lint_script(zend_file_handle *file TSRMLS_DC) #ifdef PHP_WIN32 /* {{{ dummy_indent just so that this symbol gets exported... */ -PHPAPI void dummy_indent(void) +PHPAPI void dummy_indent(TSRMLS_D) { - zend_indent(); + zend_indent(TSRMLS_C); } /* }}} */ #endif diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index c367294..ea75ee8 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -2493,7 +2493,7 @@ consult the installation file that came with this distribution, or visit \n\ /* Zeev might want to do something with this one day */ case PHP_MODE_INDENT: open_file_for_scanning(&file_handle TSRMLS_CC); - zend_indent(); + zend_indent(TSRMLS_C); zend_file_handle_dtor(&file_handle TSRMLS_CC); php_output_teardown(); return SUCCESS; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 9f3fc4b..eec117a 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1024,7 +1024,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */ /* Zeev might want to do something with this one day */ case PHP_MODE_INDENT: open_file_for_scanning(&file_handle TSRMLS_CC); - zend_indent(); + zend_indent(TSRMLS_C); zend_file_handle_dtor(file_handle.handle TSRMLS_CC); goto out; break; diff --git a/sapi/pi3web/pi3web_sapi.c b/sapi/pi3web/pi3web_sapi.c index 64eb2a6..b9076f1 100644 --- a/sapi/pi3web/pi3web_sapi.c +++ b/sapi/pi3web/pi3web_sapi.c @@ -385,7 +385,7 @@ MODULE_API DWORD PHP5_wrapper(LPCONTROL_BLOCK lpCB) } if ( open_file_for_scanning( &file_handle TSRMLS_CC ) == SUCCESS ) { - zend_indent(); + zend_indent(TSRMLS_C); } else { -- 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/mysqlnd/mysqlnd.c
Commit:cabf38af6d1013b6ea6d0c8539fc8f632da04870 Author:Kalle Sommer Nielsen Mon, 5 Aug 2013 17:23:00 +0200 Parents: f718684a6c1d6221015031d1e72d3eb55ecbb659 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cabf38af6d1013b6ea6d0c8539fc8f632da04870 Log: Merge branch 'PHP-5.4' Changed paths: M ext/mysqlnd/mysqlnd.c Diff: diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 8ed810d..843e52d 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -1142,6 +1142,7 @@ MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array TSRMLS static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, php_socket_t * max_fd TSRMLS_DC) { php_socket_t this_fd; + php_stream *stream = NULL; int cnt = 0; MYSQLND **p = conn_array; @@ -1151,7 +1152,8 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p * when casting. It is only used here so that the buffered data warning * is not displayed. * */ - if (SUCCESS == php_stream_cast((*p)->data->net->stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, + stream = (*p)->data->net->stream; + if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) && this_fd >= 0) { PHP_SAFE_FD_SET(this_fd, fds); @@ -1169,6 +1171,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds TSRMLS_DC) { php_socket_t this_fd; + php_stream *stream = NULL; int ret = 0; zend_bool disproportion = FALSE; @@ -1176,7 +1179,8 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds MYSQLND **fwd = conn_array, **bckwd = conn_array; while (*fwd) { - if (SUCCESS == php_stream_cast((*fwd)->data->net->stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, + stream = (*fwd)->data->net->stream; + if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) && this_fd >= 0) { if (PHP_SAFE_FD_ISSET(this_fd, fds)) { if (disproportion) { -- 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/mysqlnd/mysqlnd.c
Commit:963c1be38db3fd4b31303ae28e72933c5873103f Author:Kalle Sommer Nielsen Mon, 5 Aug 2013 17:16:05 +0200 Parents: cb8d1fc7f913085117da109f89a1e5a6cb535c09 Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=963c1be38db3fd4b31303ae28e72933c5873103f Log: Merge branch 'PHP-5.5' Changed paths: M ext/mysqlnd/mysqlnd.c Diff: diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 1a89869..0a856f1 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -1261,6 +1261,7 @@ MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array TSRMLS static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, php_socket_t * max_fd TSRMLS_DC) { php_socket_t this_fd; + php_stream *stream = NULL; int cnt = 0; MYSQLND **p = conn_array; @@ -1270,7 +1271,8 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p * when casting. It is only used here so that the buffered data warning * is not displayed. * */ - if (SUCCESS == php_stream_cast((*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC), PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, + stream = (*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC); + if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) && this_fd >= 0) { PHP_SAFE_FD_SET(this_fd, fds); @@ -1288,6 +1290,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds TSRMLS_DC) { php_socket_t this_fd; + php_stream *stream = NULL; int ret = 0; zend_bool disproportion = FALSE; @@ -1295,7 +1298,8 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds MYSQLND **fwd = conn_array, **bckwd = conn_array; while (*fwd) { - if (SUCCESS == php_stream_cast((*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC), PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, + stream = (*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC); + if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) && this_fd >= 0) { if (PHP_SAFE_FD_ISSET(this_fd, fds)) { if (disproportion) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Check for NULL ptr from get_stream() before passing it on to php_stream_cast(): ext/mysqlnd/mysqlnd.c
Commit:85b7e9f046acacb323e2cb53eb792785b69a37bb Author:Kalle Sommer Nielsen Mon, 5 Aug 2013 16:58:37 +0200 Parents: 8f74384947d81c92250dc55fe78cf5d612b18e70 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=85b7e9f046acacb323e2cb53eb792785b69a37bb Log: Check for NULL ptr from get_stream() before passing it on to php_stream_cast() Changed paths: M ext/mysqlnd/mysqlnd.c Diff: diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 1a89869..0a856f1 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -1261,6 +1261,7 @@ MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array TSRMLS static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, php_socket_t * max_fd TSRMLS_DC) { php_socket_t this_fd; + php_stream *stream = NULL; int cnt = 0; MYSQLND **p = conn_array; @@ -1270,7 +1271,8 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p * when casting. It is only used here so that the buffered data warning * is not displayed. * */ - if (SUCCESS == php_stream_cast((*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC), PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, + stream = (*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC); + if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) && this_fd >= 0) { PHP_SAFE_FD_SET(this_fd, fds); @@ -1288,6 +1290,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds TSRMLS_DC) { php_socket_t this_fd; + php_stream *stream = NULL; int ret = 0; zend_bool disproportion = FALSE; @@ -1295,7 +1298,8 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds MYSQLND **fwd = conn_array, **bckwd = conn_array; while (*fwd) { - if (SUCCESS == php_stream_cast((*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC), PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, + stream = (*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC); + if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) && this_fd >= 0) { if (PHP_SAFE_FD_ISSET(this_fd, fds)) { if (disproportion) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server): NEWS ext/pdo/pdo_dbh.c ext/pdo_mysql/tests/bug63176.phpt
Hi Laruence 2013/6/16 Xinchen Hui : > + if ($h) { > + $this->db = new PDO2(PDO_MYSQL_TEST_DSN, > PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => > true)); > + } else { > + $this->db = new PDO2(PDO_MYSQL_TEST_DSN, > PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => > true)); > + } Shouldn't this be PDO3, in the else, or did I miss something? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Address feature request #38917 for native SPKAC (HTML5 keygen element) support: ext/openssl/openssl.c ext/openssl/php_openssl.h ext/openssl/tests/openssl_spki_export.phpt ex
Hi Jason 2013/5/7 Jason Gerfen : > Commit:8f56ac8401ed1c3e00b8fba3fb8e5efb565180c4 > Author:jas- Mon, 6 May 2013 16:36:06 > -0600 > Parents: da07e91c3a7e7bac2e380f24c59f70c1bcb3e7e4 > Branches: master > > Link: > http://git.php.net/?p=php-src.git;a=commitdiff;h=8f56ac8401ed1c3e00b8fba3fb8e5efb565180c4 > > Log: > Address feature request #38917 for native SPKAC (HTML5 keygen element) support > > Bugs: > https://bugs.php.net/38917 + ASN1_STRING_set(spki->spkac->challenge, challenge, (int)strlen(challenge)); Since we don't modify challenge here, wouldn't be smarter to use challenge_len we already get from zend_parse_parameters() or did I miss something? =P -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Test commit (simple WS change): ext/gd/config.w32
Commit:ee149cdd2b222b0cb42d5df32e4b7b544690946e Author:Kalle Sommer Nielsen Wed, 30 Jan 2013 16:16:43 +0100 Parents: c16d8c521e0d56395731a3d1b0b214c20f96be2f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee149cdd2b222b0cb42d5df32e4b7b544690946e Log: Test commit (simple WS change) Changed paths: M ext/gd/config.w32 Diff: diff --git a/ext/gd/config.w32 b/ext/gd/config.w32 index 22584dd..3619e1c 100644 --- a/ext/gd/config.w32 +++ b/ext/gd/config.w32 @@ -77,7 +77,7 @@ if (PHP_GD != "no") { "); PHP_INSTALL_HEADERS("", "ext/gd ext/gd/libgd" ); - } else { + } else { WARNING("gd not enabled; libraries and headers not found"); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Fixed bug #60723 (error_log error time has changed to UTC ignoring default timezo): ext/standard/tests/general_functions/bug60723.phpt main/main.c
Hola Laurence 2012/9/24 Xinchen Hui : > Log: > Fixed bug #60723 (error_log error time has changed to UTC ignoring default > timezo) ... > +--TEST-- > +Bug #55371 (get_magic_quotes_gpc() and get_magic_quotes_runtime() throw > deprecated warning) Test name seems to need an update ;-) -- regards, Kalle Sommer Nielsen ka...@php.net -- 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 branches/PHP_5_4/Zend/zend_builtin_functions.c branches/PHP_5_4/ext/com_dotnet/com_typeinfo.c branches/PHP_5_4/ext/oci8/oci8.c branches/PHP_5_4/e
Hi Stas 2011/11/18 Stanislav Malyshev : > Modified: php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c > === > --- php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c 2011-11-18 > 07:07:42 UTC (rev 319441) > +++ php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c 2011-11-18 > 07:11:19 UTC (rev 319442) > @@ -706,6 +706,9 @@ > } > c.flags = case_sensitive; /* non persistent */ > c.name = IS_INTERNED(name) ? name : zend_strndup(name, name_len); > + if(name == NULL) { > + RETURN_FALSE; > + } This looks wrong, as c.name have the return value of zend_strndup(), not name. -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/intl/collator/collator_compare.c branches/PHP_5_3/ext/intl/collator/collator_locale.c branches/PHP_5_3/ext/intl/collator/collator_sort.c branches/
Hi 2011/11/2 Florian Anderiasch : > fa Wed, 02 Nov 2011 07:36:52 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=318672 > > Log: > Fix #60192 SegFault when Collator not constructed properly E_ERROR? Isn't that harsh enough, should be E_RECOVERABLE_ERROR if any fatal error since we leave the Engine in a non fatal state -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/NEWS branches/PHP_5_4/NEWS trunk/NEWS
Hi 2011/9/17 Xinchen Hui : > laruence Sat, 17 Sep 2011 03:23:38 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=316897 > > Log: > Update NEWS > > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > U php/php-src/branches/PHP_5_4/NEWS > U php/php-src/trunk/NEWS > > Modified: php/php-src/branches/PHP_5_3/NEWS > === > --- php/php-src/branches/PHP_5_3/NEWS 2011-09-17 03:14:31 UTC (rev 316896) > +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-17 03:23:38 UTC (rev 316897) > @@ -38,6 +38,8 @@ > - MySQLi extension: > . Fixed bug #55582 (mysqli_num_rows() returns always 0 for unbuffered, when > mysqlnd is used). (Andrey) > + . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields). > + (eran at zend dot com, Laruence) > > - mysqlnd > . Fixed bug #55609 (mysqlnd cannot be built shared). (Johannes) > > Modified: php/php-src/branches/PHP_5_4/NEWS > === > --- php/php-src/branches/PHP_5_4/NEWS 2011-09-17 03:14:31 UTC (rev 316896) > +++ php/php-src/branches/PHP_5_4/NEWS 2011-09-17 03:23:38 UTC (rev 316897) > @@ -4,7 +4,13 @@ > - Core: > . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux > parisc). (Felipe) > + . Fixed bug #55705 (Omitting a callable typehinted argument causes a > segfault). > + (Felipe, Laruence) > > +- MySQLi extension: > + . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields). > + (eran at zend dot com, Laruence) > + > 15 Sep 2011, PHP 5.4.0 Beta > - General improvements: > . Added callable typehint. (Hannes) Only the 5.3 NEWS should have been updated here. -- regards, Kalle Sommer Nielsen ka...@php.net -- 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/ext/fileinfo/libmagic/print.c branches/PHP_5_4/main/snprintf.c trunk/ext/fileinfo/libmagic/print.c trunk/main/snprintf.c
Hi Laruence 2011/9/15 Xinchen Hui : > laruence Thu, 15 Sep 2011 07:09:43 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=316807 > > Log: > Fix warning "implicit declaration of function `vasprintf'" > If There is a better fix, plz fixme. > > Changed paths: > U php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/print.c > U php/php-src/branches/PHP_5_4/main/snprintf.c > U php/php-src/trunk/ext/fileinfo/libmagic/print.c > U php/php-src/trunk/main/snprintf.c Remember to sync the .patch file seeing as you altered the files in libmagic/ for when the library is updated :) -- regards, Kalle Sommer Nielsen ka...@php.net -- 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 branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi
Hi Arpad 2011/9/14 Arpad Ray : > arpad Tue, 13 Sep 2011 22:28:15 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=316688 > > Log: > Implement object-oriented session handlers > (https://wiki.php.net/rfc/session-oo) Just by skimming over the patch, then all of those is most likely to fail on Windows because you include the forward slash in the path for error messages, whereas on Windows its a backslash. So you want to use: %s.php instead -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/main/ php_globals.h
kalleTue, 13 Sep 2011 14:35:28 + Revision: http://svn.php.net/viewvc?view=revision&revision=316639 Log: MFT: Fix build on Windows Changed paths: U php/php-src/branches/PHP_5_4/main/php_globals.h Modified: php/php-src/branches/PHP_5_4/main/php_globals.h === --- php/php-src/branches/PHP_5_4/main/php_globals.h 2011-09-13 14:35:12 UTC (rev 316638) +++ php/php-src/branches/PHP_5_4/main/php_globals.h 2011-09-13 14:35:28 UTC (rev 316639) @@ -156,6 +156,10 @@ char *mail_log; zend_bool in_error_log; + +#ifdef PHP_WIN32 + zend_bool windows_show_crt_warning; +#endif }; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/main/ php_globals.h
kalleTue, 13 Sep 2011 14:35:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=316638 Log: Fix build on Windows Changed paths: U php/php-src/trunk/main/php_globals.h Modified: php/php-src/trunk/main/php_globals.h === --- php/php-src/trunk/main/php_globals.h2011-09-13 14:34:28 UTC (rev 316637) +++ php/php-src/trunk/main/php_globals.h2011-09-13 14:35:12 UTC (rev 316638) @@ -156,6 +156,10 @@ char *mail_log; zend_bool in_error_log; + +#ifdef PHP_WIN32 + zend_bool windows_show_crt_warning; +#endif }; -- 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_3/ext/mysqli/tests/mysqli_poll_kill.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_poll_kill.phpt trunk/ext/mysqli/tests/mysqli_poll_kill.phpt
Hi Ulf 2011/9/12 Ulf Wendel : > array(1) { > [%u|b%"processed beofre killed"]=> > Is this correct? Shouldn't it be named: "processed before killed"? -- regards, Kalle Sommer Nielsen ka...@php.net -- 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/ext/standard/filestat.c trunk/ext/standard/filestat.c
Hi Stas 2011/9/6 Stanislav Malyshev : > stas Tue, 06 Sep 2011 05:31:08 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=316208 We generally use PHP_WIN32 to check for Windows, but thats just a cosmetic :) -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/sysvshm/tests/001.phpt branches/PHP_5_4/ext/sysvshm/tests/001.phpt trunk/ext/sysvshm/tests/001.phpt
Hi 2011/9/6 Hannes Magnusson : > Can you post the diff? > I don't see any reason why it should fail.. Windows for one does not implement a native ftok() function, and the general use with ftok() was together with sysvshm(). If we have such an implementation, it would make sense to enable sysvshm on Windows too. But back to subject, I agree that we should move both the function and tests if there is no other valuable uses for ftok() outside of that extension. -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/iconv/tests/iconv_stream_filter.phpt branches/PHP_5_4/ext/iconv/tests/iconv_stream_filter.phpt trunk/ext/iconv/tests/iconv_stream_filter.phpt
Hi > We generally don't document random warnings/notices, especially not > when originating from 3rd party libs.. kk, just wondering but I guess if it becomes a must then either a bug or user comment will appear regarding this. -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/iconv/tests/iconv_stream_filter.phpt branches/PHP_5_4/ext/iconv/tests/iconv_stream_filter.phpt trunk/ext/iconv/tests/iconv_stream_filter.phpt
Hi Hannes 2011/9/5 Hannes Magnusson : > bjori Mon, 05 Sep 2011 11:07:38 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=316158 > > Log: > Fix the test in 5.4 and trunk. > older libraries will emmit error here, while new won't. So lets just suppress > it rather then making the test uselessly fail for random people. Just for the record here, is this behaviour documented anywhere? -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/standard/tests/streams/bug46024.phpt branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt trunk/ext/standard/tests/streams/bug46024.phpt
Hi Afair realpath() is not always available, so maybe a function_exist() check here? Sendt fra min iPhone Den 02/09/2011 kl. 22.28 skrev Ferenc Kovacs : > tyrael Fri, 02 Sep 2011 20:28:39 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=316056 > > Log: > pass an absolute path for the php binary to proc_open, without this the test > would fail if ran with a relative TEST_DEV_EXECUTABLE > > Changed paths: >U php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt >U php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt >U php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt > > Modified: > php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt > === > --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt > 2011-09-02 20:02:12 UTC (rev 316055) > +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt > 2011-09-02 20:28:39 UTC (rev 316056) > @@ -4,7 +4,7 @@ > defined"); ?> > --FILE-- > -$php = getenv('TEST_PHP_EXECUTABLE'); > +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); > $pipes = array(); > $proc = proc_open( >"$php -n -i" > > Modified: > php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt > === > --- php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt > 2011-09-02 20:02:12 UTC (rev 316055) > +++ php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt > 2011-09-02 20:28:39 UTC (rev 316056) > @@ -4,7 +4,7 @@ > defined"); ?> > --FILE-- > -$php = getenv('TEST_PHP_EXECUTABLE'); > +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); > $pipes = array(); > $proc = proc_open( >"$php -n -i" > > Modified: php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt > === > --- php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt2011-09-02 > 20:02:12 UTC (rev 316055) > +++ php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt2011-09-02 > 20:28:39 UTC (rev 316056) > @@ -4,7 +4,7 @@ > defined"); ?> > --FILE-- > -$php = getenv('TEST_PHP_EXECUTABLE'); > +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); > $pipes = array(); > $proc = proc_open( >"$php -n -i" > > -- > 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_3/NEWS PHP_5_4/NEWS
Hi 2011/8/30 Arpad Ray : > arpad Tue, 30 Aug 2011 14:01:35 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=315784 > > Log: > fix news entries > > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > U php/php-src/branches/PHP_5_4/NEWS > > Modified: php/php-src/branches/PHP_5_3/NEWS > === > --- php/php-src/branches/PHP_5_3/NEWS 2011-08-30 14:01:03 UTC (rev 315783) > +++ php/php-src/branches/PHP_5_3/NEWS 2011-08-30 14:01:35 UTC (rev 315784) > @@ -5,7 +5,8 @@ > - Core: > . Fixed bug #52461 (Incomplete doctype and missing xmlns). > (virsacer at web dot de, Pierre) > - . Fixed bug #55366: keys lost when using substr_replace an array (arpad) > + . Fixed bug #55366: keys lost when using substr_replace an array (Arpad) > + . Fixed bug #55510: $_FILES 'name' missing first character after upload > (Arpad) Please list newest bugs first (descending) and use the "Fixed bug #no (desc) (who)" syntax like the others :) -- regards, Kalle Sommer Nielsen ka...@php.net -- 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 branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/NEWS trunk/sapi/cli/php_cli_server.c
Hi 2011/8/22 Xinchen Hui : > laruence Mon, 22 Aug 2011 11:55:41 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=315278 > > Log: > Fixed #55463 (cli-server missing _SERVER[REMOTE_ADDR]) We might as well add SERVER_ADDR (+ SERVER_SOFTWARE) if not available too -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/fileinfo/libmagic/softmagic.c branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c trunk/ext/fileinfo/libmagic/softmagic.c
Hi Xinchen 2011/8/8 Laruence : > Hi all: > > trunk/ext/fileinfo/libmagic/softmagic.c seems to be a third-party > source, I was wondering can I directly modify it? > > it can't be compiled with -Wall -Werror, with a lots of warnings.. Yes you can alter the original source thats distributed in php-src, just remember to update the .patch file in the ext/fileinfo folder so that when the lib is updated, so is the fix and report upstream if needed. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/standard/basic_functions.c branches/PHP_5_4/ext/standard/head.c trunk/ext/standard/basic_functions.c trunk/ext/standard/head.c
kalleTue, 12 Jul 2011 03:56:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=313156 Log: Changed http_response_code() to be able to set a response code Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_4/ext/standard/head.c U php/php-src/trunk/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/head.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/branches/PHP_5_4/NEWS 2011-07-12 03:56:32 UTC (rev 313156) @@ -1,4 +1,4 @@ -PHPNEWS +PHP NEWS ||| ?? ??? 2011, PHP 5.4.0 Alpha 2 - General improvements: @@ -16,6 +16,7 @@ . Lowered default value for Process Manager. FR #54098. (fat) - Improved core functions: + . Changed http_response_code() to be able to set a response code. (Kalle) . Fixed crypt_blowfish handling of 8-bit characters. (Stas) (CVE-2011-2483) . Fixed bug#55084 (Function registered by header_register_callback is called only once per process). (Hannes) Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c === --- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2011-07-12 03:56:32 UTC (rev 313156) @@ -1481,7 +1481,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_http_response_code, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_http_response_code, 0, 0, 0) + ZEND_ARG_INFO(0, response_code) ZEND_END_ARG_INFO() /* }}} */ /* {{{ html.c */ Modified: php/php-src/branches/PHP_5_4/ext/standard/head.c === --- php/php-src/branches/PHP_5_4/ext/standard/head.c2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/branches/PHP_5_4/ext/standard/head.c2011-07-12 03:56:32 UTC (rev 313156) @@ -280,14 +280,30 @@ } /* }}} */ -/* {{{ proto long http_response_code() - Returns the current HTTP response code */ +/* {{{ proto long http_response_code([int response_code]) + Sets a response code, or returns the current HTTP response code */ PHP_FUNCTION(http_response_code) { - if (zend_parse_parameters_none() == FAILURE) { + long response_code = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &response_code) == FAILURE) { return; } + if (response_code) + { + long old_response_code; + + old_response_code = SG(sapi_headers).http_response_code; + SG(sapi_headers).http_response_code = response_code; + + if (old_response_code) { + RETURN_LONG(old_response_code); + } + + RETURN_TRUE; + } + if (!SG(sapi_headers).http_response_code) { RETURN_FALSE; } Modified: php/php-src/trunk/ext/standard/basic_functions.c === --- php/php-src/trunk/ext/standard/basic_functions.c2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/trunk/ext/standard/basic_functions.c2011-07-12 03:56:32 UTC (rev 313156) @@ -1483,7 +1483,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_http_response_code, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_http_response_code, 0, 0, 0) + ZEND_ARG_INFO(0, response_code) ZEND_END_ARG_INFO() /* }}} */ /* {{{ html.c */ Modified: php/php-src/trunk/ext/standard/head.c === --- php/php-src/trunk/ext/standard/head.c 2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/trunk/ext/standard/head.c 2011-07-12 03:56:32 UTC (rev 313156) @@ -280,14 +280,30 @@ } /* }}} */ -/* {{{ proto long http_response_code() - Returns the current HTTP response code */ +/* {{{ proto long http_response_code([int response_code]) + Sets a response code, or returns the current HTTP response code */ PHP_FUNCTION(http_response_code) { - if (zend_parse_parameters_none() == FAILURE) { + long response_code = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &response_code) == FAILURE) { return; } + if (response_code) + { + long old_response_code; + + old_response_code = SG(sapi_headers).http_response_code; + SG(sapi_headers).h
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/sapi/litespeed/ lsapilib.c
Hi 2011/6/8 George Wang : > gwang Wed, 08 Jun 2011 16:51:59 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=311935 > > Log: > fix socket address parsing code Merge to PHP_5_4 and trunk? -- regards, Kalle Sommer Nielsen ka...@php.net -- 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/ext/oci8/tests/null_byte_1.phpt trunk/ext/oci8/tests/null_byte_1.phpt
Hi Chris 2011/6/7 Christopher Jones : > -Warning: OCI-Lob::savefile(): Filename cannot contain null bytes in > %snull_byte_1.php on line %d > -bool(false) > +Warning: OCI-Lob::savefile() expects parameter 1 to be valid path, string > given in %snull_byte_1.php on line %d > +NULL Just a note here unrelated to this patch but the change; wouldn't we want the error message to say "to be A valid path" to be more grammatically correct? -- regards, Kalle Sommer Nielsen ka...@php.net -- 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/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt
Hi 2011/5/17 Andrew Curioso : > acurioso Tue, 17 May 2011 13:50:48 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=311138 > > Log: > Use iterator when necessary to get the full properties hash - consistent with > count (see test: ext/simplexml/tests/034.phpt) Shouldn't this be merged to PHP_5_4 aswell? -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/standard/tests/network/ gethostbynamel_error.phpt
2011/5/16 Ferenc Kovacs : > ok, thanks for the heads up. > should I revert and commit them again for all three branch, or merge them > for the other two? (5.4, trunk) Merging is way easier, as you already committed theres no point in reverting just to re-add it, more of a good practice for next time to do a sparse -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/standard/tests/network/ gethostbynamel_error.phpt
Hi 2011/5/16 Ferenc Kovacs : > oh, so you favor that over merging between the branches? > Tyrael Yeah, less spam on php.cvs :) -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/standard/tests/network/ gethostbynamel_error.phpt
Hi 2011/5/16 Ferenc Kovacs : > tyrael Mon, 16 May 2011 19:51:39 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=311106 > > Log: > fix the test with the removal of the unnecessary newline > > Changed paths: > U > php/php-src/branches/PHP_5_3/ext/standard/tests/network/gethostbynamel_error.phpt Please keep all the branches in sync (PHP_5_3, PHP_5_4 and trunk), you can use a sparse checkout and commit it all at once. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/main/ SAPI.c
kalleThu, 03 Feb 2011 23:57:59 + Revision: http://svn.php.net/viewvc?view=revision&revision=307986 Log: Fix ZTS build Changed paths: U php/php-src/trunk/main/SAPI.c Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2011-02-03 22:09:18 UTC (rev 307985) +++ php/php-src/trunk/main/SAPI.c 2011-02-03 23:57:59 UTC (rev 307986) @@ -145,7 +145,7 @@ } /* }}} */ -static void sapi_run_header_callback() +static void sapi_run_header_callback(TSRMLS_D) { int error; zend_fcall_info fci; @@ -831,7 +831,7 @@ if (SG(callback_func) && !SG(callback_run)) { SG(callback_run) = 1; - sapi_run_header_callback(); + sapi_run_header_callback(TSRMLS_C); } SG(headers_sent) = 1; -- 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/mysqlnd/ mysqlnd_auth.c
Hi Andrey 2011/1/31, Andrey Hristov : > On 01/31/2011 01:32 PM, Kalle Sommer Nielsen wrote: > this will return emalloc-ed memory, right? Later this memory will be > freed with free() and guess what happens :) No, the e functions will return emalloc()'d memory, the zend_str functions will return malloc()'d memory, see its implementation: http://lxr.php.net/opengrok/xref/PHP_TRUNK/Zend/zend_alloc.c#2566 -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysqlnd/config.w32 trunk/ext/mysqlnd/config.w32
kalleMon, 31 Jan 2011 12:47:28 + Revision: http://svn.php.net/viewvc?view=revision&revision=307880 Log: Fixed bug #53795 (Connect Error from MySqli (mysqlnd) when using SSL) Bug: http://bugs.php.net/53795 (Assigned) Connect Error from MySqli (mysqlnd) when using SSL Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysqlnd/config.w32 U php/php-src/trunk/ext/mysqlnd/config.w32 Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-01-31 12:44:39 UTC (rev 307879) +++ php/php-src/branches/PHP_5_3/NEWS 2011-01-31 12:47:28 UTC (rev 307880) @@ -73,6 +73,8 @@ - MySQL Improved extension: . Added 'db' and 'catalog' keys to the field fetching functions (FR #39847). (Kalle) + . Fixed bug #53795 (Connect Error from MySqli (mysqlnd) when using SSL). +(Kalle) . Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query). (Kalle, Andrey) . Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/config.w32 === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/config.w32 2011-01-31 12:44:39 UTC (rev 307879) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/config.w32 2011-01-31 12:47:28 UTC (rev 307880) @@ -24,6 +24,7 @@ (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "mysqlnd", PHP_MYSQLND)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) { AC_DEFINE("MYSQLND_COMPRESSION_ENABLED", 1, "Compression support"); + AC_DEFINE("MYSQLND_SSL_SUPPORTED", 1, "SSL support"); } PHP_INSTALL_HEADERS("", "ext/mysqlnd"); } Modified: php/php-src/trunk/ext/mysqlnd/config.w32 === --- php/php-src/trunk/ext/mysqlnd/config.w322011-01-31 12:44:39 UTC (rev 307879) +++ php/php-src/trunk/ext/mysqlnd/config.w322011-01-31 12:47:28 UTC (rev 307880) @@ -26,6 +26,7 @@ (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "mysqlnd", PHP_MYSQLND)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) { AC_DEFINE("MYSQLND_COMPRESSION_ENABLED", 1, "Compression support"); + AC_DEFINE("MYSQLND_SSL_SUPPORTED", 1, "SSL support"); } PHP_INSTALL_HEADERS("", "ext/mysqlnd"); } -- 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_2/NEWS PHP_5_2/ext/snmp/snmp.c PHP_5_3/NEWS PHP_5_3/ext/snmp/snmp.c
Hi Boris 2011/1/31 Boris Lytochkin : > lytboris Mon, 31 Jan 2011 11:34:12 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=307876 > > Log: > Fixed bug #51336 > > Bug: http://bugs.php.net/51336 (Open) snmprealwalk (snmp v1) does not handle > end of OID tree correctly > > Changed paths: > U php/php-src/branches/PHP_5_2/NEWS > U php/php-src/branches/PHP_5_2/ext/snmp/snmp.c The PHP_5_2 branch is dead, so please revert the changes in that branch and keep it to 5.3/trunk. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ mysqlnd_auth.c
kalleMon, 31 Jan 2011 12:32:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=307878 Log: Use our own zend_strndup() implementation of strndup() -- Fixes build on platforms without strndup(), like Windows Changed paths: U php/php-src/trunk/ext/mysqlnd/mysqlnd_auth.c Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_auth.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_auth.c2011-01-31 11:41:33 UTC (rev 307877) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_auth.c2011-01-31 12:32:32 UTC (rev 307878) @@ -428,7 +428,7 @@ /* copy pass*/ if (passwd && passwd_len) { - ret = (zend_uchar*) strndup(passwd, passwd_len); + ret = (zend_uchar*) zend_strndup(passwd, passwd_len); } *auth_data_len = passwd_len; -- 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_3/ext/mysqli/tests/047.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b
Hi Ulf 2011/1/17 Ulf Wendel : > uw Mon, 17 Jan 2011 13:06:44 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=307535 > > Log: > Fix tests: don't expect people to use a certain db/schema for testing Thanks for the quick fix :) -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS ext/mysqli/mysqli_api.c ext/mysqli/tests/047.phpt ext/mysqli/tests/mysqli_fetch_field.phpt ext/mysqli/tests/mysqli_fetch_field_direct.phpt ext/mysqli
kalleMon, 17 Jan 2011 11:20:54 + Revision: http://svn.php.net/viewvc?view=revision&revision=307533 Log: MFT: Added 'db' and 'catalog' keys to the field fetching functions (FR #39847) Bug: http://bugs.php.net/39847 (Assigned) mysqli_fetch_[field|fields|field_direct] need to return db Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c U php/php-src/branches/PHP_5_3/ext/mysqli/tests/047.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_direct.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_oo.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_fields.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_field_seek.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_field_tell.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-01-17 10:43:53 UTC (rev 307532) +++ php/php-src/branches/PHP_5_3/NEWS 2011-01-17 11:20:54 UTC (rev 307533) @@ -50,13 +50,15 @@ (Stas). - MySQL Improved extension: + . Added 'db' and 'catalog' keys to the field fetching functions (FR #39847). +(Kalle) . Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query). (Kalle, Andrey) . Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to call libmysql). (Kalle, tre-php-net at crushedhat dot com) . Fixed buggy counting of affected rows when using the text protocol. The -collected statistics were wrong when multi_query was used with mysqlnd. - (Andrey) +collected statistics were wrong when multi_query was used with mysqlnd +(Andrey) - OpenSSL extension: . Implemented FR #53447 (Cannot disable SessionTicket extension for servers Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c 2011-01-17 10:43:53 UTC (rev 307532) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c 2011-01-17 11:20:54 UTC (rev 307533) @@ -1052,6 +1052,8 @@ add_property_string(value, "table", (char *) (field->table ? field->table : ""), 1); add_property_string(value, "orgtable", (char *) (field->org_table ? field->org_table : ""), 1); add_property_string(value, "def", (field->def ? field->def : ""), 1); + add_property_string(value, "db", (field->db ? field->db : ""), 1); + add_property_string(value, "catalog", (field->catalog ? field->catalog : ""), 1); add_property_long(value, "max_length", field->max_length); add_property_long(value, "length", field->length); Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/047.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/047.phpt 2011-01-17 10:43:53 UTC (rev 307532) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/047.phpt 2011-01-17 11:20:54 UTC (rev 307533) @@ -60,7 +60,7 @@ === fetch_fields === array(2) { [0]=> - object(stdClass)#5 (11) { + object(stdClass)#5 (13) { [%u|b%"name"]=> %unicode|string%(3) "foo" [%u|b%"orgname"]=> @@ -71,6 +71,10 @@ %unicode|string%(13) "test_affected" [%u|b%"def"]=> %unicode|string%(0) "" +[%u|b%"db"]=> +%unicode|string%(4) "test" +[%u|b%"catalog"]=> +%unicode|string%(3) "def" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -85,7 +89,7 @@ int(0) } [1]=> - object(stdClass)#6 (11) { + object(stdClass)#6 (13) { [%u|b%"name"]=> %unicode|string%(3) "bar" [%u|b%"orgname"]=> @@ -96,6 +100,10 @@ %unicode|string%(13) "test_affected" [%u|b%"def"]=> %unicode|string%(0) "" +[%u|b%"db"]=> +%unicode|string%(4) "test" +[%u|b%"catalog"]=> +%unicode|string%(3) "def" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -112,7 +120,7 @@ } === fetch_field_direct === -object(stdClass)#6 (11) { +object(stdClass)#6 (13) { [%u|b%"name"]=> %unicode|string%(3) "foo" [%u|b%"orgname"]=> @@ -123,6 +131,10 @@ %unicode|string%(13) "test_affected" [%u|b%"def"]=> %unicode|string%(0) "" + [%u|b%"db"]=> + %unicode|string%(4) "test" + [%u|b%"catalog"]=> + %unicode|string%(3) "def" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -136,7 +148,7 @@ [%u|b%"decimals"]=> int(0) } -object(stdClass)#6 (11) { +object(stdClass)#6 (13) { [%u|b%"name"]=> %unicode|
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/mysqli/mysqli_api.c ext/mysqli/tests/047.phpt ext/mysqli/tests/mysqli_fetch_field.phpt ext/mysqli/tests/mysqli_fetch_field_direct.phpt ext/mysqli/
kalleMon, 17 Jan 2011 10:43:53 + Revision: http://svn.php.net/viewvc?view=revision&revision=307532 Log: Added 'catalog' to the field fetching functions in mysqli (Thanks to Johannes for the headsup) Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING U php/php-src/trunk/ext/mysqli/mysqli_api.c U php/php-src/trunk/ext/mysqli/tests/047.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_oo.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_fields.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_field_seek.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_field_tell.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-01-17 09:59:07 UTC (rev 307531) +++ php/php-src/trunk/NEWS 2011-01-17 10:43:53 UTC (rev 307532) @@ -162,8 +162,6 @@ . mysqlnd: Added named pipes support. FR #48082. (Andrey) . MySQLi: Added iterator support in MySQLi. mysqli_result implements Traversable. (Andrey, Johannes) - . MySQLi: Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct] -need to return db). (Kalle) . PDO_mysql: Removed support for linking with MySQL client libraries older than 4.1. (Johannes) Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2011-01-17 09:59:07 UTC (rev 307531) +++ php/php-src/trunk/UPGRADING 2011-01-17 10:43:53 UTC (rev 307532) @@ -161,8 +161,6 @@ strings. This breaks code that iterated the resulting stream array using a numeric index, but makes easier to identify which of the passed streams are present in the result. -- mysqli_fetch_[field|fields|field_direct] now returns an additional property - named 'db' that contains the database name of the associated result. === Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c === --- php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-01-17 09:59:07 UTC (rev 307531) +++ php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-01-17 10:43:53 UTC (rev 307532) @@ -1057,6 +1057,7 @@ add_property_string(value, "orgtable",(field->org_table ? field->org_table : ""), 1); add_property_string(value, "def",(field->def ? field->def : ""), 1); add_property_string(value, "db",(field->db ? field->db : ""), 1); + add_property_string(value, "catalog",(field->catalog ? field->catalog : ""), 1); add_property_long(value, "max_length", field->max_length); add_property_long(value, "length", field->length); Modified: php/php-src/trunk/ext/mysqli/tests/047.phpt === --- php/php-src/trunk/ext/mysqli/tests/047.phpt 2011-01-17 09:59:07 UTC (rev 307531) +++ php/php-src/trunk/ext/mysqli/tests/047.phpt 2011-01-17 10:43:53 UTC (rev 307532) @@ -60,7 +60,7 @@ === fetch_fields === array(2) { [0]=> - object(stdClass)#5 (12) { + object(stdClass)#5 (13) { [%u|b%"name"]=> %unicode|string%(3) "foo" [%u|b%"orgname"]=> @@ -73,6 +73,8 @@ %unicode|string%(0) "" [%u|b%"db"]=> %unicode|string%(4) "test" +[%u|b%"catalog"]=> +%unicode|string%(3) "def" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -87,7 +89,7 @@ int(0) } [1]=> - object(stdClass)#6 (12) { + object(stdClass)#6 (13) { [%u|b%"name"]=> %unicode|string%(3) "bar" [%u|b%"orgname"]=> @@ -100,6 +102,8 @@ %unicode|string%(0) "" [%u|b%"db"]=> %unicode|string%(4) "test" +[%u|b%"catalog"]=> +%unicode|string%(3) "def" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -116,7 +120,7 @@ } === fetch_field_direct === -object(stdClass)#6 (12) { +object(stdClass)#6 (13) { [%u|b%"name"]=> %unicode|string%(3) "foo" [%u|b%"orgname"]=> @@ -129,6 +133,8 @@ %unicode|string%(0) "" [%u|b%"db"]=> %unicode|string%(4) "test" + [%u|b%"catalog"]=> + %unicode|string%(3) "def" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -142,7 +148,7 @@ [%u|b%"decimals"]=> int(0) } -object(stdClass)#6 (12) { +object(stdClass)#6 (13) { [%u|b%"name"]=> %unicode|string%(3) "bar" [%u|b%"orgname"]=> @@ -155,6 +161,8 @@ %unicode|string%(0) "" [%u|b%"db"]=> %unicode|string%(4) "test" + [%u|b%"catalog"]=> + %unicode|string%(3) "def" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -170,7 +178,7 @@ } === fetch_field === -object(std
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt trunk/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt
kalleMon, 17 Jan 2011 09:59:07 + Revision: http://svn.php.net/viewvc?view=revision&revision=307531 Log: Remove this void comment (c/p mistake) Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt U php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt 2011-01-17 09:56:25 UTC (rev 307530) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt 2011-01-17 09:59:07 UTC (rev 307531) @@ -8,7 +8,6 @@ ?> --FILE-- --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/NEWS branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.
kalleMon, 17 Jan 2011 09:54:22 + Revision: http://svn.php.net/viewvc?view=revision&revision=307529 Log: MFT: Implemented FR #47802 (Support for setting character sets in DSN strings) Bug: http://bugs.php.net/47802 (Assigned) PDO_MYSQL doesn't use the charset parameter Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c U php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h U php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc A php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-01-17 07:59:46 UTC (rev 307528) +++ php/php-src/branches/PHP_5_3/NEWS 2011-01-17 09:54:22 UTC (rev 307529) @@ -68,6 +68,8 @@ server mode. (Gustavo) - PDO MySQL driver: + . Implemented FR #47802 (Support for setting character sets in DSN strings). +(Kalle) . Fixed bug #53551 (PDOStatement execute segfaults for pdo_mysql driver). (Johannes) Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2011-01-17 07:59:46 UTC (rev 307528) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2011-01-17 09:54:22 UTC (rev 307529) @@ -711,6 +711,13 @@ #endif } +#ifdef PDO_MYSQL_HAS_CHARSET + if (vars[0].optval && mysql_options(H->server, MYSQL_SET_CHARSET_NAME, vars[0].optval)) { + pdo_mysql_error(dbh); + goto cleanup; + } +#endif + dbname = vars[1].optval; host = vars[2].optval; if(vars[3].optval) { Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h 2011-01-17 07:59:46 UTC (rev 307528) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h 2011-01-17 09:54:22 UTC (rev 307529) @@ -33,6 +33,10 @@ # define PDO_MYSQL_PARAM_BIND MYSQL_BIND #endif +#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 5) || MYSQL_VERSION_ID >= 50007 || defined(MYSQL_USE_MYSQLND) +# define PDO_MYSQL_HAS_CHARSET +#endif + #if defined(PDO_USE_MYSQLND) && PHP_DEBUG && !defined(PHP_WIN32) #define PDO_DBG_ENABLED 1 Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc 2011-01-17 07:59:46 UTC (rev 307528) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc 2011-01-17 09:54:22 UTC (rev 307529) @@ -4,9 +4,9 @@ class MySQLPDOTest extends PDOTest { - static function factory($classname = 'PDO', $drop_test_tables = false, $myattr = null) { + static function factory($classname = 'PDO', $drop_test_tables = false, $myattr = null, $mydsn = null) { - $dsn= self::getDSN(); + $dsn= self::getDSN($mydsn); $user = PDO_MYSQL_TEST_USER; $pass = PDO_MYSQL_TEST_PASS; $attr = getenv('PDOTEST_ATTR'); Added: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt 2011-01-17 09:54:22 UTC (rev 307529) @@ -0,0 +1,34 @@ +--TEST-- +PDO_MYSQL: Defining a connection charset in the DSN +--SKIPIF-- + +--FILE-- +query("SHOW VARIABLES LIKE 'character_set_connection'")->fetchObject()->value; + + /* Make sure that we don't attempt to set the current character set to make this case useful */ + $new_charset= ($charset == 'latin1' ? 'ascii' : 'latin1'); + + /* Done with the original connection, create a second link to test the character set being defined */ + unset($link); + + $link = MySQLPDOTest::factory('PDO', false, null, Array('charset' => $new_charset)); + $conn_charset = $link->query("SHOW VARIABLES LIKE 'character_set_connection'")->fetchObject()->value; + + if ($charset !== $conn_charset) { + echo "done!\n"; + } else { + echo "failed!\n"; + } +?> +--EXPECTF-- +done! \ No newline at end of file Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-01-17 07:59:46 UTC (rev 30
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ config.w32
kalleSun, 16 Jan 2011 15:44:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=307512 Log: Fix mysqlnd build Changed paths: U php/php-src/trunk/ext/mysqlnd/config.w32 Modified: php/php-src/trunk/ext/mysqlnd/config.w32 === --- php/php-src/trunk/ext/mysqlnd/config.w322011-01-16 12:57:34 UTC (rev 307511) +++ php/php-src/trunk/ext/mysqlnd/config.w322011-01-16 15:44:48 UTC (rev 307512) @@ -7,7 +7,7 @@ if (CHECK_LIB("ws2_32.lib", "mysqlnd")) { mysqlnd_source = "mysqlnd.c " + - "mysqlnd_auth.c" + + "mysqlnd_auth.c " + "mysqlnd_block_alloc.c " + "mysqlnd_charset.c " + "mysqlnd_debug.c " + -- 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_3/ext/standard/ basic_functions.c http.c php_http.h url.h
Hi Adam 2011/1/10 Adam Harvey : > On 8 January 2011 10:34, Rui Hirokawa wrote: >> hirokawa Sat, 08 Jan 2011 02:34:33 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=307248 >> >> Log: >> MFH: added an option to http_build_query for RFC-3986 >> based url-encoding. > > Somebody should double check me on this, because binary > compatibility's not one of my stronger points, but isn't the change to > the php_url_encode_hash_ex() definition going to break BC in 5.3? > ext/standard/php_http.h is one of the headers we install. It will break the extensions API, because of extensions compiled for 5.3.5 is used with 5.3.6, then they will fail dynamic linking. I had to do the same thing when I merged the copy stream context support for 5.3, what I did was: Added php_copy_stream() which was the implementation of its counterpart php_copy_ex(), so the API was the same, and added a new function. I think the same should be done to achieve BC here. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/mysqli/mysqli_api.c ext/mysqli/tests/047.phpt ext/mysqli/tests/mysqli_fetch_field.phpt ext/mysqli/tests/mysqli_fetch_field_direct.phpt ext/mysqli/
kalleFri, 07 Jan 2011 18:25:55 + Revision: http://svn.php.net/viewvc?view=revision&revision=307231 Log: Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct] need to return db) Bug: http://bugs.php.net/39847 (Assigned) mysqli_fetch_[field|fields|field_direct] need to return db Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING U php/php-src/trunk/ext/mysqli/mysqli_api.c U php/php-src/trunk/ext/mysqli/tests/047.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_oo.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_fields.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_field_seek.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_field_tell.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-01-07 17:45:12 UTC (rev 307230) +++ php/php-src/trunk/NEWS 2011-01-07 18:25:55 UTC (rev 307231) @@ -158,6 +158,10 @@ . mysqlnd: Added named pipes support. FR #48082. (Andrey) . MySQLi: Added iterator support in MySQLi. mysqli_result implements Traversable. (Andrey, Johannes) + . MySQLi: Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct] +need to return db). (Kalle) + . PDO_mysql: Implemented FR #47802 (Support for setting character sets in +DSN strings). (Kalle) . PDO_mysql: Removed support for linking with MySQL client libraries older than 4.1. (Johannes) @@ -170,10 +174,6 @@ . Added nextRowset support. . Fixed bug #50755 (PDO DBLIB Fails with OOM). -- Improved PDO MySQL: - . Implemented FR #47802 (Support for setting character sets in DSN strings). -(Kalle) - - Improved Reflection extension: (Johannes) . Added ReflectionExtension::isTemporary() and ReflectionExtension::isPersistent() methods. Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2011-01-07 17:45:12 UTC (rev 307230) +++ php/php-src/trunk/UPGRADING 2011-01-07 18:25:55 UTC (rev 307231) @@ -163,6 +163,8 @@ present in the result. - pdo_mysql now supports setting character sets when connecting in the DSN string. +- mysqli_fetch_[field|fields|field_direct] now returns an additional property + named 'db' that contains the database name of the associated result. === Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c === --- php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-01-07 17:45:12 UTC (rev 307230) +++ php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-01-07 18:25:55 UTC (rev 307231) @@ -1052,6 +1052,7 @@ add_property_string(value, "table",(field->table ? field->table : ""), 1); add_property_string(value, "orgtable",(field->org_table ? field->org_table : ""), 1); add_property_string(value, "def",(field->def ? field->def : ""), 1); + add_property_string(value, "db",(field->db ? field->db : ""), 1); add_property_long(value, "max_length", field->max_length); add_property_long(value, "length", field->length); Modified: php/php-src/trunk/ext/mysqli/tests/047.phpt === --- php/php-src/trunk/ext/mysqli/tests/047.phpt 2011-01-07 17:45:12 UTC (rev 307230) +++ php/php-src/trunk/ext/mysqli/tests/047.phpt 2011-01-07 18:25:55 UTC (rev 307231) @@ -60,7 +60,7 @@ === fetch_fields === array(2) { [0]=> - object(stdClass)#5 (11) { + object(stdClass)#5 (12) { [%u|b%"name"]=> %unicode|string%(3) "foo" [%u|b%"orgname"]=> @@ -71,6 +71,8 @@ %unicode|string%(13) "test_affected" [%u|b%"def"]=> %unicode|string%(0) "" +[%u|b%"db"]=> +%unicode|string%(4) "test" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -85,7 +87,7 @@ int(0) } [1]=> - object(stdClass)#6 (11) { + object(stdClass)#6 (12) { [%u|b%"name"]=> %unicode|string%(3) "bar" [%u|b%"orgname"]=> @@ -96,6 +98,8 @@ %unicode|string%(13) "test_affected" [%u|b%"def"]=> %unicode|string%(0) "" +[%u|b%"db"]=> +%unicode|string%(4) "test" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -112,7 +116,7 @@ } === fetch_field_direct === -object(stdClass)#6 (11) { +object(stdClass)#6 (12) { [%u|b%"name"]=> %unicode|string%(3) "foo" [%u|b%"orgname"]=> @@ -123,6 +127,8 @@ %unicode|string%(13) "test_affected" [%u|b%"def"]=> %unicode|string%(0) "" + [%u|b%"db"]=> + %unicode
[PHP-CVS] svn: /php/php-src/trunk/ext/pdo_mysql/ mysql_driver.c tests/mysql_pdo_test.inc tests/pdo_mysql_connect_charset.phpt
kalleFri, 07 Jan 2011 17:18:30 + Revision: http://svn.php.net/viewvc?view=revision&revision=307228 Log: Added test case for #47802 and fixed macro name after the move to mysql_options() Bug: http://bugs.php.net/47802 (Assigned) PDO_MYSQL doesn't use the charset parameter Changed paths: U php/php-src/trunk/ext/pdo_mysql/mysql_driver.c U php/php-src/trunk/ext/pdo_mysql/tests/mysql_pdo_test.inc A php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c === --- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2011-01-07 15:51:36 UTC (rev 307227) +++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2011-01-07 17:18:30 UTC (rev 307228) @@ -683,7 +683,7 @@ #endif } -#ifdef PDO_MYSQL_HAS_CHARSET_X +#ifdef PDO_MYSQL_HAS_CHARSET if (vars[0].optval && mysql_options(H->server, MYSQL_SET_CHARSET_NAME, vars[0].optval)) { pdo_mysql_error(dbh); goto cleanup; Modified: php/php-src/trunk/ext/pdo_mysql/tests/mysql_pdo_test.inc === --- php/php-src/trunk/ext/pdo_mysql/tests/mysql_pdo_test.inc2011-01-07 15:51:36 UTC (rev 307227) +++ php/php-src/trunk/ext/pdo_mysql/tests/mysql_pdo_test.inc2011-01-07 17:18:30 UTC (rev 307228) @@ -4,9 +4,9 @@ class MySQLPDOTest extends PDOTest { - static function factory($classname = 'PDO', $drop_test_tables = false, $myattr = null) { + static function factory($classname = 'PDO', $drop_test_tables = false, $myattr = null, $mydsn = null) { - $dsn= self::getDSN(); + $dsn= self::getDSN($mydsn); $user = PDO_MYSQL_TEST_USER; $pass = PDO_MYSQL_TEST_PASS; $attr = getenv('PDOTEST_ATTR'); Added: php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt === --- php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt (rev 0) +++ php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt 2011-01-07 17:18:30 UTC (rev 307228) @@ -0,0 +1,34 @@ +--TEST-- +PDO_MYSQL: Defining a connection charset in the DSN +--SKIPIF-- + +--FILE-- +query("SHOW VARIABLES LIKE 'character_set_connection'")->fetchObject()->value; + + /* Make sure that we don't attempt to set the current character set to make this case useful */ + $new_charset= ($charset == 'latin1' ? 'ascii' : 'latin1'); + + /* Done with the original connection, create a second link to test the character set being defined */ + unset($link); + + $link = MySQLPDOTest::factory('PDO', false, null, Array('charset' => $new_charset)); + $conn_charset = $link->query("SHOW VARIABLES LIKE 'character_set_connection'")->fetchObject()->value; + + if ($charset !== $conn_charset) { + echo "done!\n"; + } else { + echo "failed!\n"; + } +?> +--EXPECTF-- +done! \ No newline at end of file -- 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 UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h
Hi Andrey 2011/1/7 Andrey Hristov : > On 01/07/2011 03:39 PM, Kalle Sommer Nielsen wrote: > > this fix is inefficient. Implies a query to the server. Much efficient > is using mysql_options() on a MYSQL handle after mysql_init() but before > mysql_real_connect() (which sets the charset during the handshake). > > http://dev.mysql.com/doc/refman/5.5/en/mysql-options.html > MYSQL_SET_CHARSET_NAME (argument type: char *) > > The name of the character set to use as the default character set. > > Could you change it? I changed it to use mysql_options() prior to the connection as suggested. Should I merge it to the 5.3 branch? > > Thanks! > Andrey > -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/pdo_mysql/ mysql_driver.c
kalleFri, 07 Jan 2011 14:58:23 + Revision: http://svn.php.net/viewvc?view=revision&revision=307226 Log: Update to use mysql_options() instead of mysql_set_character_set() (As suggested by Andrey) Changed paths: U php/php-src/trunk/ext/pdo_mysql/mysql_driver.c Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c === --- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2011-01-07 14:57:51 UTC (rev 307225) +++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2011-01-07 14:58:23 UTC (rev 307226) @@ -683,6 +683,13 @@ #endif } +#ifdef PDO_MYSQL_HAS_CHARSET_X + if (vars[0].optval && mysql_options(H->server, MYSQL_SET_CHARSET_NAME, vars[0].optval)) { + pdo_mysql_error(dbh); + goto cleanup; + } +#endif + dbname = vars[1].optval; host = vars[2].optval; if(vars[3].optval) { @@ -711,13 +718,6 @@ goto cleanup; } -#ifdef PDO_MYSQL_HAS_CHARSET - if (vars[0].optval && mysql_set_character_set(H->server, vars[0].optval)) { - pdo_mysql_error(dbh); - goto cleanup; - } -#endif - if (!dbh->auto_commit) { mysql_handle_autocommit(dbh TSRMLS_CC); } -- 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 UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h
kalleFri, 07 Jan 2011 14:39:56 + Revision: http://svn.php.net/viewvc?view=revision&revision=307224 Log: Implemented FR #47802, support for character sets in DSN strings for PDO_MYSQL Bug: http://bugs.php.net/47802 (Open) PDO_MYSQL doesn't use the charset parameter Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING U php/php-src/trunk/ext/pdo_mysql/mysql_driver.c U php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-01-07 14:22:30 UTC (rev 307223) +++ php/php-src/trunk/NEWS 2011-01-07 14:39:56 UTC (rev 307224) @@ -170,6 +170,10 @@ . Added nextRowset support. . Fixed bug #50755 (PDO DBLIB Fails with OOM). +- Improved PDO MySQL: + . Implemented FR #47802 (Support for setting character sets in DSN strings). +(Kalle) + - Improved Reflection extension: (Johannes) . Added ReflectionExtension::isTemporary() and ReflectionExtension::isPersistent() methods. Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2011-01-07 14:22:30 UTC (rev 307223) +++ php/php-src/trunk/UPGRADING 2011-01-07 14:39:56 UTC (rev 307224) @@ -161,6 +161,8 @@ strings. This breaks code that iterated the resulting stream array using a numeric index, but makes easier to identify which of the passed streams are present in the result. +- pdo_mysql now supports setting character sets when connecting in the DSN + string. === Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c === --- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2011-01-07 14:22:30 UTC (rev 307223) +++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2011-01-07 14:39:56 UTC (rev 307224) @@ -711,6 +711,13 @@ goto cleanup; } +#ifdef PDO_MYSQL_HAS_CHARSET + if (vars[0].optval && mysql_set_character_set(H->server, vars[0].optval)) { + pdo_mysql_error(dbh); + goto cleanup; + } +#endif + if (!dbh->auto_commit) { mysql_handle_autocommit(dbh TSRMLS_CC); } Modified: php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h === --- php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h 2011-01-07 14:22:30 UTC (rev 307223) +++ php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h 2011-01-07 14:39:56 UTC (rev 307224) @@ -33,6 +33,10 @@ # define PDO_MYSQL_PARAM_BIND MYSQL_BIND #endif +#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 5) || MYSQL_VERSION_ID >= 50007 || defined(MYSQL_USE_MYSQLND) +# define PDO_MYSQL_HAS_CHARSET +#endif + #if defined(PDO_USE_MYSQLND) && PHP_DEBUG && !defined(PHP_WIN32) #define PDO_DBG_ENABLED 1 -- 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/win32/build/confutils.js trunk/win32/build/confutils.js
kalleMon, 03 Jan 2011 23:08:47 + Revision: http://svn.php.net/viewvc?view=revision&revision=307044 Log: Fixed linking of extensions that would use a static .lib file (libname_a.lib rather than libname.lib) # This fixes `configure --with-mcrypt=shared' to properly find and # link against libmcrypt.lib rather than libmcrypt_a.lib Changed paths: U php/php-src/branches/PHP_5_3/win32/build/confutils.js U php/php-src/trunk/win32/build/confutils.js Modified: php/php-src/branches/PHP_5_3/win32/build/confutils.js === --- php/php-src/branches/PHP_5_3/win32/build/confutils.js 2011-01-03 23:08:22 UTC (rev 307043) +++ php/php-src/branches/PHP_5_3/win32/build/confutils.js 2011-01-03 23:08:47 UTC (rev 307044) @@ -648,6 +648,9 @@ // Expand path to include general dirs path_to_check += ";" + php_usual_lib_suspects; + // For static libs + eval('var static_lib = !PHP_' + common_name.toUpperCase() + '_SHARED;'); + // It is common practice to put libs under one of these dir names var subdirs = new Array(PHP_DEBUG == "yes" ? "Debug" : (PHP_DEBUG_PACK == "yes"?"Release_Dbg":"Release"), "lib", "libs", "libexec"); @@ -663,6 +666,14 @@ name = name.replace(rExp,"_debug.lib"); libnames.unshift(name); } + } else if (!static_lib) { + var length = libnames.length; + for (var i = 0; i < length; i++) { + var name = new String(libnames[i]); + rExp = /_a.lib$/i; + name = name.replace(rExp,".lib"); + libnames.unshift(name); + } } var i, j, k, libname; Modified: php/php-src/trunk/win32/build/confutils.js === --- php/php-src/trunk/win32/build/confutils.js 2011-01-03 23:08:22 UTC (rev 307043) +++ php/php-src/trunk/win32/build/confutils.js 2011-01-03 23:08:47 UTC (rev 307044) @@ -648,6 +648,9 @@ // Expand path to include general dirs path_to_check += ";" + php_usual_lib_suspects; + // For static libs + eval('var static_lib = !PHP_' + common_name.toUpperCase() + '_SHARED;'); + // It is common practice to put libs under one of these dir names var subdirs = new Array(PHP_DEBUG == "yes" ? "Debug" : (PHP_DEBUG_PACK == "yes"?"Release_Dbg":"Release"), "lib", "libs", "libexec"); @@ -663,6 +666,14 @@ name = name.replace(rExp,"_debug.lib"); libnames.unshift(name); } + } else if (!static_lib) { + var length = libnames.length; + for (var i = 0; i < length; i++) { + var name = new String(libnames[i]); + rExp = /_a.lib$/i; + name = name.replace(rExp,".lib"); + libnames.unshift(name); + } } var i, j, k, libname; -- 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/ UPGRADING ext/spl/spl_directory.c ext/spl/tests/DirectoryIterator_getExtension_basic.phpt ext/spl/tests/SplFileInfo_getExtension_basic.phpt
Hi Peter 2010/12/23 Peter Cowburn : > salathe Thu, 23 Dec 2010 22:32:52 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=306593 > > Log: > Implemented FR #48767 (SplFileInfo::getExtension()) > Please make a note of this in the NEWS file aswell -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/NEWS branches/PHP_5_3/ext/zip/lib/zip_dirent.c trunk/ext/zip/lib/zip_dirent.c
Hi 2010/12/18 Gustavo André dos Santos Lopes : > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > U php/php-src/branches/PHP_5_3/ext/zip/lib/zip_dirent.c > U php/php-src/trunk/ext/zip/lib/zip_dirent.c I think that fix should go upstream instead of have a .patch file like ext/fileinfo does it to patch php-src specific changes until its fixed. Pierre? -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/win32/build/ Makefile confutils.js
Hi Pierre 2010/12/15 Pierre Joye : > Log: > - fix build with out of src obj dir > > # | Copyright (c) 1997-2008 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 | > +# | that is bundled with this package in the file LICENSE, and is |3 This looks like a typo that shouldn't have been committed Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/win32/build/ confutils.js
kalleMon, 13 Dec 2010 20:46:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=306346 Log: * Don't print the shared headers table after enabling each extension (cleaner configure output) * Fix double slashes for directory targets in PHP_INSTALL_HEADERS() Changed paths: U php/php-src/trunk/win32/build/confutils.js Modified: php/php-src/trunk/win32/build/confutils.js === --- php/php-src/trunk/win32/build/confutils.js 2010-12-13 18:45:53 UTC (rev 306345) +++ php/php-src/trunk/win32/build/confutils.js 2010-12-13 20:46:57 UTC (rev 306346) @@ -1475,6 +1475,11 @@ STDOUT.WriteBlankLines(2); + + STDOUT.WriteLine("Shared headers:"); + output_as_table(["Headers", "Type", "target"], headers_install); + STDOUT.WriteBlankLines(2); + STDOUT.WriteLine("Enabled extensions:"); output_as_table(["Extension", "Mode"], extensions_enabled.sort()); STDOUT.WriteBlankLines(2); @@ -1867,7 +1872,7 @@ { headers_list = headers_list.split(new RegExp("\\s+")); headers_list.sort(); - if (dir.length > 0 && dir.substr(dir.length - 1) != '/') { + if (dir.length > 0 && dir.substr(dir.length - 1) != '/' && dir.substr(dir.length - 1) != '\\') { dir += '/'; } dir = dir.replace(new RegExp("/", "g"), "\\"); @@ -1878,7 +1883,7 @@ isdir = FSO.FolderExists(dir + src); isfile = FSO.FileExists(dir + src); if (isdir) { - if (src.length > 0 && src.substr(src.length - 1) != '/') { + if (src.length > 0 && src.substr(src.length - 1) != '/' && src.substr(src.length - 1) != '\\') { src += '\\'; } headers_install[headers_install.length] = [dir + src, 'dir','']; @@ -1892,7 +1897,6 @@ ERROR("Cannot find header " + dir + src); } } - output_as_table(["Headers", "Type", "target"], headers_install); } // for snapshot builders, this option will attempt to enable everything -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c trunk/ext/xmlrpc/tests/bug53493.phpt trunk/ext/xmlrpc/xm
kalleMon, 13 Dec 2010 14:29:42 + Revision: http://svn.php.net/viewvc?view=revision&revision=306341 Log: Revert fix for bug #53493 to be compliant with the XML specification Bug: http://bugs.php.net/53493 (Assigned) xmlrpc_decode should not be sensitive to leading whitespace Changed paths: U php/php-src/branches/PHP_5_3/NEWS D php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt U php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c D php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt U php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-13 13:50:40 UTC (rev 306340) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-13 14:29:42 UTC (rev 306341) @@ -51,9 +51,6 @@ - Streams: . Implemented FR #26158 (open arbitrary file descriptor with fopen). (Gustavo) -- XMLRPC-EPI: - . Fixed bug #53493 (xmlrpc_decode should not be sensitive to leading -whitespace). (Kalle) 09 Dec 2010, PHP 5.3.4 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) Deleted: php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt 2010-12-13 13:50:40 UTC (rev 306340) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt 2010-12-13 14:29:42 UTC (rev 306341) @@ -1,15 +0,0 @@ ---TEST-- -Bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace) ---FILE-- -' . - 'Hello World' . - ''; - -var_dump(xmlrpc_decode($req)); -echo "Done\n"; -?> ---EXPECT-- -string(11) "Hello World" -Done Modified: php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2010-12-13 13:50:40 UTC (rev 306340) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2010-12-13 14:29:42 UTC (rev 306341) @@ -845,10 +845,7 @@ } if (return_value_used) { - zval* retval; - char *trimmed = php_trim(arg1, arg1_len, NULL, 0, NULL, 1 TSRMLS_CC); - - retval = decode_request_worker(trimmed, strlen(trimmed), arg2_len ? arg2 : NULL, NULL); + zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? arg2 : NULL, NULL); if (retval) { *return_value = *retval; FREE_ZVAL(retval); Deleted: php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt === --- php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt2010-12-13 13:50:40 UTC (rev 306340) +++ php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt2010-12-13 14:29:42 UTC (rev 306341) @@ -1,15 +0,0 @@ ---TEST-- -Bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace) ---FILE-- -' . - 'Hello World' . - ''; - -var_dump(xmlrpc_decode($req)); -echo "Done\n"; -?> ---EXPECT-- -string(11) "Hello World" -Done Modified: php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c 2010-12-13 13:50:40 UTC (rev 306340) +++ php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c 2010-12-13 14:29:42 UTC (rev 306341) @@ -845,10 +845,7 @@ } if (return_value_used) { - zval* retval; - char *trimmed = php_trim(arg1, arg1_len, NULL, 0, NULL, 1 TSRMLS_CC); - - retval = decode_request_worker(trimmed, strlen(trimmed), arg2_len ? arg2 : NULL, NULL); + zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? arg2 : NULL, NULL); if (retval) { *return_value = *retval; FREE_ZVAL(retval); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c trunk/ext/xmlrpc/tests/bug53493.phpt trunk/ext/xmlrpc/xm
kalleMon, 13 Dec 2010 09:52:05 + Revision: http://svn.php.net/viewvc?view=revision&revision=306339 Log: Fixed bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace) Bug: http://bugs.php.net/53493 (Assigned) xmlrpc_decode should not be sensitive to leading whitespace Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt U php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c A php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt U php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-13 09:04:07 UTC (rev 306338) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-13 09:52:05 UTC (rev 306339) @@ -51,6 +51,10 @@ - Streams: . Implemented FR #26158 (open arbitrary file descriptor with fopen). (Gustavo) +- XMLRPC-EPI: + . Fixed bug #53493 (xmlrpc_decode should not be sensitive to leading +whitespace). (Kalle) + 09 Dec 2010, PHP 5.3.4 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) Added: php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug53493.phpt 2010-12-13 09:52:05 UTC (rev 306339) @@ -0,0 +1,15 @@ +--TEST-- +Bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace) +--FILE-- +' . + 'Hello World' . + ''; + +var_dump(xmlrpc_decode($req)); +echo "Done\n"; +?> +--EXPECT-- +string(11) "Hello World" +Done Modified: php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2010-12-13 09:04:07 UTC (rev 306338) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2010-12-13 09:52:05 UTC (rev 306339) @@ -67,6 +67,7 @@ #include "php.h" #include "ext/standard/info.h" +#include "ext/standard/php_string.h" #include "ext/date/php_date.h" #include "php_ini.h" #include "php_xmlrpc.h" @@ -844,7 +845,10 @@ } if (return_value_used) { - zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? arg2 : NULL, NULL); + zval* retval; + char *trimmed = php_trim(arg1, arg1_len, NULL, 0, NULL, 1 TSRMLS_CC); + + retval = decode_request_worker(trimmed, strlen(trimmed), arg2_len ? arg2 : NULL, NULL); if (retval) { *return_value = *retval; FREE_ZVAL(retval); Added: php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt === --- php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt (rev 0) +++ php/php-src/trunk/ext/xmlrpc/tests/bug53493.phpt2010-12-13 09:52:05 UTC (rev 306339) @@ -0,0 +1,15 @@ +--TEST-- +Bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace) +--FILE-- +' . + 'Hello World' . + ''; + +var_dump(xmlrpc_decode($req)); +echo "Done\n"; +?> +--EXPECT-- +string(11) "Hello World" +Done Modified: php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c 2010-12-13 09:04:07 UTC (rev 306338) +++ php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c 2010-12-13 09:52:05 UTC (rev 306339) @@ -67,6 +67,7 @@ #include "php.h" #include "ext/standard/info.h" +#include "ext/standard/php_string.h" #include "ext/date/php_date.h" #include "php_ini.h" #include "php_xmlrpc.h" @@ -844,7 +845,10 @@ } if (return_value_used) { - zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? arg2 : NULL, NULL); + zval* retval; + char *trimmed = php_trim(arg1, arg1_len, NULL, 0, NULL, 1 TSRMLS_CC); + + retval = decode_request_worker(trimmed, strlen(trimmed), arg2_len ? arg2 : NULL, NULL); if (retval) { *return_value = *retval; FREE_ZVAL(retval); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c trunk/ext/mysqli/mysqli_nonapi.c
kalleSun, 12 Dec 2010 18:00:25 + Revision: http://svn.php.net/viewvc?view=revision&revision=306278 Log: Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to call libmysql) # Based on patch by tre-php-net at crushedhat dot com Bug: http://bugs.php.net/53425 (Assigned) mysqli_real_connect() ignores client flags when built to call libmysql Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c U php/php-src/trunk/ext/mysqli/mysqli_nonapi.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 18:00:19 UTC (rev 306277) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 18:00:25 UTC (rev 306278) @@ -14,6 +14,8 @@ - MySQL Improved extension: . Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query). (Kalle) + . Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to +call libmysql). (Kalle, tre-php-net at crushedhat dot com) - PDO Oracle driver: . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 18:00:19 UTC (rev 306277) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 18:00:25 UTC (rev 306278) @@ -231,7 +231,10 @@ #endif #if !defined(MYSQLI_USE_MYSQLND) - if (mysql_real_connect(mysql->mysql, hostname, username, passwd, dbname, port, socket, CLIENT_MULTI_RESULTS) == NULL) + /* BC for prior to bug fix #53425 */ + flags |= CLIENT_MULTI_RESULTS; + + if (mysql_real_connect(mysql->mysql, hostname, username, passwd, dbname, port, socket, flags) == NULL) #else if (mysqlnd_connect(mysql->mysql, hostname, username, passwd, passwd_len, dbname, dbname_len, port, socket, flags TSRMLS_CC) == NULL) Modified: php/php-src/trunk/ext/mysqli/mysqli_nonapi.c === --- php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 18:00:19 UTC (rev 306277) +++ php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 18:00:25 UTC (rev 306278) @@ -231,7 +231,10 @@ #endif #if !defined(MYSQLI_USE_MYSQLND) - if (mysql_real_connect(mysql->mysql, hostname, username, passwd, dbname, port, socket, CLIENT_MULTI_RESULTS) == NULL) + /* BC for prior to bug fix #53425 */ + flags |= CLIENT_MULTI_RESULTS; + + if (mysql_real_connect(mysql->mysql, hostname, username, passwd, dbname, port, socket, flags) == NULL) #else if (mysqlnd_connect(mysql->mysql, hostname, username, passwd, passwd_len, dbname, dbname_len, port, socket, flags TSRMLS_CC) == NULL) -- 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/Zend/ tests/traits/bugs/case-sensitive.phpt tests/traits/conflict001.phpt tests/traits/conflict003.phpt tests/traits/error_011.phpt tests/traits/error_015.phpt te
Hi Stefan 2010/12/12 Stefan Marr : > Modified: php/php-src/trunk/Zend/zend_compile.c > === > --- php/php-src/trunk/Zend/zend_compile.c 2010-12-12 16:17:50 UTC (rev > 306266) > +++ php/php-src/trunk/Zend/zend_compile.c 2010-12-12 16:48:02 UTC (rev > 306267) > @@ -3459,7 +3459,7 @@ > > if (zend_hash_quick_find(&ce->function_table, hash_key->arKey, > hash_key->nKeyLength, hash_key->h, (void **)&class_fn) == FAILURE > || class_fn->common.scope != ce) { > - zend_error(E_WARNING, "Trait method %s has > not been applied, because there are collisions with other trait methods on > %s", fn->common.function_name, ce->name); > + zend_error(E_ERROR, "Trait method %s has not > been applied, because there are collisions with other trait methods on %s", > fn->common.function_name, ce->name); > } Wouldn't it make more sense to mark this as E_COMPILE_ERROR as it happens at compilation stage? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt trunk/ext/mysqli/mysqli_nonapi.c trunk/ext/mysqli/tests/b
kalleSun, 12 Dec 2010 16:17:50 + Revision: http://svn.php.net/viewvc?view=revision&revision=306266 Log: Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query) Bug: http://bugs.php.net/53503 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c A php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt U php/php-src/trunk/ext/mysqli/mysqli_nonapi.c A php/php-src/trunk/ext/mysqli/tests/bug53503.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 16:06:41 UTC (rev 306265) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 16:17:50 UTC (rev 306266) @@ -11,6 +11,10 @@ . Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values). (Felipe) +- MySQL Improved extension: + . Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA +query). (Kalle) + - PDO Oracle driver: . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on ORACLE 10). (spatar at mail dot nnov dot ru) Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 16:06:41 UTC (rev 306265) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 16:17:50 UTC (rev 306266) @@ -538,7 +538,7 @@ result = mysql_use_result(mysql->mysql); break; } - if (!result) { + if (!result && mysql_errno(mysql->mysql)) { php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql->mysql), mysql_errno(mysql->mysql) TSRMLS_CC, "%s", mysql_error(mysql->mysql)); RETURN_FALSE; Added: php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt 2010-12-12 16:17:50 UTC (rev 306266) @@ -0,0 +1,50 @@ +--TEST-- +Bug #53503 (mysqli::query returns false after successful LOAD DATA query) +--SKIPIF-- + +--FILE-- +query("DROP TABLE IF EXISTS tlocaldata")) { + printf("[002] [%d] %s\n", $link->errno, $link->error); + } + + if (!$link->query("CREATE TABLE tlocaldata (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine)) { + printf("[003] [%d] %s\n", $link->errno, $link->error); + } + + file_put_contents('bug53503.data', 'jokijoki'); + + if (!$link->query("LOAD DATA LOCAL INFILE 'bug53503.data' REPLACE INTO TABLE tlocaldata (dump1)")) { + echo "bug"; + } else { + echo "done"; + } +?> +--CLEAN-- + +--EXPECT-- +done \ No newline at end of file Modified: php/php-src/trunk/ext/mysqli/mysqli_nonapi.c === --- php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 16:06:41 UTC (rev 306265) +++ php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 16:17:50 UTC (rev 306266) @@ -526,7 +526,7 @@ result = mysql_use_result(mysql->mysql); break; } - if (!result) { + if (!result && mysql_errno(mysql->mysql)) { php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql->mysql), mysql_errno(mysql->mysql) TSRMLS_CC, "%s", mysql_error(mysql->mysql)); RETURN_FALSE; Added: php/php-src/trunk/ext/mysqli/tests/bug53503.phpt === --- php/php-src/trunk/ext/mysqli/tests/bug53503.phpt (rev 0) +++ php/php-src/trunk/ext/mysqli/tests/bug53503.phpt2010-12-12 16:17:50 UTC (rev 306266) @@ -0,0 +1,50 @@ +--TEST-- +Bug #53503 (mysqli::query returns false after successful LOAD DATA query) +--SKIPIF-- + +--FILE-- +query("DROP TABLE IF EXISTS tlocaldata")) { + printf("[002] [%d] %s\n", $link->errno, $link->error); + } + + if (!$link->query("CREATE TABLE tlocaldata (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine)) { + printf("[003] [%d] %s\n", $link->errno, $link->error); + } + + file_put_contents('bug53503.data', 'jokijoki'); + + if (!$link->query("LOAD DATA LOCAL INFILE 'bug53503.data' REPLACE INTO TABLE tlocaldata (dump1)")) { + echo "bug"; + } else { + echo "done"; + } +?> +--CLEAN-- + +--EXPECT-- +done \ No
[PHP-CVS] svn: /php/php-src/trunk/main/ SAPI.c
kalleMon, 22 Nov 2010 15:43:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=305657 Log: Fixed gettimeofday() usage for Ilia's REQUEST_TIME improvement on Windows Changed paths: U php/php-src/trunk/main/SAPI.c Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2010-11-22 15:31:15 UTC (rev 305656) +++ php/php-src/trunk/main/SAPI.c 2010-11-22 15:43:46 UTC (rev 305657) @@ -37,6 +37,8 @@ #endif #ifdef HAVE_SYS_TIME_H #include +#elif defined(PHP_WIN32) +#include "win32/time.h" #endif #include "rfc1867.h" -- 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_3/NEWS branches/PHP_5_3/ext/phar/phar.c trunk/ext/phar/phar.c
Hi Chris 2010/11/20 Christopher Jones : > Hi Ilia, > > Was the 2nd patch in the bug no longer needed? Fixed :) -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/phar/phar.c trunk/ext/phar/phar.c
kalleSat, 20 Nov 2010 20:59:28 + Revision: http://svn.php.net/viewvc?view=revision&revision=305584 Log: Added second fix from #50987 that wasn't apart of Ilia's commit Bug: http://bugs.php.net/50987 (Closed) unaligned memory access in phar.c Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/phar.c U php/php-src/trunk/ext/phar/phar.c Modified: php/php-src/branches/PHP_5_3/ext/phar/phar.c === --- php/php-src/branches/PHP_5_3/ext/phar/phar.c2010-11-20 20:36:36 UTC (rev 305583) +++ php/php-src/branches/PHP_5_3/ext/phar/phar.c2010-11-20 20:59:28 UTC (rev 305584) @@ -512,7 +512,7 @@ (buffer) += 2 #else # define PHAR_GET_32(buffer, var) \ - var = *(php_uint32*)(buffer); \ + memcpy(&var, buffer, sizeof(var)); \ buffer += 4 # define PHAR_GET_16(buffer, var) \ var = *(php_uint16*)(buffer); \ Modified: php/php-src/trunk/ext/phar/phar.c === --- php/php-src/trunk/ext/phar/phar.c 2010-11-20 20:36:36 UTC (rev 305583) +++ php/php-src/trunk/ext/phar/phar.c 2010-11-20 20:59:28 UTC (rev 305584) @@ -512,7 +512,7 @@ (buffer) += 2 #else # define PHAR_GET_32(buffer, var) \ - var = *(php_uint32*)(buffer); \ + memcpy(&var, buffer, sizeof(var)); \ buffer += 4 # define PHAR_GET_16(buffer, var) \ var = *(php_uint16*)(buffer); \ -- 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/reflection/ php_reflection.c
kalleFri, 19 Nov 2010 15:48:11 + Revision: http://svn.php.net/viewvc?view=revision&revision=305559 Log: Kill warnings about constness Changed paths: U php/php-src/trunk/ext/reflection/php_reflection.c Modified: php/php-src/trunk/ext/reflection/php_reflection.c === --- php/php-src/trunk/ext/reflection/php_reflection.c 2010-11-19 14:46:56 UTC (rev 305558) +++ php/php-src/trunk/ext/reflection/php_reflection.c 2010-11-19 15:48:11 UTC (rev 305559) @@ -3065,7 +3065,7 @@ ZEND_METHOD(reflection_function, inNamespace) { zval **name; - char *colon; + const char *backslash; if (zend_parse_parameters_none() == FAILURE) { return; @@ -3074,8 +3074,8 @@ RETURN_FALSE; } if (Z_TYPE_PP(name) == IS_STRING - && (colon = zend_memrchr(Z_STRVAL_PP(name), '\\', Z_STRLEN_PP(name))) - && colon > Z_STRVAL_PP(name)) + && (backslash = zend_memrchr(Z_STRVAL_PP(name), '\\', Z_STRLEN_PP(name))) + && backslash > Z_STRVAL_PP(name)) { RETURN_TRUE; } @@ -3088,7 +3088,7 @@ ZEND_METHOD(reflection_function, getNamespaceName) { zval **name; - char *backslash; + const char *backslash; if (zend_parse_parameters_none() == FAILURE) { return; @@ -3111,7 +3111,7 @@ ZEND_METHOD(reflection_function, getShortName) { zval **name; - char *backslash; + const char *backslash; if (zend_parse_parameters_none() == FAILURE) { return; @@ -4599,7 +4599,7 @@ ZEND_METHOD(reflection_class, inNamespace) { zval **name; - char *colon; + const char *backslash; if (zend_parse_parameters_none() == FAILURE) { return; @@ -4608,8 +4608,8 @@ RETURN_FALSE; } if (Z_TYPE_PP(name) == IS_STRING - && (colon = zend_memrchr(Z_STRVAL_PP(name), '\\', Z_STRLEN_PP(name))) - && colon > Z_STRVAL_PP(name)) + && (backslash = zend_memrchr(Z_STRVAL_PP(name), '\\', Z_STRLEN_PP(name))) + && backslash > Z_STRVAL_PP(name)) { RETURN_TRUE; } @@ -4622,7 +4622,7 @@ ZEND_METHOD(reflection_class, getNamespaceName) { zval **name; - char *backslash; + const char *backslash; if (zend_parse_parameters_none() == FAILURE) { return; @@ -4645,7 +4645,7 @@ ZEND_METHOD(reflection_class, getShortName) { zval **name; - char *backslash; + const char *backslash; if (zend_parse_parameters_none() == FAILURE) { return; -- 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/ com_dotnet/com_handlers.c phar/phar_object.c phar/util.c standard/head.c standard/string.c standard/type.c standard/var.c
kalleFri, 19 Nov 2010 16:03:00 + Revision: http://svn.php.net/viewvc?view=revision&revision=305560 Log: Kill some more constness warnings in com_dotnet/phar/standard Changed paths: U php/php-src/trunk/ext/com_dotnet/com_handlers.c U php/php-src/trunk/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/util.c U php/php-src/trunk/ext/standard/head.c U php/php-src/trunk/ext/standard/string.c U php/php-src/trunk/ext/standard/type.c U php/php-src/trunk/ext/standard/var.c Modified: php/php-src/trunk/ext/com_dotnet/com_handlers.c === --- php/php-src/trunk/ext/com_dotnet/com_handlers.c 2010-11-19 15:48:11 UTC (rev 305559) +++ php/php-src/trunk/ext/com_dotnet/com_handlers.c 2010-11-19 16:03:00 UTC (rev 305560) @@ -409,7 +409,7 @@ #define POPULATE_CTOR(f, fn) \ f.type = ZEND_INTERNAL_FUNCTION; \ - f.function_name = obj->ce->name; \ + f.function_name = (char *) obj->ce->name; \ f.scope = obj->ce; \ f.arg_info = NULL; \ f.num_args = 0; \ Modified: php/php-src/trunk/ext/phar/phar_object.c === --- php/php-src/trunk/ext/phar/phar_object.c2010-11-19 15:48:11 UTC (rev 305559) +++ php/php-src/trunk/ext/phar/phar_object.c2010-11-19 16:03:00 UTC (rev 305560) @@ -257,7 +257,8 @@ static int phar_file_action(phar_archive_data *phar, phar_entry_info *info, char *mime_type, int code, char *entry, int entry_len, char *arch, char *basename, char *ru, int ru_len TSRMLS_DC) /* {{{ */ { - char *name = NULL, buf[8192], *cwd; + char *name = NULL, buf[8192]; + const char *cwd; zend_syntax_highlighter_ini syntax_highlighter_ini; sapi_header_line ctr = {0}; size_t got; @@ -658,7 +659,8 @@ zval *mimeoverride = NULL, *rewrite = NULL; char *alias = NULL, *error, *index_php = NULL, *f404 = NULL, *ru = NULL; int alias_len = 0, ret, f404_len = 0, free_pathinfo = 0, ru_len = 0; - char *fname, *basename, *path_info, *mime_type = NULL, *entry, *pt; + char *fname, *path_info, *mime_type = NULL, *entry, *pt; + const char *basename; int fname_len, entry_len, code, index_php_len = 0, not_cgi; phar_archive_data *phar = NULL; phar_entry_info *info; @@ -934,7 +936,7 @@ } if (mimeoverride && zend_hash_num_elements(Z_ARRVAL_P(mimeoverride))) { - char *ext = zend_memrchr(entry, '.', entry_len); + const char *ext = zend_memrchr(entry, '.', entry_len); zval **val; if (ext) { @@ -2164,7 +2166,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool compress TSRMLS_DC) /* {{{ */ { - char *oldname = NULL, *oldpath = NULL; + const char *oldname = NULL; + char *oldpath = NULL; char *basename = NULL, *basepath = NULL; char *newname = NULL, *newpath = NULL; zval *ret, arg1; @@ -4204,7 +4207,8 @@ php_stream_statbuf ssb; int len; php_stream *fp; - char *fullpath, *slash; + char *fullpath; + const char *slash; mode_t mode; if (entry->is_mounted) { Modified: php/php-src/trunk/ext/phar/util.c === --- php/php-src/trunk/ext/phar/util.c 2010-11-19 15:48:11 UTC (rev 305559) +++ php/php-src/trunk/ext/phar/util.c 2010-11-19 16:03:00 UTC (rev 305560) @@ -2213,7 +2213,7 @@ void phar_add_virtual_dirs(phar_archive_data *phar, char *filename, int filename_len TSRMLS_DC) /* {{{ */ { - char *s; + const char *s; while ((s = zend_memrchr(filename, '/', filename_len))) { filename_len = s - filename; Modified: php/php-src/trunk/ext/standard/head.c === --- php/php-src/trunk/ext/standard/head.c 2010-11-19 15:48:11 UTC (rev 305559) +++ php/php-src/trunk/ext/standard/head.c 2010-11-19 16:03:00 UTC (rev 305560) @@ -123,7 +123,7 @@ } else { snprintf(cookie, len + 100, "Set-Cookie: %s=%s", name, value ? encoded_value : ""); if (expires > 0) { - char *p; + const char *p; strlcat(cookie, "; expires=", len + 100); dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0 TSRMLS_CC); /* check to make sure that the year does not exceed 4 digits in length */ Modified: php/php-src/trunk/ext/standard/string.c === --- php/php-src/trunk/ext/standard/string.c 2010-11-19 15:48:11 UTC (rev 305559) +++ php/php-src/trunk/ext/standard/string.c 2010-11-19 16:03:00 UTC (rev 305560)
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/pdo_firebird/firebird_driver.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c trunk/ext/pdo_fireb
Hi Pierre, Felipe 2010/11/17 Pierre Joye : > hi Felipe, > > The 5.2 builds are broken after this commit: This commit should be reverted in 5.2, the case PDO_ATTR_FETCH_TABLE_NAMES part. As only 5.3+ have the feature and since 5.2 is security-only I don't think it should be altered to work with it. -- regards, Kalle Sommer Nielsen ka...@php.net -- 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/ UPGRADING.INTERNALS ext/standard/basic_functions.c ext/standard/basic_functions.h main/php_streams.h main/streams/memory.c main/streams/streams.c
Hi 2010/11/15 Gustavo André dos Santos Lopes : > cataphract Mon, 15 Nov 2010 03:05:32 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=305346 > > Log: > - Added leak_variable() function. Why do we need a leak_variable() function in a regular build unlike leak() and crash() which are defined in zend_builtin_functions.c in debug mode only or did I miss something here? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/main/main.c trunk/main/main.c
kalleThu, 11 Nov 2010 01:43:53 + Revision: http://svn.php.net/viewvc?view=revision&revision=305266 Log: Added new constant; ZEND_MULTIBYTE to check whether PHP was compiled using --enable-zend-multibyte or not instead of sniffing phpinfo() (FR #52348) Bug: http://bugs.php.net/52348 (Re-Opened) Ability to detect zend multibyte mode at runtime Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/main/main.c U php/php-src/trunk/main/main.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-11-11 01:01:56 UTC (rev 305265) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-11 01:43:53 UTC (rev 305266) @@ -14,6 +14,7 @@ (Andrey) - Improved support for is_link and related functions on Windows. (Pierre) +- Implemented FR #52348, Ability to detect zend multibyte at runtime. (Kalle) - Implemented FR #52173, added functions pcntl_get_last_error() and pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud) - Implemented symbolic links support for open_basedir checks. (Pierre) Modified: php/php-src/branches/PHP_5_3/main/main.c === --- php/php-src/branches/PHP_5_3/main/main.c2010-11-11 01:01:56 UTC (rev 305265) +++ php/php-src/branches/PHP_5_3/main/main.c2010-11-11 01:43:53 UTC (rev 305266) @@ -1944,6 +1944,11 @@ REGISTER_MAIN_LONG_CONSTANT("PHP_MAXPATHLEN", MAXPATHLEN, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), CONST_PERSISTENT | CONST_CS); +#ifdef ZEND_MULTIBYTE + REGISTER_MAIN_LONG_CONSTANT("ZEND_MULTIBYTE", 1, CONST_PERSISTENT | CONST_CS); +#else + REGISTER_MAIN_LONG_CONSTANT("ZEND_MULTIBYTE", 0, CONST_PERSISTENT | CONST_CS); +#endif #ifdef PHP_WIN32 REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_MAJOR", EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS); Modified: php/php-src/trunk/main/main.c === --- php/php-src/trunk/main/main.c 2010-11-11 01:01:56 UTC (rev 305265) +++ php/php-src/trunk/main/main.c 2010-11-11 01:43:53 UTC (rev 305266) @@ -1979,6 +1979,11 @@ REGISTER_MAIN_LONG_CONSTANT("PHP_MAXPATHLEN", MAXPATHLEN, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), CONST_PERSISTENT | CONST_CS); +#ifdef ZEND_MULTIBYTE + REGISTER_MAIN_LONG_CONSTANT("ZEND_MULTIBYTE", 1, CONST_PERSISTENT | CONST_CS); +#else + REGISTER_MAIN_LONG_CONSTANT("ZEND_MULTIBYTE", 0, CONST_PERSISTENT | CONST_CS); +#endif #ifdef PHP_WIN32 REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_MAJOR", EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS); -- 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/ info.c winver.h
kalleTue, 12 Oct 2010 17:34:25 + Revision: http://svn.php.net/viewvc?view=revision&revision=304351 Log: * Added version info for Windows XP Starter/Tablet PC/Media Center editions * Fixed typo: "Unknow" -> "Unknown" * Removed useless Win9x version info # I will merge this to 5.3 once I have analyzed a possible bug # (and hopefully fixed) why Server 2008 is reported as unknown Changed paths: U php/php-src/trunk/ext/standard/info.c U php/php-src/trunk/ext/standard/winver.h Modified: php/php-src/trunk/ext/standard/info.c === --- php/php-src/trunk/ext/standard/info.c 2010-10-12 12:16:09 UTC (rev 304350) +++ php/php-src/trunk/ext/standard/info.c 2010-10-12 17:34:25 UTC (rev 304351) @@ -348,7 +348,7 @@ major = "Windows Server 2008 R2"; } } else { - major = "Unknow Windows version"; + major = "Unknown Windows version"; } pGPI = (PGPI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetProductInfo"); @@ -454,9 +454,17 @@ if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) { major = "Windows XP"; - if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) + if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) { sub = "Home Edition"; - else sub = "Professional"; + } else if (GetSystemMetrics(SM_MEDIACENTER)) { + sub = "Media Center Edition"; + } else if (GetSystemMetrics(SM_STARTER)) { + sub = "Starter Edition"; + } else if (GetSystemMetrics(SM_TABLETPC)) { + sub = "Tablet PC Edition"; + } else { + sub = "Professional"; + } } if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) { @@ -538,11 +546,7 @@ GetComputerName(ComputerName, &dwSize); if (mode == 's') { - if (dwVersion < 0x8000) { - php_uname = "Windows NT"; - } else { - php_uname = "Windows 9x"; - } + php_uname = "Windows NT"; } else if (mode == 'r') { snprintf(tmp_uname, sizeof(tmp_uname), "%d.%d", dwWindowsMajorVersion, dwWindowsMinorVersion); php_uname = tmp_uname; @@ -564,23 +568,16 @@ php_get_windows_cpu(tmp_uname, sizeof(tmp_uname)); php_uname = tmp_uname; } else { /* assume mode == 'a' */ - /* Get build numbers for Windows NT or Win95 */ - if (dwVersion < 0x8000){ - char *winver = php_get_windows_name(); - char wincpu[20]; + char *winver = php_get_windows_name(); + char wincpu[20]; - php_get_windows_cpu(wincpu, sizeof(wincpu)); - dwBuild = (DWORD)(HIWORD(dwVersion)); - snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d build %d (%s) %s", -"Windows NT", ComputerName, -dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild, winver?winver:"unknown", wincpu); - if(winver) { - efree(winver); - } - } else { - snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d", -"Windows 9x", ComputerName, -dwWindowsMajorVersion, dwWindowsMinorVersion); + php_get_windows_cpu(wincpu, sizeof(wincpu)); + dwBuild = (DWORD)(HIWORD(dwVersion)); + snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d build %d (%s) %s", +"Windows NT", ComputerName, +dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild, winver?winver:"unknown", wincpu); + if(winver) { + efree(winver); } php_uname = tmp_uname; } Modified: php/php-src/trunk/ext/standard/winver.h === --- php/php-src/trunk/ext/standard/winver.h 2010-10-12 12:16:09 UTC (rev 304350) +++ php/php-src/trunk/ext/standard/winver.h 2010-10-12 17:34:25 UTC (rev 304351) @@ -1,6 +1,15 @@ #ifndef _PHP_WINVER_H #define _PHP_WINVER_H +#ifndef SM_TABLETPC +#define SM_TABLETPC 86 +#endif +#ifndef SM_MEDIACENTER +#define SM_MEDIACENTER 87 +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/LICENSE branches/PHP_5_3/LICENSE trunk/LICENSE
kalleTue, 05 Oct 2010 22:58:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=304124 Log: Update copyright year for the license Changed paths: U php/php-src/branches/PHP_5_2/LICENSE U php/php-src/branches/PHP_5_3/LICENSE U php/php-src/trunk/LICENSE Modified: php/php-src/branches/PHP_5_2/LICENSE === --- php/php-src/branches/PHP_5_2/LICENSE2010-10-05 19:36:38 UTC (rev 304123) +++ php/php-src/branches/PHP_5_2/LICENSE2010-10-05 22:58:19 UTC (rev 304124) @@ -1,6 +1,6 @@ The PHP License, version 3.01 -Copyright (c) 1999 - 2006 The PHP Group. All rights reserved. +Copyright (c) 1999 - 2010 The PHP Group. All rights reserved. Redistribution and use in source and binary forms, with or without Modified: php/php-src/branches/PHP_5_3/LICENSE === --- php/php-src/branches/PHP_5_3/LICENSE2010-10-05 19:36:38 UTC (rev 304123) +++ php/php-src/branches/PHP_5_3/LICENSE2010-10-05 22:58:19 UTC (rev 304124) @@ -1,6 +1,6 @@ The PHP License, version 3.01 -Copyright (c) 1999 - 2009 The PHP Group. All rights reserved. +Copyright (c) 1999 - 2010 The PHP Group. All rights reserved. Redistribution and use in source and binary forms, with or without Modified: php/php-src/trunk/LICENSE === --- php/php-src/trunk/LICENSE 2010-10-05 19:36:38 UTC (rev 304123) +++ php/php-src/trunk/LICENSE 2010-10-05 22:58:19 UTC (rev 304124) @@ -1,6 +1,6 @@ The PHP License, version 3.01 -Copyright (c) 1999 - 2009 The PHP Group. All rights reserved. +Copyright (c) 1999 - 2010 The PHP Group. All rights reserved. Redistribution and use in source and binary forms, with or without -- 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/pdo_mysql/mysql_statement.c trunk/ext/pdo_mysql/mysql_statement.c
kalleTue, 05 Oct 2010 09:58:15 + Revision: http://svn.php.net/viewvc?view=revision&revision=304072 Log: Fixed constness compiler warning in pdo_mysql Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c U php/php-src/trunk/ext/pdo_mysql/mysql_statement.c Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c 2010-10-05 09:48:07 UTC (rev 304071) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c 2010-10-05 09:58:15 UTC (rev 304072) @@ -886,7 +886,7 @@ #endif add_assoc_zval(return_value, "flags", flags); - add_assoc_string(return_value, "table",(F->table?F->table:""), 1); + add_assoc_string(return_value, "table",(char *) (F->table?F->table:""), 1); PDO_DBG_RETURN(SUCCESS); } /* }}} */ Modified: php/php-src/trunk/ext/pdo_mysql/mysql_statement.c === --- php/php-src/trunk/ext/pdo_mysql/mysql_statement.c 2010-10-05 09:48:07 UTC (rev 304071) +++ php/php-src/trunk/ext/pdo_mysql/mysql_statement.c 2010-10-05 09:58:15 UTC (rev 304072) @@ -867,7 +867,7 @@ #endif add_assoc_zval(return_value, "flags", flags); - add_assoc_string(return_value, "table",(F->table?F->table:""), 1); + add_assoc_string(return_value, "table", (char *) (F->table?F->table:""), 1); PDO_DBG_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/mysql/ php_mysql.c
kalleTue, 05 Oct 2010 09:48:07 + Revision: http://svn.php.net/viewvc?view=revision&revision=304071 Log: Fix constness warnings Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c === --- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c 2010-10-05 09:40:36 UTC (rev 304070) +++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c 2010-10-05 09:48:07 UTC (rev 304071) @@ -2370,8 +2370,8 @@ } object_init(return_value); - add_property_string(return_value, "name",(mysql_field->name?mysql_field->name:""), 1); - add_property_string(return_value, "table",(mysql_field->table?mysql_field->table:""), 1); + add_property_string(return_value, "name", (char *) (mysql_field->name?mysql_field->name:""), 1); + add_property_string(return_value, "table",(char *) (mysql_field->table?mysql_field->table:""), 1); add_property_string(return_value, "def",(mysql_field->def?mysql_field->def:""), 1); add_property_long(return_value, "max_length", mysql_field->max_length); add_property_long(return_value, "not_null", IS_NOT_NULL(mysql_field->flags)?1: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/ext/mysqli/mysqli_api.c branches/PHP_5_3/ext/mysqli/mysqli_prop.c trunk/ext/mysqli/mysqli.c trunk/ext/mysqli/mysqli_prop.c trunk/ext/mysqli/mysqli_result_
kalleTue, 05 Oct 2010 09:40:36 + Revision: http://svn.php.net/viewvc?view=revision&revision=304070 Log: Fixed compiler warnings in mysqli - mysqli.c: Fix unused variables, they are only used in non-mysqlnd mode - mysqli_api.c (PHP_5_3 only): Fix constness, add_property_string expects a char *, not a const char * - mysqli_prop.c: Cast to long, as its below the LONG_MAX and therefore safe - mysqli_result_iterator.c: Cast to ulong as the iterator member expects that rather than a my_longlong # In trunk only warnings regarding the zend_property_info # structure is present and PHP_5_3 is warning free now Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c U php/php-src/trunk/ext/mysqli/mysqli.c U php/php-src/trunk/ext/mysqli/mysqli_prop.c U php/php-src/trunk/ext/mysqli/mysqli_result_iterator.c Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2010-10-05 09:20:03 UTC (rev 304069) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2010-10-05 09:40:36 UTC (rev 304070) @@ -1047,11 +1047,11 @@ /* {{{ php_add_field_properties */ static void php_add_field_properties(zval *value, const MYSQL_FIELD *field TSRMLS_DC) { - add_property_string(value, "name",(field->name ? field->name : ""), 1); - add_property_string(value, "orgname",(field->org_name ? field->org_name : ""), 1); - add_property_string(value, "table",(field->table ? field->table : ""), 1); - add_property_string(value, "orgtable",(field->org_table ? field->org_table : ""), 1); - add_property_string(value, "def",(field->def ? field->def : ""), 1); + add_property_string(value, "name", (char *) (field->name ? field->name : ""), 1); + add_property_string(value, "orgname", (char *) (field->org_name ? field->org_name : ""), 1); + add_property_string(value, "table", (char *) (field->table ? field->table : ""), 1); + add_property_string(value, "orgtable", (char *) (field->org_table ? field->org_table : ""), 1); + add_property_string(value, "def", (field->def ? field->def : ""), 1); add_property_long(value, "max_length", field->max_length); add_property_long(value, "length", field->length); Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c 2010-10-05 09:20:03 UTC (rev 304069) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c 2010-10-05 09:40:36 UTC (rev 304070) @@ -84,7 +84,7 @@ } else {\ l = (__ret_type)__int_func(p);\ if (l < LONG_MAX) {\ - ZVAL_LONG(*retval, l);\ + ZVAL_LONG(*retval, (long) l);\ } else { \ char *ret; \ int ret_len = spprintf(&ret, 0, __ret_type_sprint_mod, l); \ @@ -178,7 +178,7 @@ } if (rc < LONG_MAX) { - ZVAL_LONG(*retval, rc); + ZVAL_LONG(*retval, (long) rc); } else { char *ret; int l = spprintf(&ret, 0, MYSQLI_LLU_SPEC, rc); @@ -295,7 +295,7 @@ } if (rc < LONG_MAX) { - ZVAL_LONG(*retval, rc); + ZVAL_LONG(*retval, (long) rc); } else { char *ret; int l = spprintf(&ret, 0, MYSQLI_LLU_SPEC, rc); Modified: php/php-src/trunk/ext/mysqli/mysqli.c === --- php/php-src/trunk/ext/mysqli/mysqli.c 2010-10-05 09:20:03 UTC (rev 304069) +++ php/php-src/trunk/ext/mysqli/mysqli.c 2010-10-05 09:40:36 UTC (rev 304070) @@ -1087,12 +1087,12 @@ */ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, long fetchtype TSRMLS_DC) { +#if !defined(MYSQLI_USE_MYSQLND) MYSQL_ROW row; unsigned inti; MYSQL_FIELD *fields; unsigned long *field_len; - -#if !defined(MYSQLI_USE_MYSQLND) + if (!(row = mysql_fetch_row(result))) { RETURN_NULL(); } Modified: php/php-src/trunk/ext/mysqli/mysqli_prop.c === --- php/php-src/trunk/ext/mysqli/mysqli_prop.c 2010-10-05 09:20:03 UTC (rev 304069) +++ php/php-src/trunk/ext/mysqli/mysqli_prop.c 2010-10-05 09:40:36 UTC (rev 304070) @@ -84,7 +84,7 @@ } else {\ l = (__ret_type)__int_func(p);\ if (l < LONG_MAX) {\ - ZVAL_LONG(*retval, l);\ +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c trunk/ext/mysqlnd/mysqlnd_net.c
kalleMon, 04 Oct 2010 21:04:25 + Revision: http://svn.php.net/viewvc?view=revision&revision=304038 Log: We do not need this TSRMLS_FETCH() call as we do not use any TSRM stuff in here, so we can get a minor boost here in ZTS mode. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c 2010-10-04 20:33:58 UTC (rev 304037) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c 2010-10-04 21:04:25 UTC (rev 304038) @@ -48,7 +48,6 @@ int ret = SUCCESS; int flag = 1; int result = setsockopt(socketd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int)); - TSRMLS_FETCH(); DBG_ENTER("mysqlnd_set_sock_no_delay"); Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2010-10-04 20:33:58 UTC (rev 304037) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2010-10-04 21:04:25 UTC (rev 304038) @@ -48,7 +48,6 @@ int ret = SUCCESS; int flag = 1; int result = setsockopt(socketd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int)); - TSRMLS_FETCH(); DBG_ENTER("mysqlnd_set_sock_no_delay"); -- 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/ basic_functions.c
kalleMon, 04 Oct 2010 20:33:58 + Revision: http://svn.php.net/viewvc?view=revision&revision=304037 Log: Skipped this one Changed paths: U php/php-src/trunk/ext/standard/basic_functions.c Modified: php/php-src/trunk/ext/standard/basic_functions.c === --- php/php-src/trunk/ext/standard/basic_functions.c2010-10-04 20:26:50 UTC (rev 304036) +++ php/php-src/trunk/ext/standard/basic_functions.c2010-10-04 20:33:58 UTC (rev 304037) @@ -2831,7 +2831,7 @@ PHP_FE(getrandmax, arginfo_getrandmax) PHP_FE(mt_rand, arginfo_mt_rand) PHP_FE(mt_srand, arginfo_mt_srand) - PHP_DEP_FE(mt_getrandmax, arginfo_mt_getrandmax) + PHP_FE(mt_getrandmax, arginfo_mt_getrandmax) #if HAVE_GETSERVBYNAME PHP_FE(getservbyname, arginfo_getservbyname) -- 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 UPGRADING ext/standard/basic_functions.c
kalleMon, 04 Oct 2010 20:26:50 + Revision: http://svn.php.net/viewvc?view=revision&revision=304036 Log: Revert for now Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING U php/php-src/trunk/ext/standard/basic_functions.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-10-04 20:20:30 UTC (rev 304035) +++ php/php-src/trunk/NEWS 2010-10-04 20:26:50 UTC (rev 304036) @@ -101,9 +101,6 @@ - Improved the performance of unserialize(). (galaxy dot mipt at gmail dot com, Kalle) -- Added PHP_RAND_MAX & PHP_MT_RAND_MAX constants to get the maximum random - range instead of their counterpart functions. (Kalle) - - Removed legacy features: . allow_call_time_pass_reference. (Pierrick) . define_syslog_variables ini option and its associated function. (Kalle) @@ -122,7 +119,6 @@ PDO_mysql. (Johannes) - Deprecated mysql_list_dbs() (Request #50667). (Andrey) -- Deprecated getrandmax() & mt_getrandmax() in favour of constants. (Kalle) - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis) - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark) Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2010-10-04 20:20:30 UTC (rev 304035) +++ php/php-src/trunk/UPGRADING 2010-10-04 20:26:50 UTC (rev 304036) @@ -8,7 +8,6 @@ 4. Changes made to existing methods 5. Changes made to existing classes 6. Deprecated - a. deprecated functions 7. Extensions: a. moved out to PECL and actively maintained there b. no longer maintained @@ -110,11 +109,6 @@ 6. Deprecated = -a. deprecated functions - - - getrandmax() -- use the PHP_RAND_MAX constant - - mt_getrandmax() -- use the PHP_MT_RAND_MAX constant - == 7. Removed == @@ -241,8 +235,6 @@ - JSON_PRETTY_PRINT - JSON_UNESCAPED_SLASHES - - PHP_RAND_MAX - - PHP_MT_RAND_MAX g. New classes Modified: php/php-src/trunk/ext/standard/basic_functions.c === --- php/php-src/trunk/ext/standard/basic_functions.c2010-10-04 20:20:30 UTC (rev 304035) +++ php/php-src/trunk/ext/standard/basic_functions.c2010-10-04 20:26:50 UTC (rev 304036) @@ -33,7 +33,6 @@ #include "ext/session/php_session.h" #include "zend_operators.h" #include "ext/standard/php_dns.h" -#include "ext/standard/php_rand.h" #include "ext/standard/php_uuencode.h" #ifdef PHP_WIN32 @@ -2829,7 +2828,7 @@ PHP_FE(rand, arginfo_rand) PHP_FE(srand, arginfo_srand) - PHP_DEP_FE(getrandmax, arginfo_getrandmax) + PHP_FE(getrandmax, arginfo_getrandmax) PHP_FE(mt_rand, arginfo_mt_rand) PHP_FE(mt_srand, arginfo_mt_srand) PHP_DEP_FE(mt_getrandmax, arginfo_mt_getrandmax) @@ -3552,9 +3551,6 @@ REGISTER_MATH_CONSTANT(M_SQRT3); REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | CONST_PERSISTENT); REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | CONST_PERSISTENT); - - REGISTER_MATH_CONSTANT(PHP_RAND_MAX); - REGISTER_MATH_CONSTANT(PHP_MT_RAND_MAX); REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_UP", PHP_ROUND_HALF_UP, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_DOWN", PHP_ROUND_HALF_DOWN, CONST_CS | CONST_PERSISTENT); -- 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/Zend/ zend_alloc.c
Hi Dmitry 2010/10/4 Dmitry Stogov : > dmitry Mon, 04 Oct 2010 15:50:47 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=304031 > > Log: > Bug #51155 (Unreasonable non-emalloc allocations of memory) This commit causes these new warnings to appear from zend_alloc.c: Zend\zend_alloc.c(845) : warning C4047: '==' : '_zend_mm_free_block **' differs in levels of indirection from 'zend_mm_free_block *' Zend\zend_alloc.c(871) : warning C4047: '=' : '_zend_mm_free_block **' differs in levels of indirection from 'zend_mm_free_block *' -- regards, Kalle Sommer Nielsen ka...@php.net -- 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_3/ext/mysqlnd/php_mysqlnd.c trunk/ext/mysqlnd/php_mysqlnd.c
; : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(375) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(376) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(376) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(377) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(377) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(395) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(395) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(396) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(396) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(397) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(397) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(398) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(398) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(399) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(399) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(400) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(400) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(401) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(401) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(402) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(402) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(403) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(403) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(404) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_prop.c(404) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_report.c(50) : warning C4013: 'php_mysqli_throw_sql_exception' undefined; assuming extern returning int ext\mysqli\mysqli_warning.c(334) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_warning.c(334) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_warning.c(335) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_warning.c(335) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_warning.c(336) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_warning.c(336) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_warning.c(337) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_warning.c(337) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' ext\mysqli\mysqli_result_iterator.c(157) : warning C4244: '=' : conversion from 'my_longlong' to 'ulong', possible loss of data These are all compiled using php-trunk r303980. Since all the mysql extensions are in sync, I'm sure they appear on PHP_5_3 aswell. Also, while you are at it, would you mind killing the ones in mysqlnd aswell? ext\mysqlnd\mysqlnd_ps_codec.c(87) : warning C4244: '=' : conversion from 'uint64_t' to 'long', possible loss of data ext\mysqlnd\mysqlnd_ps_codec.c(115) : warning C4244: '=' : conversion from 'int64_t' to 'long', possible loss of data ext\mysqlnd\mysqlnd_result.c(45) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'unsigned int', possible loss of data ext\mysqlnd\mysqlnd_result.c(52) : warning C4018: '<' : signed/unsigned mismatch ext\mysqlnd\mysqlnd_result.c(208) : warning C4244: '=' : conversion from 'uint64_t' to 'int', possible loss of data ext\mysqlnd\mysqlnd_result.c(1186) : warning C4244: 'function' : conversion from 'uint64_t' to 'size_t', possible loss of data ext\mysqlnd\mysqlnd_result.c(1213) : warning C4244: 'function' : conversion from 'uint64_t' to 'size_t', possible loss of data ext\mysqlnd\mysqlnd_result.c(1219) : warning C4244: 'function' : conversion from 'uint64_t' to 'size_t', possible loss of data ext\mysqlnd\mysqlnd_result.c(1236) : warning C4244: 'function' : conversion from 'uint64_t' to 'size_t', possible loss of data ext\mysqlnd\mysqlnd_result.c(1593) : warning C4244: 'function' : conversion from 'uint64_t' to 'uint', possible loss of data ext\mysqlnd\mysqlnd_result_meta.c(246) : warning C4090: 'function' : different 'const' qualifiers ext\mysqlnd\mysqlnd_wireprotocol.c(246) : warning C4018: '<' : signed/unsigned mismatch ext\mysqlnd\mysqlnd_wireprotocol.c(1142) : warning C4244: 'function' : conversion from 'uint64_t' to 'unsigned int', possible loss of data ext\mysqlnd\mysqlnd_wireprotocol.c(1160) : warning C4244: 'function' : conversion from 'uint64_t' to 'unsigned int', possible loss of data ext\mysqlnd\mysqlnd_wireprotocol.c(1297) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'size_t', possible loss of data ext\mysqlnd\mysqlnd_wireprotocol.c(1395) : warning C4244: '=' : conversion from 'int64_t' to 'long', possible loss of data ext\mysqlnd\mysqlnd_wireprotocol.c(1417) : warning C4244: '=' : conversion from 'int64_t' to 'long', possible loss of data ext\mysqlnd\mysqlnd_wireprotocol.c(1551) : warning C4244: '=' : conversion from 'uint64_t' to 'size_t', possible loss of data ext\mysqlnd\mysqlnd_wireprotocol.c(1561) : warning C4244: 'function' : conversion from 'uint64_t' to 'size_t', possible loss of data Thanks -- regards, Kalle Sommer Nielsen ka...@php.net -- 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 UPGRADING ext/standard/basic_functions.c
> What is the reasoning behind that? It could be possible that the > max/min has to be defined at runtime at some point. Define at runtime? The values those functions expose are from compile time constants. I do not see why we need a function call to get a statically defined value. Also, there is no min value -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
kalleFri, 01 Oct 2010 09:18:44 + Revision: http://svn.php.net/viewvc?view=revision&revision=303912 Log: * Added PHP_RAND_MAX and PHP_MT_RAND_MAX constants * Deprecated getrandmax() and mt_getrandmax() in favour of the new constants # We should promote constants for static data like such instead of function calls # maybe this was just an old left-over Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING U php/php-src/trunk/ext/standard/basic_functions.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-10-01 08:54:16 UTC (rev 303911) +++ php/php-src/trunk/NEWS 2010-10-01 09:18:44 UTC (rev 303912) @@ -101,6 +101,9 @@ - Improved the performance of unserialize(). (galaxy dot mipt at gmail dot com, Kalle) +- Added PHP_RAND_MAX & PHP_MT_RAND_MAX constants to get the maximum random + range instead of their counterpart functions. (Kalle) + - Removed legacy features: . allow_call_time_pass_reference. (Pierrick) . define_syslog_variables ini option and its associated function. (Kalle) @@ -119,6 +122,7 @@ PDO_mysql. (Johannes) - Deprecated mysql_list_dbs() (Request #50667). (Andrey) +- Deprecated getrandmax() & mt_getrandmax() in favour of constants. (Kalle) - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis) - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark) Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2010-10-01 08:54:16 UTC (rev 303911) +++ php/php-src/trunk/UPGRADING 2010-10-01 09:18:44 UTC (rev 303912) @@ -8,6 +8,7 @@ 4. Changes made to existing methods 5. Changes made to existing classes 6. Deprecated + a. deprecated functions 7. Extensions: a. moved out to PECL and actively maintained there b. no longer maintained @@ -109,8 +110,11 @@ 6. Deprecated = -- +a. deprecated functions + - getrandmax() -- use the PHP_RAND_MAX constant + - mt_getrandmax() -- use the PHP_MT_RAND_MAX constant + == 7. Removed == @@ -237,6 +241,8 @@ - JSON_PRETTY_PRINT - JSON_UNESCAPED_SLASHES + - PHP_RAND_MAX + - PHP_MT_RAND_MAX g. New classes Modified: php/php-src/trunk/ext/standard/basic_functions.c === --- php/php-src/trunk/ext/standard/basic_functions.c2010-10-01 08:54:16 UTC (rev 303911) +++ php/php-src/trunk/ext/standard/basic_functions.c2010-10-01 09:18:44 UTC (rev 303912) @@ -33,6 +33,7 @@ #include "ext/session/php_session.h" #include "zend_operators.h" #include "ext/standard/php_dns.h" +#include "ext/standard/php_rand.h" #include "ext/standard/php_uuencode.h" #ifdef PHP_WIN32 @@ -2828,8 +2829,8 @@ PHP_FE(rand, arginfo_rand) PHP_FE(srand, arginfo_srand) - PHP_FE(getrandmax, arginfo_getrandmax) - PHP_FE(mt_rand, arginfo_mt_rand) + PHP_DEP_FE(getrandmax, arginfo_getrandmax) + PHP_DEP_FE(mt_rand, arginfo_mt_rand) PHP_FE(mt_srand, arginfo_mt_srand) PHP_FE(mt_getrandmax, arginfo_mt_getrandmax) @@ -3551,6 +3552,9 @@ REGISTER_MATH_CONSTANT(M_SQRT3); REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | CONST_PERSISTENT); REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | CONST_PERSISTENT); + + REGISTER_MATH_CONSTANT(PHP_RAND_MAX); + REGISTER_MATH_CONSTANT(PHP_MT_RAND_MAX); REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_UP", PHP_ROUND_HALF_UP, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_DOWN", PHP_ROUND_HALF_DOWN, CONST_CS | CONST_PERSISTENT); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS ext/date/php_date.c ext/date/php_date.h
kalleMon, 27 Sep 2010 01:19:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=303773 Log: Removed a TSRMLS_FETCH() call in php_idate() in favor of the TSRMLS macros Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS U php/php-src/trunk/ext/date/php_date.c U php/php-src/trunk/ext/date/php_date.h Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-26 20:46:54 UTC (rev 303772) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-27 01:19:57 UTC (rev 303773) @@ -99,4 +99,8 @@ . php_get_current_user PHPAPI php_get_current_user(TSRMLS_D) - Call: char *user = php_get_current_user(TSRMLS_C); \ No newline at end of file + Call: char *user = php_get_current_user(TSRMLS_C); + +. php_idate + PHPAPI php_idate(char format, time_t ts, int localtime TSRMLS_DC) + Call: int ret = php_idate(format, ts, localtime TSRMLS_CC) \ No newline at end of file Modified: php/php-src/trunk/ext/date/php_date.c === --- php/php-src/trunk/ext/date/php_date.c 2010-09-26 20:46:54 UTC (rev 303772) +++ php/php-src/trunk/ext/date/php_date.c 2010-09-27 01:19:57 UTC (rev 303773) @@ -1203,7 +1203,7 @@ /* {{{ php_idate */ -PHPAPI int php_idate(char format, time_t ts, int localtime) +PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC) { timelib_time *t; timelib_tzinfo *tzi; @@ -1214,7 +1214,6 @@ t = timelib_time_ctor(); if (!localtime) { - TSRMLS_FETCH(); tzi = get_timezone_info(TSRMLS_C); t->tz_info = tzi; t->zone_type = TIMELIB_ZONETYPE_ID; @@ -1336,7 +1335,7 @@ ts = time(NULL); } - ret = php_idate(format[0], ts, 0); + ret = php_idate(format[0], ts, 0 TSRMLS_CC); if (ret == -1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date format token."); RETURN_FALSE; Modified: php/php-src/trunk/ext/date/php_date.h === --- php/php-src/trunk/ext/date/php_date.h 2010-09-26 20:46:54 UTC (rev 303772) +++ php/php-src/trunk/ext/date/php_date.h 2010-09-27 01:19:57 UTC (rev 303773) @@ -163,7 +163,7 @@ /* Backwards compability wrapper */ PHPAPI signed long php_parse_date(char *string, signed long *now); PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt); -PHPAPI int php_idate(char format, time_t ts, int localtime); +PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC); #if HAVE_STRFTIME #define _php_strftime php_strftime PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm); -- 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/pdo_dblib/ dblib_stmt.c
Hi Stanley 2010/9/26 Stanley Sufficool : > ssufficool Sun, 26 Sep 2010 20:16:25 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=303771 > > Log: > Update getColumnMeta native types for SQL Server 2008 > > Changed paths: > U php/php-src/trunk/ext/pdo_dblib/dblib_stmt.c > > Modified: php/php-src/trunk/ext/pdo_dblib/dblib_stmt.c > === > --- php/php-src/trunk/ext/pdo_dblib/dblib_stmt.c 2010-09-26 16:20:11 > UTC (rev 303770) > +++ php/php-src/trunk/ext/pdo_dblib/dblib_stmt.c 2010-09-26 20:16:25 > UTC (rev 303771) > @@ -35,60 +35,47 @@ > > /* {{{ pdo_dblib_get_field_name > * > + case 127: return "bigint"; > + //case 240: return "hierarchyid"; > + case 240: return "geometry"; > + //case 240: return "geography"; > + case 165: return "varbinary"; > + case 167: return "varchar"; > + case 173: return "binary"; > + case 175: return "char"; > + case 189: return "timestamp"; > + //case 231: return "sysname"; Please use C multi line comments ( /* */ ) or #if 0 blocks for C90 compatiblity :) -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ array.c crypt_blowfish.c crypt_sha256.c crypt_sha512.c html.c iptc.c url_scanner_ex.c url_scanner_ex.re
kalleThu, 23 Sep 2010 03:45:36 + Revision: http://svn.php.net/viewvc?view=revision&revision=303703 Log: Fixed compiler warnings in the standard library Changed paths: U php/php-src/trunk/ext/standard/array.c U php/php-src/trunk/ext/standard/crypt_blowfish.c U php/php-src/trunk/ext/standard/crypt_sha256.c U php/php-src/trunk/ext/standard/crypt_sha512.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/ext/standard/iptc.c U php/php-src/trunk/ext/standard/url_scanner_ex.c U php/php-src/trunk/ext/standard/url_scanner_ex.re Modified: php/php-src/trunk/ext/standard/array.c === --- php/php-src/trunk/ext/standard/array.c 2010-09-23 03:33:36 UTC (rev 303702) +++ php/php-src/trunk/ext/standard/array.c 2010-09-23 03:45:36 UTC (rev 303703) @@ -629,7 +629,7 @@ PHP_FUNCTION(usort) { zval *array; - int refcount; + unsigned int refcount; PHP_ARRAY_CMP_FUNC_VARS; PHP_ARRAY_CMP_FUNC_BACKUP(); @@ -672,7 +672,7 @@ PHP_FUNCTION(uasort) { zval *array; - int refcount; + unsigned int refcount; PHP_ARRAY_CMP_FUNC_VARS; PHP_ARRAY_CMP_FUNC_BACKUP(); @@ -768,7 +768,7 @@ PHP_FUNCTION(uksort) { zval *array; - int refcount; + unsigned int refcount; PHP_ARRAY_CMP_FUNC_VARS; PHP_ARRAY_CMP_FUNC_BACKUP(); Modified: php/php-src/trunk/ext/standard/crypt_blowfish.c === --- php/php-src/trunk/ext/standard/crypt_blowfish.c 2010-09-23 03:33:36 UTC (rev 303702) +++ php/php-src/trunk/ext/standard/crypt_blowfish.c 2010-09-23 03:45:36 UTC (rev 303703) @@ -745,7 +745,7 @@ output[1] = '2'; output[2] = 'a'; output[3] = '$'; - output[4] = '0' + count / 10; + output[4] = (char) ('0' + count / 10); output[5] = '0' + count % 10; output[6] = '$'; Modified: php/php-src/trunk/ext/standard/crypt_sha256.c === --- php/php-src/trunk/ext/standard/crypt_sha256.c 2010-09-23 03:33:36 UTC (rev 303702) +++ php/php-src/trunk/ext/standard/crypt_sha256.c 2010-09-23 03:45:36 UTC (rev 303703) @@ -470,7 +470,7 @@ sha256_init_ctx(&alt_ctx); /* For every character in the password add the entire password. */ - for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt) { + for (cnt = 0; cnt < (size_t) (16 + alt_result[0]); ++cnt) { sha256_process_bytes(salt, salt_len, &alt_ctx); } Modified: php/php-src/trunk/ext/standard/crypt_sha512.c === --- php/php-src/trunk/ext/standard/crypt_sha512.c 2010-09-23 03:33:36 UTC (rev 303702) +++ php/php-src/trunk/ext/standard/crypt_sha512.c 2010-09-23 03:45:36 UTC (rev 303703) @@ -506,7 +506,7 @@ sha512_init_ctx(&alt_ctx); /* For every character in the password add the entire password. */ - for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt) { + for (cnt = 0; cnt < (size_t) (16 + alt_result[0]); ++cnt) { sha512_process_bytes(salt, salt_len, &alt_ctx); } Modified: php/php-src/trunk/ext/standard/html.c === --- php/php-src/trunk/ext/standard/html.c 2010-09-23 03:33:36 UTC (rev 303702) +++ php/php-src/trunk/ext/standard/html.c 2010-09-23 03:45:36 UTC (rev 303703) @@ -915,8 +915,8 @@ */ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC) { - int retlen; - int j, k; + int retlen, j; + unsigned int k; char *replaced, *ret, *p, *q, *lim, *next; enum entity_charset charset = determine_charset(hint_charset TSRMLS_CC); unsigned char replacement[15]; @@ -1355,7 +1355,7 @@ if (!memcmp(p, basic_entities_dec[j].entity, basic_entities_dec[j].entitylen)) { int e_len = basic_entities_dec[j].entitylen - 1; - *p++ = basic_entities_dec[j].charcode; + *p++ = (char) basic_entities_dec[j].charcode; memmove(p, p + e_len, (e - p - e_len)); e -= e_len; goto done; @@ -1412,7 +1412,8 @@ PHP_FUNCTION(get_html_translation_table) { long which = HTML_SPECIALCHARS, quote_style = ENT_COMPAT; - int i, j; + unsigned int i; + int j; char ind[2]; enum entity_charset charset = determine_charset(NULL TSRMLS_CC); Modified: php/php-src/trunk/ext/standard/iptc.c === --- php/php-src/trunk/ext/sta
[PHP-CVS] svn: /php/php-src/trunk/ext/ereg/ ereg.c
kalleThu, 23 Sep 2010 04:51:02 + Revision: http://svn.php.net/viewvc?view=revision&revision=303711 Log: Eliminate a TSRMLS_FETCH() call in case of an error in one of the ereg functions Changed paths: U php/php-src/trunk/ext/ereg/ereg.c Modified: php/php-src/trunk/ext/ereg/ereg.c === --- php/php-src/trunk/ext/ereg/ereg.c 2010-09-23 04:50:26 UTC (rev 303710) +++ php/php-src/trunk/ext/ereg/ereg.c 2010-09-23 04:51:02 UTC (rev 303711) @@ -246,7 +246,7 @@ /* {{{ php_ereg_eprint * php_ereg_eprint - convert error number to name */ -static void php_ereg_eprint(int err, regex_t *re) { +static void php_ereg_eprint(int err, regex_t *re TSRMLS_DC) { char *buf = NULL, *message = NULL; size_t len; size_t buf_len; @@ -265,8 +265,6 @@ #endif len = regerror(err, re, NULL, 0); if (len) { - TSRMLS_FETCH(); - message = (char *)safe_emalloc((buf_len + len + 2), sizeof(char), 0); if (!message) { return; /* fail silently */ @@ -330,7 +328,7 @@ } if (err) { - php_ereg_eprint(err, &re); + php_ereg_eprint(err, &re TSRMLS_CC); RETURN_FALSE; } @@ -343,7 +341,7 @@ /* actually execute the regular expression */ err = regexec(&re, string, re.re_nsub+1, subs, 0); if (err && err != REG_NOMATCH) { - php_ereg_eprint(err, &re); + php_ereg_eprint(err, &re TSRMLS_CC); regfree(&re); efree(subs); RETURN_FALSE; @@ -426,7 +424,7 @@ err = regcomp(&re, pattern, copts); if (err) { - php_ereg_eprint(err, &re); + php_ereg_eprint(err, &re TSRMLS_CC); return ((char *) -1); } @@ -445,7 +443,7 @@ err = regexec(&re, &string[pos], re.re_nsub+1, subs, (pos ? REG_NOTBOL : 0)); if (err && err != REG_NOMATCH) { - php_ereg_eprint(err, &re); + php_ereg_eprint(err, &re TSRMLS_CC); efree(subs); efree(buf); regfree(&re); @@ -649,7 +647,7 @@ err = regcomp(&re, spliton, REG_EXTENDED | copts); if (err) { - php_ereg_eprint(err, &re); + php_ereg_eprint(err, &re TSRMLS_CC); RETURN_FALSE; } @@ -693,7 +691,7 @@ /* see if we encountered an error */ if (err && err != REG_NOMATCH) { - php_ereg_eprint(err, &re); + php_ereg_eprint(err, &re TSRMLS_CC); regfree(&re); zend_hash_destroy(Z_ARRVAL_P(return_value)); efree(Z_ARRVAL_P(return_value)); -- 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/com_dotnet/ com_persist.c
kalleThu, 23 Sep 2010 04:50:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=303710 Log: There are a few cases where we can save a TSRMLS_FETCH() call here Changed paths: U php/php-src/trunk/ext/com_dotnet/com_persist.c Modified: php/php-src/trunk/ext/com_dotnet/com_persist.c === --- php/php-src/trunk/ext/com_dotnet/com_persist.c 2010-09-23 04:41:14 UTC (rev 303709) +++ php/php-src/trunk/ext/com_dotnet/com_persist.c 2010-09-23 04:50:26 UTC (rev 303710) @@ -58,13 +58,18 @@ TSRMLS_FETCH(); \ if (GetCurrentThreadId() != stm->engine_thread) \ return RPC_E_WRONG_THREAD; + +#define FETCH_STM_EX() \ + php_istream *stm = (php_istream*)This; \ + if (GetCurrentThreadId() != stm->engine_thread) \ + return RPC_E_WRONG_THREAD; static HRESULT STDMETHODCALLTYPE stm_queryinterface( IStream *This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject) { - FETCH_STM(); + FETCH_STM_EX(); if (IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IStream, riid)) { @@ -79,7 +84,7 @@ static ULONG STDMETHODCALLTYPE stm_addref(IStream *This) { - FETCH_STM(); + FETCH_STM_EX(); return InterlockedIncrement(&stm->refcount); } @@ -184,7 +189,7 @@ static HRESULT STDMETHODCALLTYPE stm_copy_to(IStream *This, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) { - FETCH_STM(); + FETCH_STM_EX(); return E_NOTIMPL; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS ext/mysql/php_mysql.c ext/mysqlnd/mysqlnd.c ext/soap/php_sdl.c ext/standard/basic_functions.c main/main.c main/php.h
kalleThu, 23 Sep 2010 04:13:36 + Revision: http://svn.php.net/viewvc?view=revision&revision=303708 Log: Added TSRMLS macros into php_get_current_user() Changed paths: UU php/php-src/trunk/UPGRADING.INTERNALS U php/php-src/trunk/ext/mysql/php_mysql.c U php/php-src/trunk/ext/mysqlnd/mysqlnd.c U php/php-src/trunk/ext/soap/php_sdl.c U php/php-src/trunk/ext/standard/basic_functions.c U php/php-src/trunk/main/main.c U php/php-src/trunk/main/php.h Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-23 04:08:34 UTC (rev 303707) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-23 04:13:36 UTC (rev 303708) @@ -96,3 +96,7 @@ . popen_ex (win32) TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC); + +. php_get_current_user + PHPAPI php_get_current_user(TSRMLS_D) + Call: char *user = php_get_current_user(TSRMLS_C); \ No newline at end of file Property changes on: php/php-src/trunk/UPGRADING.INTERNALS ___ Added: svn:eol-style + native Modified: php/php-src/trunk/ext/mysql/php_mysql.c === --- php/php-src/trunk/ext/mysql/php_mysql.c 2010-09-23 04:08:34 UTC (rev 303707) +++ php/php-src/trunk/ext/mysql/php_mysql.c 2010-09-23 04:13:36 UTC (rev 303708) @@ -735,7 +735,7 @@ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "SQL safe mode in effect - ignoring host/user/password information"); } host_and_port=passwd=NULL; - user=php_get_current_user(); + user=php_get_current_user(TSRMLS_C); hashed_details_length = spprintf(&hashed_details, 0, "mysql__%s_", user); client_flags = CLIENT_INTERACTIVE; } else { Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2010-09-23 04:08:34 UTC (rev 303707) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2010-09-23 04:13:36 UTC (rev 303708) @@ -27,8 +27,6 @@ #include "mysqlnd_statistics.h" #include "mysqlnd_charset.h" #include "mysqlnd_debug.h" -/* for php_get_current_user() */ -#include "ext/standard/basic_functions.h" /* TODO : Modified: php/php-src/trunk/ext/soap/php_sdl.c === --- php/php-src/trunk/ext/soap/php_sdl.c2010-09-23 04:08:34 UTC (rev 303707) +++ php/php-src/trunk/ext/soap/php_sdl.c2010-09-23 04:13:36 UTC (rev 303708) @@ -3192,7 +3192,7 @@ unsigned char digest[16]; int len = strlen(SOAP_GLOBAL(cache_dir)); time_t cached; - char *user = php_get_current_user(); + char *user = php_get_current_user(TSRMLS_C); int user_len = user ? strlen(user) + 1 : 0; md5str[0] = '\0'; Modified: php/php-src/trunk/ext/standard/basic_functions.c === --- php/php-src/trunk/ext/standard/basic_functions.c2010-09-23 04:08:34 UTC (rev 303707) +++ php/php-src/trunk/ext/standard/basic_functions.c2010-09-23 04:13:36 UTC (rev 303708) @@ -4471,7 +4471,7 @@ return; } - RETURN_STRING(php_get_current_user(), 1); + RETURN_STRING(php_get_current_user(TSRMLS_C), 1); } /* }}} */ Modified: php/php-src/trunk/main/main.c === --- php/php-src/trunk/main/main.c 2010-09-23 04:08:34 UTC (rev 303707) +++ php/php-src/trunk/main/main.c 2010-09-23 04:13:36 UTC (rev 303708) @@ -1087,10 +1087,9 @@ /* {{{ php_get_current_user */ -PHPAPI char *php_get_current_user(void) +PHPAPI char *php_get_current_user(TSRMLS_D) { struct stat *pstat; - TSRMLS_FETCH(); if (SG(request_info).current_user) { return SG(request_info).current_user; Modified: php/php-src/trunk/main/php.h === --- php/php-src/trunk/main/php.h2010-09-23 04:08:34 UTC (rev 303707) +++ php/php-src/trunk/main/php.h2010-09-23 04:13:36 UTC (rev 303708) @@ -329,7 +329,7 @@ PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC); PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata); PHPAPI void php_com_initialize(TSRMLS_D); -PHPAPI char *php_get_current_user(void); +PHPAPI char *php_get_current_user(TSRMLS_D); END_EXTERN_C() /* PHP-named Zend macro wrappers */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visi
[PHP-CVS] svn: /php/php-src/trunk/ext/dom/ document.c
kalleThu, 23 Sep 2010 03:54:54 + Revision: http://svn.php.net/viewvc?view=revision&revision=303706 Log: Cast to char * here Changed paths: U php/php-src/trunk/ext/dom/document.c Modified: php/php-src/trunk/ext/dom/document.c === --- php/php-src/trunk/ext/dom/document.c2010-09-23 03:50:41 UTC (rev 303705) +++ php/php-src/trunk/ext/dom/document.c2010-09-23 03:54:54 UTC (rev 303706) @@ -1211,7 +1211,7 @@ nsptr = xmlSearchNsByHref (nodep->doc, root, nodep->ns->href); if (nsptr == NULL) { int errorcode; - nsptr = dom_get_ns(root, nodep->ns->href, &errorcode, nodep->ns->prefix); + nsptr = dom_get_ns(root, (char *) nodep->ns->href, &errorcode, (char *) nodep->ns->prefix); } xmlSetNs(retnodep, nsptr); } -- 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/ var.c
kalleThu, 23 Sep 2010 03:49:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=303704 Log: Missed to check this one in the last commit Changed paths: U php/php-src/trunk/ext/standard/var.c Modified: php/php-src/trunk/ext/standard/var.c === --- php/php-src/trunk/ext/standard/var.c2010-09-23 03:45:36 UTC (rev 303703) +++ php/php-src/trunk/ext/standard/var.c2010-09-23 03:49:26 UTC (rev 303704) @@ -401,7 +401,7 @@ smart_str_appends(buf, prop_name); smart_str_appendc(buf, '\''); } else { - smart_str_append_long(buf, hash_key->h); + smart_str_append_long(buf, (long) hash_key->h); } smart_str_appendl(buf, " => ", 4); php_var_export_ex(zv, level + 2, buf TSRMLS_CC); -- 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/hash/ hash_tiger.c
kalleThu, 23 Sep 2010 03:33:36 + Revision: http://svn.php.net/viewvc?view=revision&revision=303702 Log: Fixed signedness compiler warning Changed paths: U php/php-src/trunk/ext/hash/hash_tiger.c Modified: php/php-src/trunk/ext/hash/hash_tiger.c === --- php/php-src/trunk/ext/hash/hash_tiger.c 2010-09-23 02:10:26 UTC (rev 303701) +++ php/php-src/trunk/ext/hash/hash_tiger.c 2010-09-23 03:33:36 UTC (rev 303702) @@ -120,7 +120,7 @@ { \ register php_hash_uint64 a, b, c, tmpa, x0, x1, x2, x3, x4, x5, x6, x7; \ php_hash_uint64 aa, bb, cc; \ - int pass_no; \ + unsigned int pass_no; \ \ a = state[0]; \ b = state[1]; \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
kalleSun, 19 Sep 2010 19:18:30 + Revision: http://svn.php.net/viewvc?view=revision&revision=303577 Log: Fix incompatible types, we need to use a char here for recv() Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-19 19:08:56 UTC (rev 303576) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-19 19:18:30 UTC (rev 303577) @@ -1108,7 +1108,7 @@ DisconnectNamedPipe(pipe); } else { if (!force) { - fcgi_header buf; + char buf; shutdown(req->fd, 1); /* read the last FCGI_STDIN header (it may be omitted) */ -- 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/standard/php_var.h ext/standard/var_unserializer.c ext/standard/var_unserializer.re
kalleSat, 18 Sep 2010 16:09:28 + Revision: http://svn.php.net/viewvc?view=revision&revision=303503 Log: Improved performance of unserialize(), original patch by galaxy dot mipt at gmail dot com Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/standard/php_var.h U php/php-src/trunk/ext/standard/var_unserializer.c U php/php-src/trunk/ext/standard/var_unserializer.re Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-09-18 16:05:00 UTC (rev 303502) +++ php/php-src/trunk/NEWS 2010-09-18 16:09:28 UTC (rev 303503) @@ -97,6 +97,8 @@ . Don't terminate shell on fatal errors. - Improved ext/zlib: re-implemented non-file related functionality. (Mike) - Improved output layer. See README.NEW-OUTPUT-API for internals. (Mike) +- Improved the performance of unserialize(). (galaxy dot mipt at gmail dot com, + Kalle) - Removed legacy features: . allow_call_time_pass_reference. (Pierrick) Modified: php/php-src/trunk/ext/standard/php_var.h === --- php/php-src/trunk/ext/standard/php_var.h 2010-09-18 16:05:00 UTC (rev 303502) +++ php/php-src/trunk/ext/standard/php_var.h 2010-09-18 16:09:28 UTC (rev 303503) @@ -42,7 +42,9 @@ struct php_unserialize_data { void *first; + void *last; void *first_dtor; + void *last_dtor; }; typedef struct php_unserialize_data* php_unserialize_data_t; Modified: php/php-src/trunk/ext/standard/var_unserializer.c === --- php/php-src/trunk/ext/standard/var_unserializer.c 2010-09-18 16:05:00 UTC (rev 303502) +++ php/php-src/trunk/ext/standard/var_unserializer.c 2010-09-18 16:09:28 UTC (rev 303503) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Fri Aug 6 19:20:07 2010 */ +/* Generated by re2c 0.13.5 on Sat Sep 18 17:59:40 2010 */ #line 1 "ext/standard/var_unserializer.re" /* +--+ @@ -35,25 +35,23 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval) { - var_entries *var_hash = (*var_hashx)->first, *prev = NULL; + var_entries *var_hash = (*var_hashx)->last; #if 0 fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval)); #endif - - while (var_hash && var_hash->used_slots == VAR_ENTRIES_MAX) { - prev = var_hash; - var_hash = var_hash->next; - } - if (!var_hash) { + if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) { var_hash = emalloc(sizeof(var_entries)); var_hash->used_slots = 0; var_hash->next = 0; - if (!(*var_hashx)->first) + if (!(*var_hashx)->first) { (*var_hashx)->first = var_hash; - else - prev->next = var_hash; + } else { + ((var_entries *) (*var_hashx)->last)->next = var_hash; + } + + (*var_hashx)->last = var_hash; } var_hash->data[var_hash->used_slots++] = *rval; @@ -61,25 +59,23 @@ PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) { - var_entries *var_hash = (*var_hashx)->first_dtor, *prev = NULL; + var_entries *var_hash = (*var_hashx)->last_dtor; #if 0 fprintf(stderr, "var_push_dtor(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval)); #endif - - while (var_hash && var_hash->used_slots == VAR_ENTRIES_MAX) { - prev = var_hash; - var_hash = var_hash->next; - } - if (!var_hash) { + if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) { var_hash = emalloc(sizeof(var_entries)); var_hash->used_slots = 0; var_hash->next = 0; - if (!(*var_hashx)->first_dtor) + if (!(*var_hashx)->first_dtor) { (*var_hashx)->first_dtor = var_hash; - else - prev->next = var_hash; + } else { + ((var_entries *) (*var_hashx)->last_dtor)->next = var_hash; + } + + (*var_hashx)->last_dtor = var_hash; } Z_ADDREF_PP(rval); @@ -205,7 +201,7 @@ #define YYMARKER marker -#line 213 "ext/standard/var_unserializer.re" +#line 209 "ext/standard/var_unserializer.re" @@ -411,43 +407,9 @@ -#line 415 "ext/standard/var_unserializer.c" +#line 411 "ext/standard/var_unserializer.c" { YYCTYPE yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/var.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/var.c trunk/ext/standard/var.c
kalleMon, 13 Sep 2010 20:14:18 + Revision: http://svn.php.net/viewvc?view=revision&revision=303330 Log: Fixed bug #52772 (var_dump() doesn't check for the existence of get_class_name before calling it) Bug: http://bugs.php.net/52772 (Open) var_dump() doesn't check for the existence of get_class_name before calling it Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/standard/var.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/var.c U php/php-src/trunk/ext/standard/var.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-09-13 19:08:36 UTC (rev 303329) +++ php/php-src/branches/PHP_5_2/NEWS 2010-09-13 20:14:18 UTC (rev 303330) @@ -3,6 +3,8 @@ ?? ??? 2010, PHP 5.2.15 - Fixed possible crash in mssql_fetch_batch(). (Kalle) +- Fixed bug #52772 (var_dump() doesn't check for the existence of + get_class_name before calling it). (Kalle, Gustavo) - Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values). (Felipe, Adam) - Fixed bug #52436 (Compile error if systems do not have stdint.h) Modified: php/php-src/branches/PHP_5_2/ext/standard/var.c === --- php/php-src/branches/PHP_5_2/ext/standard/var.c 2010-09-13 19:08:36 UTC (rev 303329) +++ php/php-src/branches/PHP_5_2/ext/standard/var.c 2010-09-13 20:14:18 UTC (rev 303330) @@ -140,9 +140,13 @@ return; } - Z_OBJ_HANDLER(**struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); - php_printf("%sobject(%s)#%d (%d) {\n", COMMON, class_name, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0); - efree(class_name); + if (Z_OBJ_HANDLER(**struc, get_class_name)) { + Z_OBJ_HANDLER(**struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); + php_printf("%sobject(%s)#%d (%d) {\n", COMMON, class_name, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0); + efree(class_name); + } else { + php_printf("%sobject(unknown class)#%d (%d) {\n", COMMON, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0); + } php_element_dump_func = php_object_property_dump; head_done: if (myht) { Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-13 19:08:36 UTC (rev 303329) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-13 20:14:18 UTC (rev 303330) @@ -23,6 +23,8 @@ - Fixed bug #52786 (PHP should reset section to [PHP] after ini sections). (Fedora at famillecollet dot com) +- Fixed bug #52772 (var_dump() doesn't check for the existence of + get_class_name before calling it). (Kalle, Gustavo) - Fixed bug #52744 (cal_days_in_month incorrect for December 1 BCE). (gpap at internet dot gr, Adam) - Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they Modified: php/php-src/branches/PHP_5_3/ext/standard/var.c === --- php/php-src/branches/PHP_5_3/ext/standard/var.c 2010-09-13 19:08:36 UTC (rev 303329) +++ php/php-src/branches/PHP_5_3/ext/standard/var.c 2010-09-13 20:14:18 UTC (rev 303330) @@ -284,9 +284,13 @@ return; } ce = Z_OBJCE_PP(struc); - Z_OBJ_HANDLER_PP(struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); - php_printf("%sobject(%s)#%d (%d) refcount(%u){\n", COMMON, class_name, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0, Z_REFCOUNT_PP(struc)); - efree(class_name); + if (Z_OBJ_HANDLER_PP(struc, get_class_name)) { + Z_OBJ_HANDLER_PP(struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); + php_printf("%sobject(%s)#%d (%d) refcount(%u){\n", COMMON, class_name, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0, Z_REFCOUNT_PP(struc)); + efree(class_name); + } else { + php_printf("%sobject(unknown class)#%d (%d) refcount(%u){\n", COMMON, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0, Z_REFCOUNT_PP(struc)); + } zval_element_dump_func = zval_object_property_dump; head_done: if (myht) { Modified: php/php-src/trunk/ext/standard/var.c === --- php/php-src/trunk/ext/standard/var.c2010-09-13 19:08:3
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h trunk/ext/mysqlnd/mysqlnd_structs.h
Hi 2010/9/1 Andrey Hristov : > andrey Wed, 01 Sep 2010 16:54:20 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=302980 > > Log: > fix build on windows, seems this macro is not defined > Wouldn't it be easier to just define SIZEOF_CHAR_P to 4 in config.w32.h.in as it default is? Something like: size_t sizeof_ptr(char *ptr) { return sizeof(ptr); } and test like: char test = "Something something"; size_t test_size = sizeof_ptr(test); Guess it could be done better or staticlly :) -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/simplexml/simplexml.c trunk/ext/simplexml/simplexml.c
kalleSat, 21 Aug 2010 16:22:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=302614 Log: Fixed bug #52655 (SimpleXMLIterator supports ArrayAccess without implementing the interface) Bug: http://bugs.php.net/52655 (Assigned) SimpleXMLIterator supports ArrayAccess without implementing Interface Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c U php/php-src/trunk/ext/simplexml/simplexml.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-08-21 16:19:30 UTC (rev 302613) +++ php/php-src/branches/PHP_5_3/NEWS 2010-08-21 16:22:46 UTC (rev 302614) @@ -12,7 +12,9 @@ - Changed the $context parameter on copy() to actually have an effect. (Kalle) - Fixed possible crash in mssql_fetch_batch(). (Kalle) -- Fixed bug #52654 mysqli doesn't install headers with structures it uses. +- Fixed bug #52655 (SimpleXMLIterator supports ArrayAccess without implementing + the interface). (Kalle) +- Fixed bug #52654 (mysqli doesn't install headers with structures it uses). (Andrey) - Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). (Kalle, rein at basefarm dot no) Modified: php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c === --- php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c 2010-08-21 16:19:30 UTC (rev 302613) +++ php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c 2010-08-21 16:22:46 UTC (rev 302614) @@ -2536,7 +2536,7 @@ sxe_class_entry = zend_register_internal_class(&sxe TSRMLS_CC); sxe_class_entry->get_iterator = php_sxe_get_iterator; sxe_class_entry->iterator_funcs.funcs = &php_sxe_iterator_funcs; - zend_class_implements(sxe_class_entry TSRMLS_CC, 1, zend_ce_traversable); + zend_class_implements(sxe_class_entry TSRMLS_CC, 2, zend_ce_traversable, zend_ce_arrayaccess); sxe_object_handlers.get_method = zend_get_std_object_handlers()->get_method; sxe_object_handlers.get_constructor = zend_get_std_object_handlers()->get_constructor; sxe_object_handlers.get_class_entry = zend_get_std_object_handlers()->get_class_entry; Modified: php/php-src/trunk/ext/simplexml/simplexml.c === --- php/php-src/trunk/ext/simplexml/simplexml.c 2010-08-21 16:19:30 UTC (rev 302613) +++ php/php-src/trunk/ext/simplexml/simplexml.c 2010-08-21 16:22:46 UTC (rev 302614) @@ -2536,7 +2536,7 @@ sxe_class_entry = zend_register_internal_class(&sxe TSRMLS_CC); sxe_class_entry->get_iterator = php_sxe_get_iterator; sxe_class_entry->iterator_funcs.funcs = &php_sxe_iterator_funcs; - zend_class_implements(sxe_class_entry TSRMLS_CC, 1, zend_ce_traversable); + zend_class_implements(sxe_class_entry TSRMLS_CC, 2, zend_ce_traversable, zend_ce_arrayaccess); sxe_object_handlers.get_method = zend_get_std_object_handlers()->get_method; sxe_object_handlers.get_constructor = zend_get_std_object_handlers()->get_constructor; sxe_object_handlers.get_class_entry = zend_get_std_object_handlers()->get_class_entry; -- 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_2/ NEWS ext/mysql/php_mysql.c
kalleSat, 21 Aug 2010 16:19:30 + Revision: http://svn.php.net/viewvc?view=revision&revision=302613 Log: Revert fix for #52636 in 5.2 Bug: http://bugs.php.net/52636 (Closed) php_mysql_fetch_hash writes long value into int Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-08-21 16:09:18 UTC (rev 302612) +++ php/php-src/branches/PHP_5_2/NEWS 2010-08-21 16:19:30 UTC (rev 302613) @@ -3,8 +3,6 @@ ?? ??? 2010, PHP 5.2.15 - Fixed possible crash in mssql_fetch_batch(). (Kalle) -- Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). - (Kalle, rein at basefarm dot no) - Fixed bug #52436 (Compile error if systems do not have stdint.h) (Sriram Natarajan) - Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle) Modified: php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c === --- php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c 2010-08-21 16:09:18 UTC (rev 302612) +++ php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c 2010-08-21 16:19:30 UTC (rev 302613) @@ -1884,7 +1884,7 @@ /* {{{ php_mysql_fetch_hash */ -static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, int expected_args, int into_object) +static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int expected_args, int into_object) { zval **result, **arg2; MYSQL_RES *mysql_result; -- 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_3/NEWS branches/PHP_5_3/ext/iconv/iconv.c trunk/ext/iconv/iconv.c
Hi Ilia 2010/8/19 Ilia Alshanetsky : > - php_output_handler_alias_register(ZEND_STRL("ob_iconv_handler"), > php_iconv_output_handler_init TSRMLS_CC); > + php_output_handler_alias_register(ZEND_STRL("ob_iconv_handlerÂ"), > php_iconv_output_handler_init TSRMLS_CC); > php_output_handler_conflict_register(ZEND_STRL("ob_iconv_handler"), > php_iconv_output_conflict TSRMLS_CC); This doesn't look correct, or is it just me? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/NEWS PHP_5_3/NEWS
kalleWed, 18 Aug 2010 20:26:42 + Revision: http://svn.php.net/viewvc?view=revision&revision=302458 Log: Use userland function name, not internal name for NEWS Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-08-18 20:16:05 UTC (rev 302457) +++ php/php-src/branches/PHP_5_2/NEWS 2010-08-18 20:26:42 UTC (rev 302458) @@ -1,7 +1,7 @@ PHP NEWS ||| ?? ??? 2010, PHP 5.2.15 -- Fixed possible crash in php_mssql_get_column_content_without_type(). (Kalle) +- Fixed possible crash in mssql_fetch_batch(). (Kalle) - Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). (Kalle, rein at basefarm dot no) Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-08-18 20:16:05 UTC (rev 302457) +++ php/php-src/branches/PHP_5_3/NEWS 2010-08-18 20:26:42 UTC (rev 302458) @@ -11,7 +11,7 @@ (Kalle) - Changed the $context parameter on copy() to actually have an effect. (Kalle) -- Fixed possible crash in php_mssql_get_column_content_without_type(). (Kalle) +- Fixed possible crash in mssql_fetch_batch(). (Kalle) - Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). (Kalle, rein at basefarm dot no) -- 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_2/NEWS branches/PHP_5_2/ext/mssql/php_mssql.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mssql/php_mssql.c trunk/ext/mssql/php_mssql.c
kalleWed, 18 Aug 2010 20:16:05 + Revision: http://svn.php.net/viewvc?view=revision&revision=302457 Log: Fixed possible crash in php_mssql_get_column_content_without_type() # Also fix NEWS entry in PHP_5_2 for previous commit Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/mssql/php_mssql.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.c U php/php-src/trunk/ext/mssql/php_mssql.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-08-18 20:00:18 UTC (rev 302456) +++ php/php-src/branches/PHP_5_2/NEWS 2010-08-18 20:16:05 UTC (rev 302457) @@ -1,6 +1,10 @@ PHP NEWS ||| ?? ??? 2010, PHP 5.2.15 +- Fixed possible crash in php_mssql_get_column_content_without_type(). (Kalle) + +- Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). + (Kalle, rein at basefarm dot no) - Fixed bug #52436 (Compile error if systems do not have stdint.h) (Sriram Natarajan) - Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle) @@ -33,8 +37,6 @@ PDOStatement if instantiated directly instead of doing by the PDO methods. (Felipe) -- Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). - (Kalle, rein at basefarm dot no) - Fixed bug #52317 (Segmentation fault when using mail() on a rhel 4.x (only 64 bit)). (Adam) - Fixed bug #52238 (Crash when an Exception occured in iterator_to_array). Modified: php/php-src/branches/PHP_5_2/ext/mssql/php_mssql.c === --- php/php-src/branches/PHP_5_2/ext/mssql/php_mssql.c 2010-08-18 20:00:18 UTC (rev 302456) +++ php/php-src/branches/PHP_5_2/ext/mssql/php_mssql.c 2010-08-18 20:16:05 UTC (rev 302457) @@ -979,6 +979,14 @@ unsigned char *res_buf; int res_length = dbdatlen(mssql_ptr->link, offset); + if (res_length == 0) { + ZVAL_NULL(result); + return; + } else if (res_length < 0) { + ZVAL_FALSE(result); + return; + } + res_buf = (unsigned char *) emalloc(res_length+1); bin = ((DBBINARY *)dbdata(mssql_ptr->link, offset)); memcpy(res_buf, bin, res_length); Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-08-18 20:00:18 UTC (rev 302456) +++ php/php-src/branches/PHP_5_3/NEWS 2010-08-18 20:16:05 UTC (rev 302457) @@ -11,6 +11,8 @@ (Kalle) - Changed the $context parameter on copy() to actually have an effect. (Kalle) +- Fixed possible crash in php_mssql_get_column_content_without_type(). (Kalle) + - Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). (Kalle, rein at basefarm dot no) - Fixed bug #52613 (crash in mysqlnd after hitting memory limit). (Andrey) Modified: php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.c === --- php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.c 2010-08-18 20:00:18 UTC (rev 302456) +++ php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.c 2010-08-18 20:16:05 UTC (rev 302457) @@ -1059,6 +1059,14 @@ unsigned char *res_buf; int res_length = dbdatlen(mssql_ptr->link, offset); + if (res_length == 0) { + ZVAL_NULL(result); + return; + } else if (res_length < 0) { + ZVAL_FALSE(result); + return; + } + res_buf = (unsigned char *) emalloc(res_length+1); bin = ((DBBINARY *)dbdata(mssql_ptr->link, offset)); res_buf[res_length] = '\0'; Modified: php/php-src/trunk/ext/mssql/php_mssql.c === --- php/php-src/trunk/ext/mssql/php_mssql.c 2010-08-18 20:00:18 UTC (rev 302456) +++ php/php-src/trunk/ext/mssql/php_mssql.c 2010-08-18 20:16:05 UTC (rev 302457) @@ -1059,6 +1059,14 @@ unsigned char *res_buf; int res_length = dbdatlen(mssql_ptr->link, offset); + if (res_length == 0) { + ZVAL_NULL(result); + return; + } else if (res_length < 0) { + ZVAL_FALSE(result); + return; + } + res_buf = (unsigned char *) emalloc(res_length+1); bin = ((DBBINARY *)dbdata(mssql_ptr->link, offset));
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/mysql/php_mysql.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysql/php_mysql.c trunk/ext/mysql/php_mysql.c
kalleWed, 18 Aug 2010 20:00:18 + Revision: http://svn.php.net/viewvc?view=revision&revision=302456 Log: Fixed bug #52636 (php_mysql_fetch_hash writes long value into int) # Tested by rein at basefarm dot no Bug: http://bugs.php.net/52636 (Assigned) php_mysql_fetch_hash writes long value into int Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c U php/php-src/trunk/ext/mysql/php_mysql.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-08-18 19:29:58 UTC (rev 302455) +++ php/php-src/branches/PHP_5_2/NEWS 2010-08-18 20:00:18 UTC (rev 302456) @@ -33,6 +33,8 @@ PDOStatement if instantiated directly instead of doing by the PDO methods. (Felipe) +- Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). + (Kalle, rein at basefarm dot no) - Fixed bug #52317 (Segmentation fault when using mail() on a rhel 4.x (only 64 bit)). (Adam) - Fixed bug #52238 (Crash when an Exception occured in iterator_to_array). Modified: php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c === --- php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c 2010-08-18 19:29:58 UTC (rev 302455) +++ php/php-src/branches/PHP_5_2/ext/mysql/php_mysql.c 2010-08-18 20:00:18 UTC (rev 302456) @@ -1884,7 +1884,7 @@ /* {{{ php_mysql_fetch_hash */ -static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int expected_args, int into_object) +static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, int expected_args, int into_object) { zval **result, **arg2; MYSQL_RES *mysql_result; Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-08-18 19:29:58 UTC (rev 302455) +++ php/php-src/branches/PHP_5_3/NEWS 2010-08-18 20:00:18 UTC (rev 302456) @@ -11,6 +11,8 @@ (Kalle) - Changed the $context parameter on copy() to actually have an effect. (Kalle) +- Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). + (Kalle, rein at basefarm dot no) - Fixed bug #52613 (crash in mysqlnd after hitting memory limit). (Andrey) - Fixed bug #52573 (SplFileObject::fscanf Segmentation fault). (Felipe) - Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values). Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c === --- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c 2010-08-18 19:29:58 UTC (rev 302455) +++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c 2010-08-18 20:00:18 UTC (rev 302456) @@ -2006,7 +2006,7 @@ /* {{{ php_mysql_fetch_hash */ -static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int expected_args, int into_object) +static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, int expected_args, int into_object) { MYSQL_RES *mysql_result; zval*res, *ctor_params = NULL; Modified: php/php-src/trunk/ext/mysql/php_mysql.c === --- php/php-src/trunk/ext/mysql/php_mysql.c 2010-08-18 19:29:58 UTC (rev 302455) +++ php/php-src/trunk/ext/mysql/php_mysql.c 2010-08-18 20:00:18 UTC (rev 302456) @@ -2008,7 +2008,7 @@ /* {{{ php_mysql_fetch_hash */ -static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int expected_args, int into_object) +static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, int expected_args, int into_object) { MYSQL_RES *mysql_result; zval*res, *ctor_params = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
kalleWed, 18 Aug 2010 18:00:33 + Revision: http://svn.php.net/viewvc?view=revision&revision=302451 Log: Nuke compiler warning, wrong fix that shouldn't have been in the previously commit Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-18 16:54:47 UTC (rev 302450) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-18 18:00:33 UTC (rev 302451) @@ -848,7 +848,7 @@ val_len |= *p++; } if (UNEXPECTED(name_len + val_len < 0) || - UNEXPECTED((unsigned char *) (name_len + val_len) > end - p)) { + UNEXPECTED(name_len + val_len > (unsigned int) (end - p))) { /* Malformated request */ ret = 0; break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php