[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Jan 12 01:31:05 2007 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1055r2=1.1056diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1055 ZendEngine2/ChangeLog:1.1056 --- ZendEngine2/ChangeLog:1.1055Thu Jan 11 01:31:01 2007 +++ ZendEngine2/ChangeLog Fri Jan 12 01:31:05 2007 @@ -1,3 +1,30 @@ +2007-01-11 Marcus Boerger [EMAIL PROTECTED] + +* zend_API.h + zend_unicode.h: + - Consistency: macros shall be uppercased (as requested by Andrei) + +* zend_vm_def.h + zend_vm_execute.h: + - MFB Missing part of __toString() support + +* zend_API.h + zend_unicode.h: + - Add zstrlen() helper + +2007-01-11 Dmitry Stogov [EMAIL PROTECTED] + +* zend.c + zend.c + tests/bug35634.phpt: + Fixed bug #35634 (Erroneous Class declarations may not be nested error + raised). (Carl P. Corliss) + +* tests/bug35634.phpt + tests/bug35634.phpt: + + file bug35634.phpt was initially added on branch PHP_5_2. + 2007-01-10 Andrei Zmievski [EMAIL PROTECTED] * zend_API.h: @@ -16608,7 +16635,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1055 2007/01/11 01:31:01 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1056 2007/01/12 01:31:05 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -18332,7 +18359,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1055 2007/01/11 01:31:01 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1056 2007/01/12 01:31:05 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/posix posix.c /ext/standard filestat.c
Hi Sara This still doesn't fix it (at least on FreeBSD 6.2-prerelease) since _SC_GETPW_R_SIZE_MAX is defined but simply not implemented yet :( -Hannes (p.s.; you missed one in main/safe_mode.c) On 1/11/07, Sara Golemon [EMAIL PROTECTED] wrote: pollita Thu Jan 11 02:33:07 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard filestat.c /php-src/ext/posix posix.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.136.2.8.2.7r2=1.136.2.8.2.8diff_format=u Index: php-src/ext/standard/filestat.c diff -u php-src/ext/standard/filestat.c:1.136.2.8.2.7 php-src/ext/standard/filestat.c:1.136.2.8.2.8 --- php-src/ext/standard/filestat.c:1.136.2.8.2.7 Mon Jan 1 09:36:08 2007 +++ php-src/ext/standard/filestat.c Thu Jan 11 02:33:07 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filestat.c,v 1.136.2.8.2.7 2007/01/01 09:36:08 sebastian Exp $ */ +/* $Id: filestat.c,v 1.136.2.8.2.8 2007/01/11 02:33:07 pollita Exp $ */ #include php.h #include safe_mode.h @@ -454,7 +454,7 @@ } convert_to_string_ex(filename); if (Z_TYPE_PP(user) == IS_STRING) { -#ifdef HAVE_GETPWNAM_R +#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) struct passwd pw; struct passwd *retpwptr = NULL; int pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.10r2=1.70.2.3.2.11diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.10 php-src/ext/posix/posix.c:1.70.2.3.2.11 --- php-src/ext/posix/posix.c:1.70.2.3.2.10 Mon Jan 1 09:36:05 2007 +++ php-src/ext/posix/posix.c Thu Jan 11 02:33:07 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: posix.c,v 1.70.2.3.2.10 2007/01/01 09:36:05 sebastian Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.11 2007/01/11 02:33:07 pollita Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -147,7 +147,7 @@ static PHP_MINFO_FUNCTION(posix) { php_info_print_table_start(); - php_info_print_table_row(2, Revision, $Revision: 1.70.2.3.2.10 $); + php_info_print_table_row(2, Revision, $Revision: 1.70.2.3.2.11 $); php_info_print_table_end(); } /* }}} */ @@ -932,7 +932,7 @@ struct passwd *pw; char *name; int name_len; -#ifdef HAVE_GETPWNAM_R +#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) struct passwd pwbuf; int buflen; char *buf; @@ -942,7 +942,7 @@ RETURN_FALSE; } -#ifdef HAVE_GETPWNAM_R +#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) buflen = sysconf(_SC_GETPW_R_SIZE_MAX); buf = emalloc(buflen); pw = pwbuf; @@ -965,7 +965,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, unable to convert posix passwd struct to array); RETVAL_FALSE; } -#ifdef HAVE_GETPWNAM_R +#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) efree(buf); #endif } @@ -976,7 +976,7 @@ PHP_FUNCTION(posix_getpwuid) { long uid; -#ifdef HAVE_GETPWUID_R +#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWUID_R) struct passwd _pw; struct passwd *retpwptr = NULL; int pwbuflen; @@ -988,7 +988,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, uid) == FAILURE) { RETURN_FALSE; } -#ifdef HAVE_GETPWUID_R +#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWUID_R) pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); pwbuf = emalloc(pwbuflen); @@ -1012,7 +1012,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, unable to convert posix passwd struct to array); RETVAL_FALSE; } -#ifdef HAVE_GETPWUID_R +#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWUID_R) efree(pwbuf); #endif } -- 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] cvs: php-src(PHP_5_2) /ext/posix posix.c /ext/standard filestat.c
On 01/11/2007 12:24 PM, Hannes Magnusson wrote: Hi Sara This still doesn't fix it (at least on FreeBSD 6.2-prerelease) since _SC_GETPW_R_SIZE_MAX is defined but simply not implemented yet :( Same for Mac OS, sysconf() returns -1 there, even though _SC_GETPW_R_SIZE_MAX is defined. This patch should fix all those cases: http://tony2001.phpclub.net/dev/tmp/sysconf.diff -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main .cvsignore /main/streams .cvsignore /regex .cvsignore
tony2001Thu Jan 11 10:49:30 2007 UTC Modified files: /php-src/main .cvsignore /php-src/main/streams .cvsignore /php-src/regex .cvsignore Log: add misssing temp directories to .cvsignore http://cvs.php.net/viewvc.cgi/php-src/main/.cvsignore?r1=1.10r2=1.11diff_format=u Index: php-src/main/.cvsignore diff -u php-src/main/.cvsignore:1.10 php-src/main/.cvsignore:1.11 --- php-src/main/.cvsignore:1.10Sun Oct 10 16:10:28 2004 +++ php-src/main/.cvsignore Thu Jan 11 10:49:30 2007 @@ -11,6 +11,7 @@ *.lo *.la libs +.libs .deps config.nice stamp-h http://cvs.php.net/viewvc.cgi/php-src/main/streams/.cvsignore?r1=1.2r2=1.3diff_format=u Index: php-src/main/streams/.cvsignore diff -u php-src/main/streams/.cvsignore:1.2 php-src/main/streams/.cvsignore:1.3 --- php-src/main/streams/.cvsignore:1.2 Sun Oct 10 16:10:29 2004 +++ php-src/main/streams/.cvsignore Thu Jan 11 10:49:30 2007 @@ -3,6 +3,7 @@ *.lo *.la libs +.libs .deps config.nice stamp-h http://cvs.php.net/viewvc.cgi/php-src/regex/.cvsignore?r1=1.9r2=1.10diff_format=u Index: php-src/regex/.cvsignore diff -u php-src/regex/.cvsignore:1.9 php-src/regex/.cvsignore:1.10 --- php-src/regex/.cvsignore:1.9Sun Oct 10 16:10:30 2004 +++ php-src/regex/.cvsignoreThu Jan 11 10:49:30 2007 @@ -13,3 +13,5 @@ Debug_TS *.gcda *.gcno +.libs +libs -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8 oci8.c oci8_statement.c php_oci8_int.h /ext/oci8/tests bug40078.phpt
tony2001Thu Jan 11 11:26:36 2007 UTC Added files: /php-src/ext/oci8/tests bug40078.phpt Modified files: /php-src/ext/oci8 oci8.c oci8_statement.c php_oci8_int.h Log: fix #40078 (ORA-01405 when fetching NULL values using oci_bind_array_by_name()) http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.326r2=1.327diff_format=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.326 php-src/ext/oci8/oci8.c:1.327 --- php-src/ext/oci8/oci8.c:1.326 Mon Jan 1 09:29:26 2007 +++ php-src/ext/oci8/oci8.c Thu Jan 11 11:26:36 2007 @@ -26,7 +26,7 @@ +--+ */ -/* $Id: oci8.c,v 1.326 2007/01/01 09:29:26 sebastian Exp $ */ +/* $Id: oci8.c,v 1.327 2007/01/11 11:26:36 tony2001 Exp $ */ /* TODO * * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() with OCI_ATTR_LOBEMPTY @@ -670,7 +670,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); php_info_print_table_row(2, Version, 1.2.2); - php_info_print_table_row(2, Revision, $Revision: 1.326 $); + php_info_print_table_row(2, Revision, $Revision: 1.327 $); sprintf(buf, %ld, OCI_G(num_persistent)); php_info_print_table_row(2, Active Persistent Connections, buf); @@ -778,13 +778,16 @@ if (bind-array.elements) { efree(bind-array.elements); } + if (bind-array.element_lengths) { efree(bind-array.element_lengths); } -/* + if (bind-array.indicators) { efree(bind-array.indicators); - } + } + +/* if (bind-array.retcodes) { efree(bind-array.retcodes); } http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.39r2=1.40diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.39 php-src/ext/oci8/oci8_statement.c:1.40 --- php-src/ext/oci8/oci8_statement.c:1.39 Mon Jan 1 09:29:26 2007 +++ php-src/ext/oci8/oci8_statement.c Thu Jan 11 11:26:36 2007 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.39 2007/01/01 09:29:26 sebastian Exp $ */ +/* $Id: oci8_statement.c,v 1.40 2007/01/11 11:26:36 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -1336,7 +1336,7 @@ (dvoid *) bindp-array.elements, (sb4) bind-array.max_length, type, - (dvoid *)0, /* bindp-array.indicators, */ + (dvoid *)bindp-array.indicators, (ub2 *)bind-array.element_lengths, (ub2 *)0, /* bindp-array.retcodes, */ (ub4) max_table_length, @@ -1391,13 +1391,18 @@ bind-array.max_length = TEXT_BYTES(maxlength); bind-array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); memset(bind-array.element_lengths, 0, max_table_length * sizeof(ub2)); - + bind-array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0); + memset(bind-array.indicators, 0, max_table_length*sizeof(sb2)); + zend_hash_internal_pointer_reset(hash); for (i = 0; i bind-array.current_length; i++) { if (zend_hash_get_current_data(hash, (void **) entry) != FAILURE) { convert_to_text_ex(entry); bind-array.element_lengths[i] = TEXT_BYTES(Z_UNILEN_PP(entry)); + if (Z_UNILEN_PP(entry) == 0) { + bind-array.indicators[i] = -1; + } zend_hash_move_forward(hash); } else { break; @@ -1447,6 +1452,7 @@ bind-array.max_length = sizeof(ub4); bind-array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); memset(bind-array.element_lengths, 0, max_table_length * sizeof(ub2)); + bind-array.indicators = NULL; zend_hash_internal_pointer_reset(hash); for (i = 0; i max_table_length; i++) { @@ -1484,6 +1490,7 @@ bind-array.max_length = sizeof(double); bind-array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); memset(bind-array.element_lengths, 0, max_table_length * sizeof(ub2)); + bind-array.indicators = NULL;
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/oci8 oci8.c oci8_statement.c php_oci8_int.h /ext/oci8/tests bug40078.phpt
tony2001Thu Jan 11 11:27:52 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/oci8/tests bug40078.phpt Modified files: /php-srcNEWS /php-src/ext/oci8 oci8.c oci8_statement.c php_oci8_int.h Log: MFH: fix #40078 (ORA-01405 when fetching NULL values using oci_bind_array_by_name()) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.489r2=1.2027.2.547.2.490diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.489 php-src/NEWS:1.2027.2.547.2.490 --- php-src/NEWS:1.2027.2.547.2.489 Wed Jan 10 18:14:37 2007 +++ php-src/NEWSThu Jan 11 11:27:52 2007 @@ -9,6 +9,8 @@ - Fixed bug #40083 (milter SAPI functions always return false/null). (Tony) - Fixed bug #40079 (php_get_current_user() not thread safe). (Ilia, wharmby at uk dot ibm dot com) +- Fixed bug #40078 (ORA-01405 when fetching NULL values using + oci_bind_array_by_name()). (Tony) - Fixed bug #40076 (zend_alloc.c: Value of enumeration constant must be in range of signed integer). (Dmitry) - Fixed bug #40073 (exif_read_data dies on certain images). (Tony, Marcus) http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.16.2.27r2=1.269.2.16.2.28diff_format=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.269.2.16.2.27 php-src/ext/oci8/oci8.c:1.269.2.16.2.28 --- php-src/ext/oci8/oci8.c:1.269.2.16.2.27 Mon Jan 1 09:36:03 2007 +++ php-src/ext/oci8/oci8.c Thu Jan 11 11:27:52 2007 @@ -26,7 +26,7 @@ +--+ */ -/* $Id: oci8.c,v 1.269.2.16.2.27 2007/01/01 09:36:03 sebastian Exp $ */ +/* $Id: oci8.c,v 1.269.2.16.2.28 2007/01/11 11:27:52 tony2001 Exp $ */ /* TODO * * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() with OCI_ATTR_LOBEMPTY @@ -670,7 +670,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); php_info_print_table_row(2, Version, 1.2.2); - php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.27 $); + php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.28 $); sprintf(buf, %ld, OCI_G(num_persistent)); php_info_print_table_row(2, Active Persistent Connections, buf); @@ -778,13 +778,16 @@ if (bind-array.elements) { efree(bind-array.elements); } + if (bind-array.element_lengths) { efree(bind-array.element_lengths); } -/* + if (bind-array.indicators) { efree(bind-array.indicators); - } + } + +/* if (bind-array.retcodes) { efree(bind-array.retcodes); } http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.7.2.14.2.18r2=1.7.2.14.2.19diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.18 php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.19 --- php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.18 Mon Jan 1 09:36:03 2007 +++ php-src/ext/oci8/oci8_statement.c Thu Jan 11 11:27:52 2007 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.7.2.14.2.18 2007/01/01 09:36:03 sebastian Exp $ */ +/* $Id: oci8_statement.c,v 1.7.2.14.2.19 2007/01/11 11:27:52 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -1270,7 +1270,7 @@ (dvoid *) bindp-array.elements, (sb4) bind-array.max_length, type, - (dvoid *)0, /* bindp-array.indicators, */ + (dvoid *)bindp-array.indicators, (ub2 *)bind-array.element_lengths, (ub2 *)0, /* bindp-array.retcodes, */ (ub4) max_table_length, @@ -1320,6 +1320,8 @@ bind-array.max_length = maxlength; bind-array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); memset(bind-array.element_lengths, 0, max_table_length*sizeof(ub2)); + bind-array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0); + memset(bind-array.indicators, 0, max_table_length*sizeof(sb2)); zend_hash_internal_pointer_reset(hash); @@ -1327,6 +1329,9 @@ if (zend_hash_get_current_data(hash, (void **) entry) != FAILURE) { convert_to_string_ex(entry); bind-array.element_lengths[i] = Z_STRLEN_PP(entry); + if (Z_STRLEN_PP(entry) == 0) { +
[PHP-CVS] cvs: php-src /ext/oci8 oci8_interface.c oci8_statement.c /ext/oci8/tests coll_019.phpt define2.phpt define3.phpt define4.phpt define5.phpt
tony2001Thu Jan 11 11:58:34 2007 UTC Added files: /php-src/ext/oci8/tests define5.phpt define4.phpt define3.phpt define2.phpt coll_019.phpt Modified files: /php-src/ext/oci8 oci8_interface.c oci8_statement.c Log: fix #39988 (type argument of oci_define_by_name() is ignored) patch and tests by Chris Jones http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_interface.c?r1=1.29r2=1.30diff_format=u Index: php-src/ext/oci8/oci8_interface.c diff -u php-src/ext/oci8/oci8_interface.c:1.29 php-src/ext/oci8/oci8_interface.c:1.30 --- php-src/ext/oci8/oci8_interface.c:1.29 Wed Jan 3 20:45:17 2007 +++ php-src/ext/oci8/oci8_interface.c Thu Jan 11 11:58:34 2007 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_interface.c,v 1.29 2007/01/03 20:45:17 tony2001 Exp $ */ +/* $Id: oci8_interface.c,v 1.30 2007/01/11 11:58:34 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -53,7 +53,7 @@ zstr name; int name_len; zend_uchar name_type; - long type = SQLT_CHR; + long type = 0; php_oci_statement *statement; php_oci_define *define, *tmp_define; http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.40r2=1.41diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.40 php-src/ext/oci8/oci8_statement.c:1.41 --- php-src/ext/oci8/oci8_statement.c:1.40 Thu Jan 11 11:26:36 2007 +++ php-src/ext/oci8/oci8_statement.c Thu Jan 11 11:58:34 2007 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.40 2007/01/11 11:26:36 tony2001 Exp $ */ +/* $Id: oci8_statement.c,v 1.41 2007/01/11 11:58:34 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -519,7 +519,11 @@ /* find a user-setted define */ if (statement-defines) { - zend_hash_find(statement-defines, outcol-name.s, TEXT_BYTES(outcol-name_len+1), (void **) outcol-define); + if (zend_hash_find(statement-defines, outcol-name.s, TEXT_BYTES(outcol-name_len + 1),(void **) outcol-define) == SUCCESS) { + if (outcol-define-type) { + outcol-data_type = outcol-define-type; + } + } } buf = 0; http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/define5.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/define5.phpt +++ php-src/ext/oci8/tests/define5.phpt --TEST-- oci_define_by_name() for statement re-execution --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__)./connect.inc; require dirname(__FILE__)./create_table.inc; $insert_sql = INSERT INTO .$schema.$table_name. (id, string) VALUES (1, 'some'); $s = oci_parse($c, $insert_sql); var_dump(oci_execute($s)); $insert_sql = INSERT INTO .$schema.$table_name. (id, string) VALUES (2, 'thing'); $s = oci_parse($c, $insert_sql); var_dump(oci_execute($s)); echo Test 1 - must do define before execute\n; $stmt = oci_parse($c, SELECT string FROM .$table_name. where id = 1); oci_execute($stmt); var_dump(oci_define_by_name($stmt, STRING, $string)); while (oci_fetch($stmt)) { var_dump($string); // gives NULL var_dump(oci_result($stmt, 'STRING')); } echo Test 2 - normal define order\n; $stmt = oci_parse($c, SELECT string FROM .$table_name. where id = 1); var_dump(oci_define_by_name($stmt, STRING, $string)); oci_execute($stmt); while (oci_fetch($stmt)) { var_dump($string); } echo Test 3 - no new define done\n; $stmt = oci_parse($c, SELECT string FROM .$table_name. where id = 2); oci_execute($stmt); while (oci_fetch($stmt)) { var_dump($string); // not updated with new value var_dump(oci_result($stmt, 'STRING')); } require dirname(__FILE__)./drop_table.inc; echo Done\n; ? --EXPECT-- bool(true) bool(true) Test 1 - must do define before execute bool(true) NULL string(4) some Test 2 - normal define order bool(true) string(4) some Test 3 - no new define done string(4) some string(5) thing Done --UEXPECT-- bool(true) bool(true) Test 1 - must do define before execute bool(true) NULL unicode(4) some Test 2 - normal define order bool(true) unicode(4) some Test 3 - no new define done unicode(4) some unicode(5) thing Done http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/define4.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/define4.phpt +++ php-src/ext/oci8/tests/define4.phpt --TEST-- oci_define_by_name() on partial number of columns --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/oci8 oci8_interface.c oci8_statement.c /ext/oci8/tests array_bind_005.phpt coll_019.phpt define2.phpt define3.phpt define4.phpt define5.phpt
tony2001Thu Jan 11 12:01:08 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/oci8/tests coll_019.phpt define2.phpt define3.phpt define4.phpt define5.phpt Modified files: /php-src/ext/oci8 oci8_statement.c oci8_interface.c /php-src/ext/oci8/tests array_bind_005.phpt /php-srcNEWS Log: MFH: fix #39988 (type argument of oci_define_by_name() is ignored) patch and tests by Chris Jones http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.7.2.14.2.19r2=1.7.2.14.2.20diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.19 php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.20 --- php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.19 Thu Jan 11 11:27:52 2007 +++ php-src/ext/oci8/oci8_statement.c Thu Jan 11 12:01:08 2007 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.7.2.14.2.19 2007/01/11 11:27:52 tony2001 Exp $ */ +/* $Id: oci8_statement.c,v 1.7.2.14.2.20 2007/01/11 12:01:08 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -506,7 +506,11 @@ /* find a user-setted define */ if (statement-defines) { - zend_hash_find(statement-defines,outcol-name,outcol-name_len,(void **) outcol-define); + if (zend_hash_find(statement-defines,outcol-name,outcol-name_len,(void **) outcol-define) == SUCCESS) { + if (outcol-define-type) { + outcol-data_type = outcol-define-type; + } + } } buf = 0; http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_interface.c?r1=1.8.2.7.2.8r2=1.8.2.7.2.9diff_format=u Index: php-src/ext/oci8/oci8_interface.c diff -u php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.8 php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.9 --- php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.8 Wed Jan 3 20:45:22 2007 +++ php-src/ext/oci8/oci8_interface.c Thu Jan 11 12:01:08 2007 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_interface.c,v 1.8.2.7.2.8 2007/01/03 20:45:22 tony2001 Exp $ */ +/* $Id: oci8_interface.c,v 1.8.2.7.2.9 2007/01/11 12:01:08 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -52,7 +52,7 @@ zval *stmt, *var; char *name; int name_len; - long type = SQLT_CHR; + long type = 0; php_oci_statement *statement; php_oci_define *define, *tmp_define; http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/array_bind_005.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/oci8/tests/array_bind_005.phpt diff -u php-src/ext/oci8/tests/array_bind_005.phpt:1.1.2.1.2.1 php-src/ext/oci8/tests/array_bind_005.phpt:1.1.2.1.2.2 --- php-src/ext/oci8/tests/array_bind_005.phpt:1.1.2.1.2.1 Mon Jul 31 10:30:22 2006 +++ php-src/ext/oci8/tests/array_bind_005.phpt Thu Jan 11 12:01:08 2007 @@ -59,7 +59,6 @@ echo Done\n; ? --EXPECTF-- -Warning: oci_execute(): ORA-01405: fetched column value is NULL in %s on line %d array(5) { [0]= string(0) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.490r2=1.2027.2.547.2.491diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.490 php-src/NEWS:1.2027.2.547.2.491 --- php-src/NEWS:1.2027.2.547.2.490 Thu Jan 11 11:27:52 2007 +++ php-src/NEWSThu Jan 11 12:01:08 2007 @@ -18,6 +18,8 @@ ARRAY_AS_PROPS). (Ilia) - Fixed bug #40002 (Try/Catch performs poorly). (Dmitry) - Fixed bug #39990 (Cannot foreach over overloaded properties). (Dmitry) +- Fixed bug #39988 (type argument of oci_define_by_name() is ignored). + (Chris Jones, Tony) - Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to establish a new connection). (Ilia) - Fixed bug #39504 (xmlwriter_write_dtd_entity() creates Attlist tag, http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/coll_019.phpt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/coll_019.phpt +++ php-src/ext/oci8/tests/coll_019.phpt --TEST-- Test collection Oracle error handling collections and numbers (2) --SKIPIF-- ?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ? --FILE-- ?php require dirname(__FILE__)./connect.inc; $ora_sql = DROP TYPE .$type_name;; $statement = oci_parse($c,$ora_sql); @oci_execute($statement); echo Test 0\n; $ora_sql = CREATE TYPE .$type_name. AS TABLE OF BLOB; $statement = oci_parse($c,$ora_sql); oci_execute($statement); $coll1 = oci_new_collection($c, $type_name); var_dump($coll1-append('a long string')); // invalid type for append var_dump($coll1-assignElem(1, 'a long string')); // invalid type for
[PHP-CVS] cvs: php-src /main network.c
tony2001Thu Jan 11 15:51:29 2007 UTC Modified files: /php-src/main network.c Log: use closesocket() on Win32 and close() on *nix http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.124r2=1.125diff_format=u Index: php-src/main/network.c diff -u php-src/main/network.c:1.124 php-src/main/network.c:1.125 --- php-src/main/network.c:1.124Mon Jan 1 09:29:35 2007 +++ php-src/main/network.c Thu Jan 11 15:51:29 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: network.c,v 1.124 2007/01/01 09:29:35 sebastian Exp $ */ +/* $Id: network.c,v 1.125 2007/01/11 15:51:29 tony2001 Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ @@ -441,7 +441,7 @@ err = php_socket_errno(); } - close(sock); + closesocket(sock); } sock = -1; @@ -870,7 +870,7 @@ #endif } - close(sock); + closesocket(sock); } sock = -1; -- 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 network.c
tony2001Thu Jan 11 15:51:37 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/main network.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.3r2=1.118.2.2.2.4diff_format=u Index: php-src/main/network.c diff -u php-src/main/network.c:1.118.2.2.2.3 php-src/main/network.c:1.118.2.2.2.4 --- php-src/main/network.c:1.118.2.2.2.3Mon Jan 1 09:36:11 2007 +++ php-src/main/network.c Thu Jan 11 15:51:37 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: network.c,v 1.118.2.2.2.3 2007/01/01 09:36:11 sebastian Exp $ */ +/* $Id: network.c,v 1.118.2.2.2.4 2007/01/11 15:51:37 tony2001 Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ @@ -441,7 +441,7 @@ err = php_socket_errno(); } - close(sock); + closesocket(sock); } sock = -1; @@ -870,7 +870,7 @@ #endif } - close(sock); + closesocket(sock); } sock = -1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
tony2001Thu Jan 11 16:45:28 2007 UTC Modified files: /php-src/ext/pgsql pgsql.c Log: make sure the string is non-empty and use strlcpy() strlcat() http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.364r2=1.365diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.364 php-src/ext/pgsql/pgsql.c:1.365 --- php-src/ext/pgsql/pgsql.c:1.364 Mon Jan 1 09:29:28 2007 +++ php-src/ext/pgsql/pgsql.c Thu Jan 11 16:45:27 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.364 2007/01/01 09:29:28 sebastian Exp $ */ +/* $Id: pgsql.c,v 1.365 2007/01/11 16:45:27 tony2001 Exp $ */ #include stdlib.h @@ -3469,10 +3469,11 @@ #if HAVE_PQPUTCOPYDATA while (zend_hash_get_current_data_ex(Z_ARRVAL_P(pg_rows), (void **) tmp, pos) == SUCCESS) { convert_to_string_ex(tmp); - query = (char *)emalloc(Z_STRLEN_PP(tmp) +2); - strcpy(query, Z_STRVAL_PP(tmp)); - if(*(query+Z_STRLEN_PP(tmp)-1) != '\n') - strcat(query, \n); + query = (char *)emalloc(Z_STRLEN_PP(tmp) + 2); + strlcpy(query, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp) + 2); + if(Z_STRLEN_PP(tmp) 0 *(query + Z_STRLEN_PP(tmp) - 1) != '\n') { + strlcat(query, \n, Z_STRLEN_PP(tmp) + 2); + } if (PQputCopyData(pgsql, query, strlen(query)) != 1) { efree(query); PHP_PQ_ERROR(copy failed: %s, pgsql); @@ -3488,10 +3489,11 @@ #else while (zend_hash_get_current_data_ex(Z_ARRVAL_P(pg_rows), (void **) tmp, pos) == SUCCESS) { convert_to_string_ex(tmp); - query = (char *)emalloc(Z_STRLEN_PP(tmp) +2); - strcpy(query, Z_STRVAL_PP(tmp)); - if(*(query+Z_STRLEN_PP(tmp)-1) != '\n') - strcat(query, \n); + query = (char *)emalloc(Z_STRLEN_PP(tmp) + 2); + strlcpy(query, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp) + 2); + if(Z_STRLEN_PP(tmp) 0 *(query + Z_STRLEN_PP(tmp) - 1) != '\n') { + strlcat(query, \n, Z_STRLEN_PP(tmp) + 2); + } if (PQputline(pgsql, query)==EOF) { efree(query); PHP_PQ_ERROR(copy failed: %s, pgsql); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pgsql pgsql.c
tony2001Thu Jan 11 16:45:37 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pgsql pgsql.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.17r2=1.331.2.13.2.18diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.17 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.18 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.17 Sun Jan 7 04:36:40 2007 +++ php-src/ext/pgsql/pgsql.c Thu Jan 11 16:45:37 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.17 2007/01/07 04:36:40 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.18 2007/01/11 16:45:37 tony2001 Exp $ */ #include stdlib.h @@ -3492,10 +3492,11 @@ #if HAVE_PQPUTCOPYDATA while (zend_hash_get_current_data_ex(Z_ARRVAL_P(pg_rows), (void **) tmp, pos) == SUCCESS) { convert_to_string_ex(tmp); - query = (char *)emalloc(Z_STRLEN_PP(tmp) +2); - strcpy(query, Z_STRVAL_PP(tmp)); - if(*(query+Z_STRLEN_PP(tmp)-1) != '\n') - strcat(query, \n); + query = (char *)emalloc(Z_STRLEN_PP(tmp) + 2); + strlcpy(query, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp) + 2); + if(Z_STRLEN_PP(tmp) 0 *(query + Z_STRLEN_PP(tmp) - 1) != '\n') { + strlcat(query, \n, Z_STRLEN_PP(tmp) + 2); + } if (PQputCopyData(pgsql, query, strlen(query)) != 1) { efree(query); PHP_PQ_ERROR(copy failed: %s, pgsql); @@ -3511,10 +3512,11 @@ #else while (zend_hash_get_current_data_ex(Z_ARRVAL_P(pg_rows), (void **) tmp, pos) == SUCCESS) { convert_to_string_ex(tmp); - query = (char *)emalloc(Z_STRLEN_PP(tmp) +2); - strcpy(query, Z_STRVAL_PP(tmp)); - if(*(query+Z_STRLEN_PP(tmp)-1) != '\n') - strcat(query, \n); + query = (char *)emalloc(Z_STRLEN_PP(tmp) + 2); + strlcpy(query, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp) + 2); + if(Z_STRLEN_PP(tmp) 0 *(query + Z_STRLEN_PP(tmp) - 1) != '\n') { + strlcat(query, \n, Z_STRLEN_PP(tmp) + 2); + } if (PQputline(pgsql, query)==EOF) { efree(query); PHP_PQ_ERROR(copy failed: %s, pgsql); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/pgsql pgsql.c
tony2001Thu Jan 11 16:47:32 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/pgsql pgsql.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.244.2.40.2.6r2=1.244.2.40.2.7diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.244.2.40.2.6 php-src/ext/pgsql/pgsql.c:1.244.2.40.2.7 --- php-src/ext/pgsql/pgsql.c:1.244.2.40.2.6Mon Jan 1 09:46:46 2007 +++ php-src/ext/pgsql/pgsql.c Thu Jan 11 16:47:32 2007 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.244.2.40.2.6 2007/01/01 09:46:46 sebastian Exp $ */ +/* $Id: pgsql.c,v 1.244.2.40.2.7 2007/01/11 16:47:32 tony2001 Exp $ */ #include stdlib.h @@ -216,7 +216,7 @@ static int le_link, le_plink, le_result, le_lofp, le_string; -ZEND_DECLARE_MODULE_GLOBALS(pgsql); +ZEND_DECLARE_MODULE_GLOBALS(pgsql) /* {{{ _php_pgsql_trim_message */ static char * _php_pgsql_trim_message(const char *message, int *len) @@ -2658,10 +2658,11 @@ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(pg_rows), pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(pg_rows), (void **) tmp, pos) == SUCCESS) { convert_to_string_ex(tmp); - query = (char *)emalloc(Z_STRLEN_PP(tmp) +2); - strcpy(query, Z_STRVAL_PP(tmp)); - if(*(query+Z_STRLEN_PP(tmp)-1) != '\n') - strcat(query, \n); + query = (char *)emalloc(Z_STRLEN_PP(tmp) + 2); + strlcpy(query, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp) + 2); + if(Z_STRLEN_PP(tmp) 0 *(query + Z_STRLEN_PP(tmp) - 1) != '\n') { + strlcat(query, \n, Z_STRLEN_PP(tmp) + 2); + } if (PQputline(pgsql, query)) { efree(query); PHP_PQ_ERROR(copy failed: %s, pgsql); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_engine.h
helly Thu Jan 11 21:33:23 2007 UTC Modified files: /php-src/ext/splspl_engine.h Log: - Unicode support http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_engine.h?r1=1.23r2=1.24diff_format=u Index: php-src/ext/spl/spl_engine.h diff -u php-src/ext/spl/spl_engine.h:1.23 php-src/ext/spl/spl_engine.h:1.24 --- php-src/ext/spl/spl_engine.h:1.23 Mon Jan 1 09:29:29 2007 +++ php-src/ext/spl/spl_engine.hThu Jan 11 21:33:23 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_engine.h,v 1.23 2007/01/01 09:29:29 sebastian Exp $ */ +/* $Id: spl_engine.h,v 1.24 2007/01/11 21:33:23 helly Exp $ */ #ifndef SPL_ENGINE_H #define SPL_ENGINE_H @@ -24,6 +24,7 @@ #include php.h #include php_spl.h #include zend_interfaces.h +#include zend_unicode.h /* {{{ zend_class_entry */ static inline zend_class_entry *spl_get_class_entry(zval *obj TSRMLS_DC) @@ -43,8 +44,7 @@ { spl_instantiate(pce, retval, alloc TSRMLS_CC); - /* FIXME: Unicode support??? */ - zend_call_method(retval, pce, pce-constructor, pce-constructor-common.function_name.s, strlen(pce-constructor-common.function_name.s), NULL, 1, arg1, NULL TSRMLS_CC); + zend_u_call_method(retval, pce, pce-constructor, ZEND_STR_TYPE, pce-constructor-common.function_name, USTR_LEN(pce-constructor-common.function_name), NULL, 1, arg1, NULL TSRMLS_CC); return 0; } /* }}} */ @@ -54,8 +54,7 @@ { spl_instantiate(pce, retval, alloc TSRMLS_CC); - /* FIXME: Unicode support??? */ - zend_call_method(retval, pce, pce-constructor, pce-constructor-common.function_name.s, strlen(pce-constructor-common.function_name.s), NULL, 2, arg1, arg2 TSRMLS_CC); + zend_u_call_method(retval, pce, pce-constructor, ZEND_STR_TYPE, pce-constructor-common.function_name, USTR_LEN(pce-constructor-common.function_name), NULL, 2, arg1, arg2 TSRMLS_CC); return 0; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/apache mod_php.c
andrei Thu Jan 11 23:18:11 2007 UTC Modified files: /php-src/sapi/apachemod_php.c Log: Fake out the module name, since the filename is different now. http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php.c?r1=1.1r2=1.2diff_format=u Index: php-src/sapi/apache/mod_php.c diff -u php-src/sapi/apache/mod_php.c:1.1 php-src/sapi/apache/mod_php.c:1.2 --- php-src/sapi/apache/mod_php.c:1.1 Wed Jan 10 23:46:09 2007 +++ php-src/sapi/apache/mod_php.c Thu Jan 11 23:18:11 2007 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php.c,v 1.1 2007/01/10 23:46:09 andrei Exp $ */ +/* $Id: mod_php.c,v 1.2 2007/01/11 23:18:11 andrei Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -963,7 +963,13 @@ */ module MODULE_VAR_EXPORT php6_module = { - STANDARD_MODULE_STUFF, + MODULE_MAGIC_NUMBER_MAJOR, + MODULE_MAGIC_NUMBER_MINOR, + -1, + mod_php6.c, + NULL, + NULL, + MODULE_MAGIC_COOKIE, php_init_handler, /* initializer */ php_create_dir, /* per-directory config creator */ php_merge_dir, /* dir merger */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring php_mbregex.c
tony2001Thu Jan 11 22:23:06 2007 UTC Modified files: /php-src/ext/mbstring php_mbregex.c Log: avoid changing original zval http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.c?r1=1.57r2=1.58diff_format=u Index: php-src/ext/mbstring/php_mbregex.c diff -u php-src/ext/mbstring/php_mbregex.c:1.57 php-src/ext/mbstring/php_mbregex.c:1.58 --- php-src/ext/mbstring/php_mbregex.c:1.57 Mon Jan 1 09:29:25 2007 +++ php-src/ext/mbstring/php_mbregex.c Thu Jan 11 22:23:06 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mbregex.c,v 1.57 2007/01/01 09:29:25 sebastian Exp $ */ +/* $Id: php_mbregex.c,v 1.58 2007/01/11 22:23:06 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -607,7 +607,7 @@ /* {{{ _php_mb_regex_ereg_replace_exec */ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOptionType options) { - zval *arg_pattern_zval; + zval **arg_pattern_zval; char *arg_pattern; int arg_pattern_len; @@ -647,7 +647,7 @@ char *option_str = NULL; int option_str_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, zss|s, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Zss|s, arg_pattern_zval, replace, replace_len, string, string_len, @@ -662,13 +662,13 @@ syntax = MBSTRG(regex_default_syntax); } } - if (Z_TYPE_P(arg_pattern_zval) == IS_STRING) { - arg_pattern = Z_STRVAL_P(arg_pattern_zval); - arg_pattern_len = Z_STRLEN_P(arg_pattern_zval); + if (Z_TYPE_PP(arg_pattern_zval) == IS_STRING) { + arg_pattern = Z_STRVAL_PP(arg_pattern_zval); + arg_pattern_len = Z_STRLEN_PP(arg_pattern_zval); } else { /* FIXME: this code is not multibyte aware! */ - convert_to_long_ex(arg_pattern_zval); - pat_buf[0] = (char)Z_LVAL_P(arg_pattern_zval); + convert_to_long_ex(arg_pattern_zval); + pat_buf[0] = (char)Z_LVAL_PP(arg_pattern_zval); pat_buf[1] = '\0'; arg_pattern = pat_buf; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring php_mbregex.c
tony2001Thu Jan 11 22:23:20 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring php_mbregex.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.c?r1=1.53.2.1.2.3r2=1.53.2.1.2.4diff_format=u Index: php-src/ext/mbstring/php_mbregex.c diff -u php-src/ext/mbstring/php_mbregex.c:1.53.2.1.2.3 php-src/ext/mbstring/php_mbregex.c:1.53.2.1.2.4 --- php-src/ext/mbstring/php_mbregex.c:1.53.2.1.2.3 Mon Jan 1 09:36:02 2007 +++ php-src/ext/mbstring/php_mbregex.c Thu Jan 11 22:23:20 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mbregex.c,v 1.53.2.1.2.3 2007/01/01 09:36:02 sebastian Exp $ */ +/* $Id: php_mbregex.c,v 1.53.2.1.2.4 2007/01/11 22:23:20 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -607,7 +607,7 @@ /* {{{ _php_mb_regex_ereg_replace_exec */ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOptionType options) { - zval *arg_pattern_zval; + zval **arg_pattern_zval; char *arg_pattern; int arg_pattern_len; @@ -647,7 +647,7 @@ char *option_str = NULL; int option_str_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, zss|s, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Zss|s, arg_pattern_zval, replace, replace_len, string, string_len, @@ -662,13 +662,13 @@ syntax = MBSTRG(regex_default_syntax); } } - if (Z_TYPE_P(arg_pattern_zval) == IS_STRING) { - arg_pattern = Z_STRVAL_P(arg_pattern_zval); - arg_pattern_len = Z_STRLEN_P(arg_pattern_zval); + if (Z_TYPE_PP(arg_pattern_zval) == IS_STRING) { + arg_pattern = Z_STRVAL_PP(arg_pattern_zval); + arg_pattern_len = Z_STRLEN_PP(arg_pattern_zval); } else { /* FIXME: this code is not multibyte aware! */ - convert_to_long_ex(arg_pattern_zval); - pat_buf[0] = (char)Z_LVAL_P(arg_pattern_zval); + convert_to_long_ex(arg_pattern_zval); + pat_buf[0] = (char)Z_LVAL_PP(arg_pattern_zval); pat_buf[1] = '\0'; arg_pattern = pat_buf; -- 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) / NEWS /ext/posix posix.c /ext/standard filestat.c /main fopen_wrappers.c safe_mode.c
iliaa Fri Jan 12 01:46:11 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard filestat.c /php-src/main safe_mode.c fopen_wrappers.c /php-src/ext/posix posix.c /php-srcNEWS Log: Fixed bug #40098 (php_fopen_primary_script() not thread safe). Adjusted previous fixes for similar issue to handle sysconf() failures http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.136.2.8.2.8r2=1.136.2.8.2.9diff_format=u Index: php-src/ext/standard/filestat.c diff -u php-src/ext/standard/filestat.c:1.136.2.8.2.8 php-src/ext/standard/filestat.c:1.136.2.8.2.9 --- php-src/ext/standard/filestat.c:1.136.2.8.2.8 Thu Jan 11 02:33:07 2007 +++ php-src/ext/standard/filestat.c Fri Jan 12 01:46:11 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filestat.c,v 1.136.2.8.2.8 2007/01/11 02:33:07 pollita Exp $ */ +/* $Id: filestat.c,v 1.136.2.8.2.9 2007/01/12 01:46:11 iliaa Exp $ */ #include php.h #include safe_mode.h @@ -363,12 +363,17 @@ } convert_to_string_ex(filename); if (Z_TYPE_PP(group) == IS_STRING) { -#if HAVE_GETGRNAM_R +#if defined(ZTS) defined(HAVE_GETGRNAM_R) defined(_SC_GETGR_R_SIZE_MAX) struct group gr; struct group *retgrptr; - int grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX); - char *grbuf = emalloc(grbuflen); + long grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX); + char *grbuf; + if (grbuflen 1) { + RETURN_FALSE; + } + + grbuf = emalloc(grbuflen); if (getgrnam_r(Z_STRVAL_PP(group), gr, grbuf, grbuflen, retgrptr) != 0 || retgrptr == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to find gid for %s, Z_STRVAL_PP(group)); efree(grbuf); @@ -454,12 +459,17 @@ } convert_to_string_ex(filename); if (Z_TYPE_PP(user) == IS_STRING) { -#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) +#if defined(ZTS) defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) struct passwd pw; struct passwd *retpwptr = NULL; - int pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); - char *pwbuf = emalloc(pwbuflen); + long pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); + char *pwbuf; + + if (pwbuflen 1) { + RETURN_FALSE; + } + pwbuf = emalloc(pwbuflen); if (getpwnam_r(Z_STRVAL_PP(user), pw, pwbuf, pwbuflen, retpwptr) != 0 || retpwptr == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to find uid for %s, Z_STRVAL_PP(user)); efree(pwbuf); http://cvs.php.net/viewvc.cgi/php-src/main/safe_mode.c?r1=1.62.2.1.2.6r2=1.62.2.1.2.7diff_format=u Index: php-src/main/safe_mode.c diff -u php-src/main/safe_mode.c:1.62.2.1.2.6 php-src/main/safe_mode.c:1.62.2.1.2.7 --- php-src/main/safe_mode.c:1.62.2.1.2.6 Tue Jan 9 23:27:22 2007 +++ php-src/main/safe_mode.cFri Jan 12 01:46:11 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: safe_mode.c,v 1.62.2.1.2.6 2007/01/09 23:27:22 iliaa Exp $ */ +/* $Id: safe_mode.c,v 1.62.2.1.2.7 2007/01/12 01:46:11 iliaa Exp $ */ #include php.h @@ -228,12 +228,16 @@ return SG(request_info).current_user; #else struct passwd *pwd; -#ifdef HAVE_GETPWUID_R +#if defined(ZTS) defined(HAVE_GETPWUID_R) defined(_SC_GETPW_R_SIZE_MAX) struct passwd _pw; struct passwd *retpwptr = NULL; int pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); - char *pwbuf = emalloc(pwbuflen); + char *pwbuf; + if (pwbuflen 1) { + return + } + pwbuf = emalloc(pwbuflen); if (getpwuid_r(pstat-st_uid, _pw, pwbuf, pwbuflen, retpwptr) != 0) { efree(pwbuf); return ; @@ -246,7 +250,7 @@ #endif SG(request_info).current_user_length = strlen(pwd-pw_name); SG(request_info).current_user = estrndup(pwd-pw_name, SG(request_info).current_user_length); -#ifdef HAVE_GETPWUID_R +#if defined(ZTS) defined(HAVE_GETPWUID_R) defined(_SC_GETPW_R_SIZE_MAX) efree(pwbuf); #endif return SG(request_info).current_user; http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.175.2.3.2.5r2=1.175.2.3.2.6diff_format=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.175.2.3.2.5 php-src/main/fopen_wrappers.c:1.175.2.3.2.6 --- php-src/main/fopen_wrappers.c:1.175.2.3.2.5 Mon Jan 1 09:36:10 2007 +++
[PHP-CVS] cvs: php-src /ext/posix posix.c /main fopen_wrappers.c
iliaa Fri Jan 12 01:50:43 2007 UTC Modified files: /php-src/ext/posix posix.c /php-src/main fopen_wrappers.c Log: MFB: Fixed bug #40098 (php_fopen_primary_script() not thread safe). Adjusted previous fixes for similar issue to handle sysconf() failures http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.89r2=1.90diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.89 php-src/ext/posix/posix.c:1.90 --- php-src/ext/posix/posix.c:1.89 Thu Jan 11 02:31:50 2007 +++ php-src/ext/posix/posix.c Fri Jan 12 01:50:43 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: posix.c,v 1.89 2007/01/11 02:31:50 pollita Exp $ */ +/* $Id: posix.c,v 1.90 2007/01/12 01:50:43 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -147,7 +147,7 @@ static PHP_MINFO_FUNCTION(posix) { php_info_print_table_start(); - php_info_print_table_row(2, Revision, $Revision: 1.89 $); + php_info_print_table_row(2, Revision, $Revision: 1.90 $); php_info_print_table_end(); } /* }}} */ @@ -556,8 +556,8 @@ zval **z_fd; char *p; int fd; -#if HAVE_TTYNAME_R - size_t buflen; +#if defined(ZTS) defined(HAVE_TTYNAME_R) defined(_SC_TTY_NAME_MAX) + long buflen; #endif if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, z_fd) == FAILURE) { @@ -574,8 +574,11 @@ convert_to_long_ex(z_fd); fd = Z_LVAL_PP(z_fd); } -#if HAVE_TTYNAME_R +#if defined(ZTS) defined(HAVE_TTYNAME_R) defined(_SC_TTY_NAME_MAX) buflen = sysconf(_SC_TTY_NAME_MAX); + if (buflen 1) { + RETURN_FALSE; + } p = emalloc(buflen); if (ttyname_r(fd, p, buflen)) { @@ -820,9 +823,9 @@ char *name; struct group *g; int name_len; -#if HAVE_GETGRNAM_R +#if defined(ZTS) defined(HAVE_GETGRNAM_R) defined(_SC_GETGR_R_SIZE_MAX) struct group gbuf; - int buflen; + long buflen; char *buf; #endif @@ -830,8 +833,11 @@ RETURN_FALSE; } -#if HAVE_GETGRNAM_R +#if defined(ZTS) defined(HAVE_GETGRNAM_R) defined(_SC_GETGR_R_SIZE_MAX) buflen = sysconf(_SC_GETGR_R_SIZE_MAX); + if (buflen 1) { + RETURN_FALSE; + } buf = emalloc(buflen); g = gbuf; @@ -853,7 +859,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, unable to convert posix group to array); RETVAL_FALSE; } -#if HAVE_GETGRNAM_R +#if defined(ZTS) defined(HAVE_GETGRNAM_R) defined(_SC_GETGR_R_SIZE_MAX) efree(buf); #endif } @@ -868,7 +874,7 @@ int ret; struct group _g; struct group *retgrptr; - int grbuflen; + long grbuflen; char *grbuf; #endif struct group *g; @@ -932,9 +938,9 @@ struct passwd *pw; char *name; int name_len; -#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) +#if defined(ZTS) defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) struct passwd pwbuf; - int buflen; + long buflen; char *buf; #endif @@ -942,8 +948,11 @@ RETURN_FALSE; } -#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) +#if defined(ZTS) defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) buflen = sysconf(_SC_GETPW_R_SIZE_MAX); + if (buflen 1) { + RETURN_FALSE; + } buf = emalloc(buflen); pw = pwbuf; @@ -965,7 +974,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, unable to convert posix passwd struct to array); RETVAL_FALSE; } -#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) +#if defined(ZTS) defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWNAM_R) efree(buf); #endif } @@ -976,10 +985,10 @@ PHP_FUNCTION(posix_getpwuid) { long uid; -#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWUID_R) +#if defined(ZTS) defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWUID_R) struct passwd _pw; struct passwd *retpwptr = NULL; - int pwbuflen; + long pwbuflen; char *pwbuf; int ret; #endif @@ -988,8 +997,11 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, uid) == FAILURE) { RETURN_FALSE; } -#if defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWUID_R) +#if defined(ZTS) defined(_SC_GETPW_R_SIZE_MAX) defined(HAVE_GETPWUID_R) pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); + if (pwbuflen 1) { + RETURN_FALSE; + } pwbuf = emalloc(pwbuflen); ret = getpwuid_r(uid, _pw, pwbuf, pwbuflen, retpwptr); @@ -1012,7 +1024,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, unable to convert posix passwd struct to array);
[PHP-CVS] cvs: php-src /ext/standard formatted_print.c
iliaa Fri Jan 12 02:04:27 2007 UTC Modified files: /php-src/ext/standard formatted_print.c Log: MFB: Use long instead of int where long is expected. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/formatted_print.c?r1=1.96r2=1.97diff_format=u Index: php-src/ext/standard/formatted_print.c diff -u php-src/ext/standard/formatted_print.c:1.96 php-src/ext/standard/formatted_print.c:1.97 --- php-src/ext/standard/formatted_print.c:1.96 Mon Jan 1 09:29:31 2007 +++ php-src/ext/standard/formatted_print.c Fri Jan 12 02:04:27 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: formatted_print.c,v 1.96 2007/01/01 09:29:31 sebastian Exp $ */ +/* $Id: formatted_print.c,v 1.97 2007/01/12 02:04:27 iliaa Exp $ */ #include math.h /* modf() */ #include php.h @@ -651,9 +651,10 @@ { zval ***args, **z_format; int argc, size = 240, inpos = 0, outpos = 0, temppos; - int alignment, width, precision, currarg, adjusting, argnum; + int alignment, currarg, adjusting; char *format, *result, padding; int always_sign; + long argnum, width, precision; argc = ZEND_NUM_ARGS(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/standard formatted_print.c
iliaa Fri Jan 12 02:04:38 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/standard formatted_print.c Log: MFH: Use long instead of int where long is expected. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/formatted_print.c?r1=1.59.2.15.2.2r2=1.59.2.15.2.3diff_format=u Index: php-src/ext/standard/formatted_print.c diff -u php-src/ext/standard/formatted_print.c:1.59.2.15.2.2 php-src/ext/standard/formatted_print.c:1.59.2.15.2.3 --- php-src/ext/standard/formatted_print.c:1.59.2.15.2.2Mon Jan 1 09:46:48 2007 +++ php-src/ext/standard/formatted_print.c Fri Jan 12 02:04:37 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: formatted_print.c,v 1.59.2.15.2.2 2007/01/01 09:46:48 sebastian Exp $ */ +/* $Id: formatted_print.c,v 1.59.2.15.2.3 2007/01/12 02:04:37 iliaa Exp $ */ #include math.h /* modf() */ #include php.h @@ -486,9 +486,10 @@ { zval ***args, **z_format, **array; int argc, size = 240, inpos = 0, outpos = 0, temppos; - int alignment, width, precision, currarg, adjusting, argnum; + int alignment, currarg, adjusting; char *format, *result, padding; int always_sign; + long argnum, width, precision; argc = ZEND_NUM_ARGS(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php