tsukada
ttsuk****@users*****
2003年 2月 11日 (火) 23:04:50 JST
ttsukada 03/02/11 23:04:50 Modified: . ChangeLog NEWS ext/ingres_ii ii.c ext/mssql php_mssql.c ext/readline config.m4 pear Makefile.frag sapi/apache config.m4 mod_php4.c Log: merge Revision Changes Path 1.8 +204 -0 php4/ChangeLog Index: ChangeLog =================================================================== RCS file: /cvsroot/php-i18n/php4/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ChangeLog 11 Feb 2003 03:24:04 -0000 1.7 +++ ChangeLog 11 Feb 2003 14:04:49 -0000 1.8 @@ -1,3 +1,207 @@ +2003-02-10 Wez Furlong <wez.p****@thebr*****> + + * ext/rpc/com/com_wrapper.c: + fix rpc_error call + +2003-02-10 Ilia Alshanetsky <ilia****@proho*****> + + * ext/standard/file.c + ext/standard/file.h: + Merged the flags for the file() function into a single flag. + +2003-02-10 Harald Radi <haral****@nme*****> + + * ext/rpc/handler.h + ext/rpc/php_rpc.h + ext/rpc/rpc.c + ext/rpc/rpc.h + ext/rpc/rpc_proxy.c + ext/rpc/com/com.c + ext/rpc/com/com_wrapper.c + ext/rpc/com/conversion.c + ext/rpc/com/variant.c + ext/rpc/com/variant.h: + a bunch of fixes + + * ext/rpc/skeleton/skeleton.c: + s/com/skeleton/ is not always a good idea + +2003-02-10 Wez Furlong <wez.p****@thebr*****> + + * ext/rpc/com/com.c: + byref really means that we want the zval... + +2003-02-10 Moriyoshi Koizumi <moriy****@at*****> + + * main/SAPI.c: + Fixed possible snprintf problem + + * (PHP_4_3) + main/SAPI.c: + MFH: fixed possible buffer overflow in 64bit systems + + * main/SAPI.c: + Fixed possible buffer overflow in 64bit systems + + * NEWS + NEWS: + dot dot dot.. + + * NEWS: + MFB: Fixed typo + + * (PHP_4_3) + NEWS: + Fixed typo + +2003-02-10 Sara Golemon <php****@alpha*****> + + * (PHP_4_3) + NEWS: + Bug 22141 + +2003-02-10 Moriyoshi Koizumi <moriy****@at*****> + + * main/SAPI.c: + Jani happification + + * NEWS: + New function + +2003-02-10 Sara Golemon <php****@alpha*****> + + * (PHP_4_3) + ext/standard/string.c: + Partial MFH. Deprecated BM algo for str_replace can hang execution. See + Bug#22141 + +2003-02-10 Moriyoshi Koizumi <moriy****@at*****> + + * sapi/apache2filter/sapi_apache2.c: + Removed unnecessary code + + * ext/zlib/php_zlib.h + ext/zlib/zlib.c + main/SAPI.c: + Fixed zlib.output_compression so it can work even if zlib extension is + built as shared + +2003-02-10 Melvyn Sopacua <msopa****@idg*****> + + * Makefile.global: + MFB: disable output buffering + + * (PHP_4_3) + Makefile.global: + Make sure we're not buffering stuff + +2003-02-10 Wez Furlong <wez.p****@thebr*****> + + * ext/rpc/com/com.c: + Implement com_describe + +2003-02-10 Jani Taskinen <snipe****@iki*****> + + * (PHP_4_3) + acinclude.m4 + config.guess + config.sub + configure.in + ltmain.sh: + - MFH: libtool upgrade to 1.4.3 + + * acinclude.m4 + configure.in + ltmain.sh: + - Updated libtool to 1.4.3 which has test for the sed problem.. + +2003-02-10 Jon Parise <jon****@csh*****> + + * ext/pgsql/pgsql.c: + Correct the spelling of 'supported'. + +2003-02-10 Stig Bakken <ssb****@fast*****> + + * pear/PEAR.php: + - update PEAR::isError phpdoc + + * pear/PEAR.php: + - PEAR::isError accepts second parameter that will be matched against + the error code. PEAR::isError($obj, FOO) will return true if $obj + is an error object, and $obj->getCode() returns FOO. + + * pear/install-pear.txt: + - the "a" in "pear" is "application" now + +2003-02-10 Wez Furlong <wez.p****@thebr*****> + + * ext/rpc/com/com_wrapper.c: + Error reporting clean up + + * ext/rpc/rpc.c: + Newly created objects should use a separate function_table from the global + class entry table. + For objects instantiated via new, make sure that intern->function_table + uses the newly created table when the class is registered. + For generic per-object hashing, copy the ce->function_table into + intern->function_table. + + * ext/rpc/com/com.c + ext/rpc/com/com_wrapper.c: + Error reporting leaks and cleanup + +2003-02-10 Zeev Suraski <zeev****@zend*****> + + * tests/lang/bug21961.phpt: + Fix the test + +2003-02-10 Wez Furlong <wez.p****@thebr*****> + + * ext/openssl/openssl.c: + Add additional optional parameter to openssl_pkcs7_encrypt to specify the + cipher. The cipher can be one of the constants listed below. + + Based on a patch from: + stefan at cuba dot ionum dot ch + + OPENSSL_CIPHER_RC2_40, (the default) + OPENSSL_CIPHER_RC2_128, + OPENSSL_CIPHER_RC2_64, + OPENSSL_CIPHER_DES, + OPENSSL_CIPHER_3DES, + + proto bool openssl_pkcs7_encrypt(string infile, string outfile, + mixed recipcerts, array headers [, long flags [, long cipher]]) + +2003-02-10 Harald Radi <haral****@nme*****> + + * (PHP_4_3) + NEWS: + 18 times the speed of light + +2003-02-10 Hartmut Holzgraefe <hartm****@six*****> + + * ext/fdf/fdf.c: + proto fixes + +2003-02-10 Jani Taskinen <snipe****@iki*****> + + * ext/notes/php_notes.c: + some win32 fixes by Kai + +2003-02-10 Wez Furlong <wez.p****@thebr*****> + + * win32/installer/gen-nsis.php + win32/installer/setini.php: + Fix php.ini customization. + Apparently, it seems that running the php script with output captured to + the log prevented it from working correctly. + + Also, deletes the php.ini when uninstalled. + + TODO: The defaults install and activate all extensions. This is a problem + for those extension that require non-bundled .dlls (such as OCI). + 2003-02-09 Jani Taskinen <snipe****@iki*****> * (PHP_4_3) 1.8 +1 -3 php4/NEWS Index: NEWS =================================================================== RCS file: /cvsroot/php-i18n/php4/NEWS,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- NEWS 11 Feb 2003 03:24:04 -0000 1.7 +++ NEWS 11 Feb 2003 14:04:49 -0000 1.8 @@ -8,12 +8,10 @@ - Changed get_extension_funcs() to return list of the built-in Zend Engine functions if "zend" is specified as the module name. (Ilia) - Changed is_executable() to be available also on Windows. (Shane) -- Changed array_search() to accept objects also as a needle. (Moriyoshi) +- Changed array_search() to accept also objects as a needle. (Moriyoshi) - Changed ext/mcrypt to require libmcrypt version 2.5.6 or greater. (Derick) - Changed uniqid() parameters to be optional and allow any prefix length. (Marcus) -- Added zlib_get_coding_type() function, which returns one of coding types - used for output compression. (Moriyoshi) - Added improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright) - Added stream_get_line() function. This function will read either the specified number of bytes or until the ending string is found. (Ilia) 1.4 +96 -19 php4/ext/ingres_ii/ii.c Index: ii.c =================================================================== RCS file: /cvsroot/php-i18n/php4/ext/ingres_ii/ii.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ii.c 11 Feb 2003 03:24:14 -0000 1.3 +++ ii.c 11 Feb 2003 14:04:49 -0000 1.4 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ii.c,v 1.34 2003/01/19 00:45:40 iliaa Exp $ */ +/* $Id: ii.c,v 1.35 2003/02/11 02:42:58 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -75,7 +75,7 @@ PHP_RINIT(ii), PHP_RSHUTDOWN(ii), PHP_MINFO(ii), - NO_VERSION_YET, + NO_VERSION_YET, STANDARD_MODULE_PROPERTIES }; @@ -189,17 +189,25 @@ used when the request ends to 'refresh' the link for use by the next request */ -static void _clean_ii_plink(zend_rsrc_list_entry *rsrc TSRMLS_DC) +static void _ai_clean_ii_plink(II_LINK *link TSRMLS_DC) { - II_LINK *link = (II_LINK *) rsrc->ptr; + int ai_error = 0; + IIAPI_DISCONNPARM disconnParm; IIAPI_AUTOPARM autoParm; + /* if link as always been marked as broken do nothing */ + /* This because we call this function directly from close function */ + /* And it's called in the end of request */ + if (link->connHandle == NULL) { + return; + } + + if (link->stmtHandle && _close_statement(link)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Ingres II: Unable to close statement !!"); + ai_error = 1; + } + if (link->autocommit) { - - if (link->stmtHandle && _close_statement(link)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Ingres II: Unable to close statement !!"); - } - autoParm.ac_genParm.gp_callback = NULL; autoParm.ac_genParm.gp_closure = NULL; autoParm.ac_connHandle = link->connHandle; @@ -219,6 +227,22 @@ if (link->tranHandle && _rollback_transaction(link TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Ingres II: Unable to rollback transaction !!"); } + + /* Assume link is broken, close it, and mark it as broken with conn Handle NULL */ + if (ai_error) { + disconnParm.dc_genParm.gp_callback = NULL; + disconnParm.dc_genParm.gp_closure = NULL; + disconnParm.dc_connHandle = link->connHandle; + + IIapi_disconnect(&disconnParm); + link->connHandle = NULL; + } +} + +static void _clean_ii_plink(zend_rsrc_list_entry *rsrc TSRMLS_DC) +{ + II_LINK *link = (II_LINK *)rsrc->ptr; + _ai_clean_ii_plink(link TSRMLS_CC); } /* sets the default link @@ -373,6 +397,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Ingres II: Server or API error - no error message available"); } else { IIAPI_GETEINFOPARM getEInfoParm; + TSRMLS_FETCH(); getEInfoParm.ge_errorHandle = genParm->gp_errorHandle; IIapi_getErrorInfo(&getEInfoParm); @@ -522,7 +547,40 @@ /* unable to figure out the right way to do this */ /* maybe does the api handle the reconnection transparently ? */ link = (II_LINK *) le->ptr; + + /* Unfortunetaly NO !!!*/ + /* Ingres api doesn't reconnect */ + /* Have to reconnect if cleaning function has flagged link as broken */ + if (link->connHandle == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,"Ingres II: Broken link (%s),reconnect", db); + + /* Recreate the link */ + connParm.co_genParm.gp_callback = NULL; + connParm.co_genParm.gp_closure = NULL; + connParm.co_target = db; + connParm.co_username = user; + connParm.co_password = pass; + connParm.co_timeout = -1; /* no timeout */ + connParm.co_connHandle = NULL; + connParm.co_tranHandle = NULL; + + IIapi_connect(&connParm); + + if (!ii_sync(&(connParm.co_genParm)) || ii_success(&(connParm.co_genParm)) == II_FAIL) { + efree(hashed_details); + php_error_docref(NULL TSRMLS_CC, E_WARNING,"Ingres II: Unable to connect to database (%s)", db); + RETURN_FALSE; + } + + link->connHandle = connParm.co_connHandle; + link->tranHandle = NULL; + link->stmtHandle = NULL; + link->fieldCount = 0; + link->descriptor = NULL; + link->autocommit = 0; + } } + ZEND_REGISTER_RESOURCE(return_value, link, le_ii_plink); } else { /* non persistent */ @@ -626,23 +684,43 @@ Close an Ingres II database connection */ PHP_FUNCTION(ingres_close) { - zval **link; - int argc; + zval **link = NULL; int link_id = -1; II_LINK *ii_link; - argc = ZEND_NUM_ARGS(); - if (argc > 1 || (argc && zend_get_parameters_ex(argc, &link) == FAILURE)) { - WRONG_PARAM_COUNT; - } + switch (ZEND_NUM_ARGS()) { + case 0: + link_id = IIG(default_link); + break; - if (argc == 0) { - link_id = IIG(default_link); + case 1: + if (zend_get_parameters_ex(1, &link) == FAILURE) { + RETURN_FALSE; + } + link_id = -1; + break; + + default: + WRONG_PARAM_COUNT; + break; } ZEND_FETCH_RESOURCE2(ii_link, II_LINK *, link, link_id, "Ingres II Link", le_ii_link, le_ii_plink); - zend_list_delete(link_id); + /* Call the clean function synchronously here */ + /* Otherwise we have to wait for request shutdown */ + /* This way we can reuse the link in the same script */ + _ai_clean_ii_plink(ii_link TSRMLS_CC); + + if (link_id == -1) { /* explicit resource number */ + zend_list_delete(Z_RESVAL_PP(link)); + } + + if (link_id != -1 || (link && Z_RESVAL_PP(link) == IIG(default_link))) { + zend_list_delete(IIG(default_link)); + IIG(default_link) = -1; + } + RETURN_TRUE; } /* }}} */ @@ -1464,4 +1542,3 @@ * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ - 1.5 +19 -5 php4/ext/mssql/php_mssql.c Index: php_mssql.c =================================================================== RCS file: /cvsroot/php-i18n/php4/ext/mssql/php_mssql.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- php_mssql.c 11 Feb 2003 03:24:16 -0000 1.4 +++ php_mssql.c 11 Feb 2003 14:04:50 -0000 1.5 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.106 2003/02/09 12:15:05 derick Exp $ */ +/* $Id: php_mssql.c,v 1.107 2003/02/11 01:24:07 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -822,7 +822,7 @@ DBDATEREC dateinfo; int res_length = dbdatlen(mssql_ptr->link,offset); - if ((column_type != SQLDATETIME) || MS_SQL_G(datetimeconvert)) { + if ((column_type != SQLDATETIME && column_type != SQLDATETIM4) || MS_SQL_G(datetimeconvert)) { if (column_type == SQLDATETIM4) res_length += 14; if (column_type == SQLDATETIME) res_length += 10; @@ -830,7 +830,14 @@ res_buf = (unsigned char *) emalloc(res_length+1); res_length = dbconvert(NULL,coltype(offset),dbdata(mssql_ptr->link,offset), res_length, SQLCHAR,res_buf,-1); } else { - dbdatecrack(mssql_ptr->link, &dateinfo, (DBDATETIME *) dbdata(mssql_ptr->link,offset)); + if (column_type == SQLDATETIM4) { + DBDATETIME temp; + + dbconvert(NULL, SQLDATETIM4, dbdata(mssql_ptr->link,offset), -1, SQLDATETIME, (LPBYTE) &temp, -1); + dbdatecrack(mssql_ptr->link, &dateinfo, &temp); + } else { + dbdatecrack(mssql_ptr->link, &dateinfo, (DBDATETIME *) dbdata(mssql_ptr->link,offset)); + } res_length = 19; res_buf = (unsigned char *) emalloc(res_length+1); @@ -875,7 +882,7 @@ DBDATEREC dateinfo; int res_length = dbdatlen(mssql_ptr->link,offset); - if ((column_type != SQLDATETIME) || MS_SQL_G(datetimeconvert)) { + if ((column_type != SQLDATETIME && column_type != SQLDATETIM4) || MS_SQL_G(datetimeconvert)) { if (column_type == SQLDATETIM4) res_length += 14; if (column_type == SQLDATETIME) res_length += 10; @@ -884,7 +891,14 @@ res_length = dbconvert(NULL,coltype(offset),dbdata(mssql_ptr->link,offset), res_length, SQLCHAR, res_buf, -1); } else { - dbdatecrack(mssql_ptr->link, &dateinfo, (DBDATETIME *) dbdata(mssql_ptr->link,offset)); + if (column_type == SQLDATETIM4) { + DBDATETIME temp; + + dbconvert(NULL, SQLDATETIM4, dbdata(mssql_ptr->link,offset), -1, SQLDATETIME, (LPBYTE) &temp, -1); + dbdatecrack(mssql_ptr->link, &dateinfo, &temp); + } else { + dbdatecrack(mssql_ptr->link, &dateinfo, (DBDATETIME *) dbdata(mssql_ptr->link,offset)); + } res_length = 19; res_buf = (unsigned char *) emalloc(res_length+1); 1.4 +9 -7 php4/ext/readline/config.m4 Index: config.m4 =================================================================== RCS file: /cvsroot/php-i18n/php4/ext/readline/config.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- config.m4 11 Feb 2003 03:24:23 -0000 1.3 +++ config.m4 11 Feb 2003 14:04:50 -0000 1.4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.17 2002/08/22 00:34:07 sniper Exp $ +dnl $Id: config.m4,v 1.18 2003/02/11 03:24:30 sniper Exp $ dnl PHP_ARG_WITH(libedit,for libedit readline replacement, @@ -18,15 +18,16 @@ if test -z "$READLINE_DIR"; then AC_MSG_ERROR(Please reinstall readline - I cannot find readline.h) fi + PHP_ADD_INCLUDE($READLINE_DIR/include) AC_CHECK_LIB(ncurses, tgetent, [ - PHP_ADD_LIBRARY_WITH_PATH(ncurses,,READLINE_SHARED_LIBADD) + PHP_ADD_LIBRARY(ncurses,,READLINE_SHARED_LIBADD) ],[ AC_CHECK_LIB(termcap, tgetent, [ - PHP_ADD_LIBRARY_WITH_PATH(termcap,,READLINE_SHARED_LIBADD) + PHP_ADD_LIBRARY(termcap,,READLINE_SHARED_LIBADD) ]) ]) @@ -52,9 +53,9 @@ AC_DEFINE(HAVE_LIBREADLINE, 1, [ ]) PHP_NEW_EXTENSION(readline, readline.c, $ext_shared, cli) -fi -if test "$PHP_LIBEDIT" != "no"; then +elif test "$PHP_LIBEDIT" != "no"; then + for i in /usr/local /usr $PHP_LIBEDIT; do if test -f $i/include/readline/readline.h; then LIBEDIT_DIR=$i @@ -64,15 +65,16 @@ if test -z "$LIBEDIT_DIR"; then AC_MSG_ERROR(Please reinstall libedit - I cannot find readline.h) fi + PHP_ADD_INCLUDE($LIBEDIT_DIR/include) AC_CHECK_LIB(ncurses, tgetent, [ - PHP_ADD_LIBRARY_WITH_PATH(ncurses,,READLINE_SHARED_LIBADD) + PHP_ADD_LIBRARY(ncurses,,READLINE_SHARED_LIBADD) ],[ AC_CHECK_LIB(termcap, tgetent, [ - PHP_ADD_LIBRARY_WITH_PATH(termcap,,READLINE_SHARED_LIBADD) + PHP_ADD_LIBRARY(termcap,,READLINE_SHARED_LIBADD) ]) ]) 1.6 +0 -6 php4/pear/Makefile.frag Index: Makefile.frag =================================================================== RCS file: /cvsroot/php-i18n/php4/pear/Makefile.frag,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.frag 11 Feb 2003 03:24:38 -0000 1.5 +++ Makefile.frag 11 Feb 2003 14:04:50 -0000 1.6 @@ -20,9 +20,3 @@ exit 5; \ fi -#$(builddir)/scripts/pear: $(srcdir)/scripts/pear.in $(top_builddir)/config.status -# (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status) - -#$(builddir)/scripts/phptar: $(srcdir)/scripts/phptar.in $(top_builddir)/config.status -# (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status) - 1.5 +13 -1 php4/sapi/apache/config.m4 Index: config.m4 =================================================================== RCS file: /cvsroot/php-i18n/php4/sapi/apache/config.m4,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- config.m4 11 Feb 2003 03:24:39 -0000 1.4 +++ config.m4 11 Feb 2003 14:04:50 -0000 1.5 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.62 2002/07/25 18:37:16 sniper Exp $ +dnl $Id: config.m4,v 1.64 2003/02/11 02:34:52 sas Exp $ dnl AC_MSG_CHECKING(for Apache 1.x module support via DSO through APXS) @@ -212,6 +212,18 @@ PHP_SUBST(APACHE_INSTALL) PHP_SUBST(STRONGHOLD) +AC_CACHE_CHECK([for member fd in BUFF *],ac_cv_php_fd_in_buff,[ + save=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE" + AC_TRY_COMPILE([#include <httpd.h>],[conn_rec *c; int fd = c->client->fd;],[ + ac_cv_php_fd_in_buff=yes],[ac_cv_php_fd_in_buff=no],[ac_cv_php_fd_in_buff=no]) + CPPFLAGS=$save +]) +if test "$ac_cv_php_fd_in_buff" = "yes"; then + AC_DEFINE(PHP_APACHE_HAVE_CLIENT_FD,1,[ ]) +fi + + AC_MSG_CHECKING(for mod_charset compatibility option) AC_ARG_WITH(mod_charset, [ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache).], 1.6 +3 -1 php4/sapi/apache/mod_php4.c Index: mod_php4.c =================================================================== RCS file: /cvsroot/php-i18n/php4/sapi/apache/mod_php4.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_php4.c 11 Feb 2003 03:24:39 -0000 1.5 +++ mod_php4.c 11 Feb 2003 14:04:50 -0000 1.6 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <zeev****@zend*****> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php4.c,v 1.155 2003/02/09 21:15:54 sas Exp $ */ +/* $Id: mod_php4.c,v 1.156 2003/02/11 02:23:29 sas Exp $ */ #include "php_apache_http.h" #include "http_conf_globals.h" @@ -348,6 +348,7 @@ */ static int sapi_apache_get_fd(int *nfd TSRMLS_DC) { +#if PHP_APACHE_HAVE_CLIENT_FD request_rec *r = SG(server_context); int fd; @@ -357,6 +358,7 @@ if (nfd) *nfd = fd; return SUCCESS; } +#endif return FAILURE; } /* }}} */