[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Mon Apr 16 01:31:03 2007 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2659r2=1.2660diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2659 php-src/ChangeLog:1.2660 --- php-src/ChangeLog:1.2659Sun Apr 15 01:31:03 2007 +++ php-src/ChangeLog Mon Apr 16 01:31:02 2007 @@ -1,3 +1,30 @@ +2007-04-15 Jani Taskinen [EMAIL PROTECTED] + +* sapi/cgi/cgi_main.c: + MFB: Allow using syntax highlighting in fastcgi mode + +* sapi/cgi/getopt.c + sapi/cgi/php_getopt.h: + MFB: sync getopt from CLI + +* (PHP_5_2) + sapi/cgi/cgi_main.c: + - Allow using syntax highlighting under FastCGI mode. + +* (PHP_5_2) + sapi/cgi/getopt.c + sapi/cgi/php_getopt.h: + - Synch these files from sapi/cli/ and allow using s.c. long-options +with CGI. + +2007-04-15 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ext/pdo_mysql/mysql_statement.c: + Fixed bug #40935 (pdo_mysql does not raise an exception on empty + fetchAll()). + 2007-04-14 Pierre-Alain Joye [EMAIL PROTECTED] * (PHP_5_2)
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/pdo_mysql mysql_statement.c
iliaa Sun Apr 15 16:50:42 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/pdo_mysql mysql_statement.c Log: Fixed bug #40935 (pdo_mysql does not raise an exception on empty fetchAll()). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.649r2=1.2027.2.547.2.650diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.649 php-src/NEWS:1.2027.2.547.2.650 --- php-src/NEWS:1.2027.2.547.2.649 Sat Apr 14 17:39:13 2007 +++ php-src/NEWSSun Apr 15 16:50:41 2007 @@ -10,6 +10,8 @@ (Johannes) - Fixed bug #41034 (json_encode() ignores null byte started keys in arrays). (Ilia) +- Fixed bug #40935 (pdo_mysql does not raise an exception on empty + fetchAll()). (Ilia) - Fixed bug #40861 (strtotime() doesn't handle double negative relative time units correctly). (Derick) - Fixed bug #40290 (strtotime() returns unexpected result with particular http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.48.2.14.2.4r2=1.48.2.14.2.5diff_format=u Index: php-src/ext/pdo_mysql/mysql_statement.c diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.4 php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.5 --- php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.14.2.4 Sun Apr 8 15:26:21 2007 +++ php-src/ext/pdo_mysql/mysql_statement.c Sun Apr 15 16:50:42 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mysql_statement.c,v 1.48.2.14.2.4 2007/04/08 15:26:21 iliaa Exp $ */ +/* $Id: mysql_statement.c,v 1.48.2.14.2.5 2007/04/15 16:50:42 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -413,6 +413,7 @@ #endif if (!S-result) { + strcpy(stmt-error_code, HY000); return 0; } if ((S-current_data = mysql_fetch_row(S-result)) == NULL) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/pdo_mysql mysql_statement.c
Ilia Alshanetsky wrote: iliaa Sun Apr 15 16:50:42 2007 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/pdo_mysql mysql_statement.c Log: Fixed bug #40935 (pdo_mysql does not raise an exception on empty fetchAll()). Why should there be an exception for a fetchAll() call in an empty result? Or am I misunderstanding the commit message? regards, Lukas -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/pdo_mysql mysql_statement.c
Its not really an empty results, but rather a fetchAll() on a result of an exec() statement where there is no result set. Without emulation enabled this generates a proper error (as indicated in the bug report), however with emulation enabled it does not report any errors. This patch fixes that misbehavior. On 15-Apr-07, at 1:03 PM, Lukas Kahwe Smith wrote: Ilia Alshanetsky wrote: iliaa Sun Apr 15 16:50:42 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/pdo_mysql mysql_statement.c Log: Fixed bug #40935 (pdo_mysql does not raise an exception on empty fetchAll()). Why should there be an exception for a fetchAll() call in an empty result? Or am I misunderstanding the commit message? regards, Lukas Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli_nonapi.c
Privet, Antony Dovgal wrote: On 04/15/2007 12:11 AM, Andrey Hristov wrote: http://php.net/mysqli_ping mysqli_ping, mysqli-ping()  Pings a server connection, or *tries to reconnect if the connection has gone down* Then the fix is wrong, it should set reconnect only for the mysql_ping call, if reconnect is off. Could you please be more verbose? What's wrong setting it always? The docs say it's off by default. mysqli.reconnect ini setting is not respected, it's set to off, by default. You set during connect reconnect to 1, which is not what is wanted. mysql(i) is an interface on top of libmysql (so far in released versions) and follows the rules of libmysql. The documentation should be fixed that as of libmysql 5.0.3 mysqli_ping() won't reestablish the connection if the ini variable mysqli.reconnect is off. As far as I understand, there is no way to fix it in versions between 5.0.3 and 5.0.13 because of MySQLI API breakage. It's just about setting mysql-reconnect in this cases. This versions won't change anyway, they are released. Right. We need to set it somehow, but MYSQL_OPT_RECONNECT is missing in these versions. If you know how to do it - let me know. No need to patch, documentation has to be fixed. Andrey -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi getopt.c php_getopt.h
sniper Sun Apr 15 22:50:58 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cgi getopt.c php_getopt.h Log: - Synch these files from sapi/cli/ and allow using s.c. long-options with CGI. http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/getopt.c?r1=1.9.2.1.2.1r2=1.9.2.1.2.2diff_format=u Index: php-src/sapi/cgi/getopt.c diff -u php-src/sapi/cgi/getopt.c:1.9.2.1.2.1 php-src/sapi/cgi/getopt.c:1.9.2.1.2.2 --- php-src/sapi/cgi/getopt.c:1.9.2.1.2.1 Mon Jan 1 09:36:12 2007 +++ php-src/sapi/cgi/getopt.c Sun Apr 15 22:50:58 2007 @@ -16,6 +16,8 @@ +--+ */ +/* $Id: getopt.c,v 1.9.2.1.2.2 2007/04/15 22:50:58 sniper Exp $ */ + #include stdio.h #include string.h #include assert.h @@ -77,29 +79,34 @@ } if ((argv[*optind][0] == '-') (argv[*optind][1] == '-')) { /* '--' indicates end of args if not followed by a known long option name */ + if (argv[*optind][2] == '\0') { + (*optind)++; + return(EOF); + } + while (1) { opts_idx++; if (opts[opts_idx].opt_char == '-') { (*optind)++; - return(EOF); + return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); } else if (opts[opts_idx].opt_name !strcmp(argv[*optind][2], opts[opts_idx].opt_name)) { break; } } optchr = 0; - dash = 1; - arg_start = 2 + strlen(opts[opts_idx].opt_name); - } - if (!dash) { - dash = 1; - optchr = 1; - } - - /* Check if the guy tries to do a -: kind of flag */ - if (argv[*optind][optchr] == ':') { dash = 0; - (*optind)++; - return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); + arg_start = 2 + strlen(opts[opts_idx].opt_name); + } else { + if (!dash) { + dash = 1; + optchr = 1; + } + /* Check if the guy tries to do a -: kind of flag */ + if (argv[*optind][optchr] == ':') { + dash = 0; + (*optind)++; + return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); + } } if (opts_idx 0) { while (1) { http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/php_getopt.h?r1=1.7.2.1.2.1r2=1.7.2.1.2.2diff_format=u Index: php-src/sapi/cgi/php_getopt.h diff -u php-src/sapi/cgi/php_getopt.h:1.7.2.1.2.1 php-src/sapi/cgi/php_getopt.h:1.7.2.1.2.2 --- php-src/sapi/cgi/php_getopt.h:1.7.2.1.2.1 Mon Jan 1 09:36:12 2007 +++ php-src/sapi/cgi/php_getopt.h Sun Apr 15 22:50:58 2007 @@ -16,8 +16,17 @@ +--+ */ +/* $Id: php_getopt.h,v 1.7.2.1.2.2 2007/04/15 22:50:58 sniper Exp $ */ + #include php.h +#ifdef NETWARE +/* +As NetWare LibC has optind and optarg macros defined in unistd.h our local variables were getting mistakenly preprocessed so undeffing optind and optarg +*/ +#undef optarg +#undef optind +#endif /* Define structure for one recognized option (both single char and long name). * If short_open is '-' this is the last option. */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi cgi_main.c
sniper Sun Apr 15 22:52:07 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cgi cgi_main.c Log: - Allow using syntax highlighting under FastCGI mode. http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.32r2=1.267.2.15.2.33diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.32 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.33 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.32 Thu Mar 29 18:47:04 2007 +++ php-src/sapi/cgi/cgi_main.c Sun Apr 15 22:52:07 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.32 2007/03/29 18:47:04 pollita Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.33 2007/04/15 22:52:07 sniper Exp $ */ #include php.h #include php_globals.h @@ -1224,6 +1224,10 @@ } break; #endif + case 's': /* generate highlighted HTML from source */ + behavior = PHP_MODE_HIGHLIGHT; + break; + } } @@ -1524,10 +1528,6 @@ no_headers = 1; break; - case 's': /* generate highlighted HTML from source */ - behavior = PHP_MODE_HIGHLIGHT; - break; - case 'v': /* show php version quit */ no_headers = 1; if (php_request_startup(TSRMLS_C) == FAILURE) { @@ -1737,9 +1737,17 @@ if (open_file_for_scanning(file_handle TSRMLS_CC) == SUCCESS) { php_get_highlight_struct(syntax_highlighter_ini); zend_highlight(syntax_highlighter_ini TSRMLS_CC); - fclose(file_handle.handle.fp); - php_end_ob_buffers(1 TSRMLS_CC); +#if PHP_FASTCGI + if (!fastcgi) +#endif + { + fclose(file_handle.handle.fp); + php_end_ob_buffers(1 TSRMLS_CC); + } } +#if PHP_FASTCGI + if (!fastcgi) +#endif return SUCCESS; } break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cgi getopt.c php_getopt.h
sniper Sun Apr 15 22:54:27 2007 UTC Modified files: /php-src/sapi/cgi getopt.c php_getopt.h Log: MFB: sync getopt from CLI http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/getopt.c?r1=1.11r2=1.12diff_format=u Index: php-src/sapi/cgi/getopt.c diff -u php-src/sapi/cgi/getopt.c:1.11 php-src/sapi/cgi/getopt.c:1.12 --- php-src/sapi/cgi/getopt.c:1.11 Mon Jan 1 09:29:36 2007 +++ php-src/sapi/cgi/getopt.c Sun Apr 15 22:54:26 2007 @@ -16,6 +16,8 @@ +--+ */ +/* $Id: getopt.c,v 1.12 2007/04/15 22:54:26 sniper Exp $ */ + #include stdio.h #include string.h #include assert.h @@ -77,29 +79,34 @@ } if ((argv[*optind][0] == '-') (argv[*optind][1] == '-')) { /* '--' indicates end of args if not followed by a known long option name */ + if (argv[*optind][2] == '\0') { + (*optind)++; + return(EOF); + } + while (1) { opts_idx++; if (opts[opts_idx].opt_char == '-') { (*optind)++; - return(EOF); + return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); } else if (opts[opts_idx].opt_name !strcmp(argv[*optind][2], opts[opts_idx].opt_name)) { break; } } optchr = 0; - dash = 1; - arg_start = 2 + strlen(opts[opts_idx].opt_name); - } - if (!dash) { - dash = 1; - optchr = 1; - } - - /* Check if the guy tries to do a -: kind of flag */ - if (argv[*optind][optchr] == ':') { dash = 0; - (*optind)++; - return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); + arg_start = 2 + strlen(opts[opts_idx].opt_name); + } else { + if (!dash) { + dash = 1; + optchr = 1; + } + /* Check if the guy tries to do a -: kind of flag */ + if (argv[*optind][optchr] == ':') { + dash = 0; + (*optind)++; + return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); + } } if (opts_idx 0) { while (1) { http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/php_getopt.h?r1=1.9r2=1.10diff_format=u Index: php-src/sapi/cgi/php_getopt.h diff -u php-src/sapi/cgi/php_getopt.h:1.9 php-src/sapi/cgi/php_getopt.h:1.10 --- php-src/sapi/cgi/php_getopt.h:1.9 Mon Jan 1 09:29:36 2007 +++ php-src/sapi/cgi/php_getopt.h Sun Apr 15 22:54:26 2007 @@ -16,8 +16,17 @@ +--+ */ +/* $Id: php_getopt.h,v 1.10 2007/04/15 22:54:26 sniper Exp $ */ + #include php.h +#ifdef NETWARE +/* +As NetWare LibC has optind and optarg macros defined in unistd.h our local variables were getting mistakenly preprocessed so undeffing optind and optarg +*/ +#undef optarg +#undef optind +#endif /* Define structure for one recognized option (both single char and long name). * If short_open is '-' this is the last option. */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c
sniper Sun Apr 15 23:02:05 2007 UTC Modified files: /php-src/sapi/cgi cgi_main.c Log: MFB: Allow using syntax highlighting in fastcgi mode http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.317r2=1.318diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.317 php-src/sapi/cgi/cgi_main.c:1.318 --- php-src/sapi/cgi/cgi_main.c:1.317 Wed Mar 28 15:39:35 2007 +++ php-src/sapi/cgi/cgi_main.c Sun Apr 15 23:02:05 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.317 2007/03/28 15:39:35 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.318 2007/04/15 23:02:05 sniper Exp $ */ #include php.h #include php_globals.h @@ -1172,8 +1172,10 @@ bindpath = strdup(php_optarg); } break; + case 's': /* generate highlighted HTML from source */ + behavior = PHP_MODE_HIGHLIGHT; + break; } - } php_optind = orig_optind; php_optarg = orig_optarg; @@ -1456,10 +1458,6 @@ no_headers = 1; break; - case 's': /* generate highlighted HTML from source */ - behavior = PHP_MODE_HIGHLIGHT; - break; - case 'v': /* show php version quit */ no_headers = 1; if (php_request_startup(TSRMLS_C) == FAILURE) { @@ -1660,6 +1658,9 @@ if (open_file_for_scanning(file_handle TSRMLS_CC) == SUCCESS) { php_get_highlight_struct(syntax_highlighter_ini); zend_highlight(syntax_highlighter_ini TSRMLS_CC); + if (fastcgi) { + goto fastcgi_request_done; + } fclose(file_handle.handle.fp); php_output_teardown(); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi cgi_main.c
sniper Sun Apr 15 23:06:08 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cgi cgi_main.c Log: MFH: Simplify previous patch. http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.33r2=1.267.2.15.2.34diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.33 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.34 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.33 Sun Apr 15 22:52:07 2007 +++ php-src/sapi/cgi/cgi_main.c Sun Apr 15 23:06:08 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.33 2007/04/15 22:52:07 sniper Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.34 2007/04/15 23:06:08 sniper Exp $ */ #include php.h #include php_globals.h @@ -1738,16 +1738,13 @@ php_get_highlight_struct(syntax_highlighter_ini); zend_highlight(syntax_highlighter_ini TSRMLS_CC); #if PHP_FASTCGI - if (!fastcgi) -#endif - { - fclose(file_handle.handle.fp); - php_end_ob_buffers(1 TSRMLS_CC); + if (fastcgi) { + goto fastcgi_request_done; } - } -#if PHP_FASTCGI - if (!fastcgi) #endif + fclose(file_handle.handle.fp); + php_end_ob_buffers(1 TSRMLS_CC); + } return SUCCESS; } break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /main output.c
shire Mon Apr 16 02:25:24 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/main output.c Log: fix fold typo http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.2r2=1.167.2.3.2.3diff_format=u Index: php-src/main/output.c diff -u php-src/main/output.c:1.167.2.3.2.2 php-src/main/output.c:1.167.2.3.2.3 --- php-src/main/output.c:1.167.2.3.2.2 Mon Jan 29 11:21:31 2007 +++ php-src/main/output.c Mon Apr 16 02:25:24 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: output.c,v 1.167.2.3.2.2 2007/01/29 11:21:31 dmitry Exp $ */ +/* $Id: output.c,v 1.167.2.3.2.3 2007/04/16 02:25:24 shire Exp $ */ #include php.h #include ext/standard/head.h @@ -112,7 +112,7 @@ /* }}} */ -/* {{{ php_body_wirte +/* {{{ php_body_write * Write body part */ PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC) { @@ -120,7 +120,7 @@ } /* }}} */ -/* {{{ php_header_wirte +/* {{{ php_header_write * Write HTTP header */ PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php