[PHP-CVS] cvs: php-src /main php_variables.c
stasTue Oct 7 04:46:17 2003 EDT
Modified files:
/php-src/main php_variables.c
Log:
Fix $_SERVER['argv'] and $_SERVER['argc']
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.69 php-src/main/php_variables.c:1.70
--- php-src/main/php_variables.c:1.69 Wed Oct 1 19:11:59 2003
+++ php-src/main/php_variables.cTue Oct 7 04:46:16 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: php_variables.c,v 1.69 2003/10/01 23:11:59 andrei Exp $ */
+/* $Id: php_variables.c,v 1.70 2003/10/07 08:46:16 stas Exp $ */
#include
#include "php.h"
@@ -438,7 +438,8 @@
argc->refcount++;
zend_hash_update(&EG(symbol_table), "argv", sizeof("argv"), &arr,
sizeof(zval *), NULL);
zend_hash_add(&EG(symbol_table), "argc", sizeof("argc"), &argc,
sizeof(zval *), NULL);
- } else if (!SG(request_info).argc) {
+ }
+ if (track_vars_array) {
arr->refcount++;
argc->refcount++;
zend_hash_update(Z_ARRVAL_P(track_vars_array), "argv", sizeof("argv"),
&arr, sizeof(pval *), NULL);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/informix ifx.ec
nobbie Tue Oct 7 05:29:56 2003 EDT
Modified files:
/php-src/ext/informix ifx.ec
Log:
- Fixed bug #18534 (ifx_close() leaves open session)
- (ifx_do_close) Added
Index: php-src/ext/informix/ifx.ec
diff -u php-src/ext/informix/ifx.ec:1.96 php-src/ext/informix/ifx.ec:1.97
--- php-src/ext/informix/ifx.ec:1.96Thu Sep 11 19:49:25 2003
+++ php-src/ext/informix/ifx.ec Tue Oct 7 05:29:55 2003
@@ -21,7 +21,7 @@
+--+
*/
-/* $Id: ifx.ec,v 1.96 2003/09/11 23:49:25 sniper Exp $ */
+/* $Id: ifx.ec,v 1.97 2003/10/07 09:29:55 nobbie Exp $ */
/* ---
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
@@ -278,36 +278,70 @@
return(ifx_err_msg);
}
-static void _close_ifx_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
-{
+static void ifx_do_close(link)
EXEC SQL BEGIN DECLARE SECTION;
- char *link;
+ PARAMETER char *link;
EXEC SQL END DECLARE SECTION;
-
- link=(char *)rsrc->ptr;
+{
EXEC SQL SET CONNECTION :link;
+
if (ifx_check() >= 0) {
- EXEC SQL close database;
- EXEC SQL DISCONNECT CURRENT;
+ EXEC SQL DISCONNECT :link;
+
+ /* check if were in a transaction */
+ if (SQLCODE == -1800) {
+ EXEC SQL SET CONNECTION :link;
+ EXEC SQL ROLLBACK WORK;
+ if (ifx_check() == 0) {
+ /* DISCONNECT again, after rollback */
+ EXEC SQL DISCONNECT :link;
+ if (ifx_check() < 0) {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Disconnect link %s after Automatic Rollback fails (%s)", link, ifx_error(link));
+ }
+ }
+ if (ifx_check() < 0) {
+ /* CLOSE database if rollback or disconnect fails */
+ EXEC SQL CLOSE DATABASE;
+ if (ifx_check() < 0) {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Close database fails %s (%s)", link, ifx_error(link));
+ }
+ }
+ }
+ else if (SQLCODE < 0) {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Disconnect link
%s fails (%s)", link, ifx_error(link));
+ }
+ }
+ else {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Set connection %s fails
(%s)", link, ifx_error(link));
}
+
+}
+
+static void _close_ifx_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+{
+ char *link;
+
+ link=(char *)rsrc->ptr;
+
+ ifx_do_close(link);
+
efree(link);
IFXG(num_links)--;
}
static void _close_ifx_plink(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
-EXEC SQL BEGIN DECLARE SECTION;
char *link;
-EXEC SQL END DECLARE SECTION;
link = (char *)rsrc->ptr;
- EXEC SQL SET CONNECTION :link;
- if (ifx_check() >= 0) {
- EXEC SQL close database;
- EXEC SQL DISCONNECT CURRENT;
- }
+ ifx_do_close(link);
+
free(link);
IFXG(num_persistent)--;
IFXG(num_links)--;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/informix ifx.ec
nobbie Tue Oct 7 05:36:39 2003 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/informix ifx.ec
Log:
MFH: - Fixed bug #18534 (ifx_close() leaves open session)
MFH: - (ifx_do_close) Added
Index: php-src/ext/informix/ifx.ec
diff -u php-src/ext/informix/ifx.ec:1.69.2.20 php-src/ext/informix/ifx.ec:1.69.2.21
--- php-src/ext/informix/ifx.ec:1.69.2.20 Thu Sep 11 19:51:12 2003
+++ php-src/ext/informix/ifx.ec Tue Oct 7 05:36:38 2003
@@ -21,7 +21,7 @@
+--+
*/
-/* $Id: ifx.ec,v 1.69.2.20 2003/09/11 23:51:12 sniper Exp $ */
+/* $Id: ifx.ec,v 1.69.2.21 2003/10/07 09:36:38 nobbie Exp $ */
/* ---
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
@@ -278,36 +278,70 @@
return(ifx_err_msg);
}
-static void _close_ifx_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
-{
+static void ifx_do_close(link)
EXEC SQL BEGIN DECLARE SECTION;
- char *link;
+ PARAMETER char *link;
EXEC SQL END DECLARE SECTION;
-
- link=(char *)rsrc->ptr;
+{
EXEC SQL SET CONNECTION :link;
+
if (ifx_check() >= 0) {
- EXEC SQL close database;
- EXEC SQL DISCONNECT CURRENT;
+ EXEC SQL DISCONNECT :link;
+
+ /* check if were in a transaction */
+ if (SQLCODE == -1800) {
+ EXEC SQL SET CONNECTION :link;
+ EXEC SQL ROLLBACK WORK;
+ if (ifx_check() == 0) {
+ /* DISCONNECT again, after rollback */
+ EXEC SQL DISCONNECT :link;
+ if (ifx_check() < 0) {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Disconnect link %s after Automatic Rollback fails (%s)", link, ifx_error(link));
+ }
+ }
+ if (ifx_check() < 0) {
+ /* CLOSE database if rollback or disconnect fails */
+ EXEC SQL CLOSE DATABASE;
+ if (ifx_check() < 0) {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Close database fails %s (%s)", link, ifx_error(link));
+ }
+ }
+ }
+ else if (SQLCODE < 0) {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Disconnect link
%s fails (%s)", link, ifx_error(link));
+ }
+ }
+ else {
+ IFXG(sv_sqlcode) = SQLCODE;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Set connection %s fails
(%s)", link, ifx_error(link));
}
+
+}
+
+static void _close_ifx_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+{
+ char *link;
+
+ link=(char *)rsrc->ptr;
+
+ ifx_do_close(link);
+
efree(link);
IFXG(num_links)--;
}
static void _close_ifx_plink(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
-EXEC SQL BEGIN DECLARE SECTION;
char *link;
-EXEC SQL END DECLARE SECTION;
link = (char *)rsrc->ptr;
- EXEC SQL SET CONNECTION :link;
- if (ifx_check() >= 0) {
- EXEC SQL close database;
- EXEC SQL DISCONNECT CURRENT;
- }
+ ifx_do_close(link);
+
free(link);
IFXG(num_persistent)--;
IFXG(num_links)--;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / configure.in
helly Tue Oct 7 05:40:40 2003 EDT
Modified files:
/php-srcconfigure.in
Log:
Fix version test
Index: php-src/configure.in
diff -u php-src/configure.in:1.468 php-src/configure.in:1.469
--- php-src/configure.in:1.468 Tue Oct 7 05:33:19 2003
+++ php-src/configure.inTue Oct 7 05:40:39 2003
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.468 2003/10/07 09:33:19 helly Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.469 2003/10/07 09:40:39 helly Exp $ -*- sh -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -137,7 +137,7 @@
else
AC_MSG_CHECKING([bison version])
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'|tr -d
a-z`
-if test "${1}" = "1" -a "${2}" != "28" -a "${2}" != "35" -a "${2}" != "75" -a
"${2}" != "875"; then
+if test "${1}" -ne "1" -o "(" "${2}" != "28" -a "${2}" != "35" -a "${2}" != "75"
-a "${2}" != "875" ")"; then
AC_MSG_WARN([You will need bison 1.28, 1.35, 1.75 or 1.875 if you want to
regenerate the Zend parser (found ${1}.${2}).])
fi
AC_MSG_RESULT(${1}.${2} (ok))
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS
sniper Tue Oct 7 05:59:51 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS Log: BFN Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.426 php-src/NEWS:1.1247.2.427 --- php-src/NEWS:1.1247.2.426 Mon Oct 6 20:11:03 2003 +++ php-src/NEWSTue Oct 7 05:59:50 2003 @@ -13,6 +13,7 @@ - Fixed bug #25703 (openssl configure check failed). (Jani) - Fixed bug #25701 (On flush() set headers_sent in apache2handler). (Ilia) - Fixed bug #25669 (eregi() with non-ascii characters). (Moriyoshi) +- Fixed bug #18534 (ifx_close() leaves open session). ([EMAIL PROTECTED]) 29 Sep 2003, Version 4.3.4RC1 - Made MCVE extension available on win32. (Jani) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
rasmus Tue Oct 7 10:09:23 2003 EDT Modified files: /CVSROOTavail Log: pear karma for tarjei Index: CVSROOT/avail diff -u CVSROOT/avail:1.757 CVSROOT/avail:1.758 --- CVSROOT/avail:1.757 Tue Oct 7 01:46:17 2003 +++ CVSROOT/avail Tue Oct 7 10:09:17 2003 @@ -45,7 +45,7 @@ # The PEAR Team has access to the full PEAR tree, the PEAR portion of # the PHP tree, the PEAR website, and the PEAR documentation. -avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,darknoise|pear,peardoc +avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,darknoise,tarjei|pear,peardoc # PEAR bits in the main php-src module avail|cox,mj,vblavet,dickmann,tal,pajoye,jmcastagnetto,alexmerz,cellog|php-src/pear -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/com_dotnet com_handlers.c /ext/mono php_mono.c /ext/simplexml simplexml.c
zeevTue Oct 7 11:47:24 2003 EDT
Modified files:
/php-src/ext/com_dotnet com_handlers.c
/php-src/ext/mono php_mono.c
/php-src/ext/simplexml simplexml.c
Log:
Fix cast callbacks
Index: php-src/ext/com_dotnet/com_handlers.c
diff -u php-src/ext/com_dotnet/com_handlers.c:1.3
php-src/ext/com_dotnet/com_handlers.c:1.4
--- php-src/ext/com_dotnet/com_handlers.c:1.3 Sun Oct 5 04:08:44 2003
+++ php-src/ext/com_dotnet/com_handlers.c Tue Oct 7 11:47:22 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: com_handlers.c,v 1.3 2003/10/05 08:08:44 zeev Exp $ */
+/* $Id: com_handlers.c,v 1.4 2003/10/07 15:47:22 zeev Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -445,7 +445,7 @@
return ret;
}
-static void com_object_cast(zval *readobj, zval *writeobj, int type, int should_free
TSRMLS_DC)
+static int com_object_cast(zval *readobj, zval *writeobj, int type, int should_free
TSRMLS_DC)
{
php_com_dotnet_object *obj;
VARIANT v;
@@ -463,12 +463,12 @@
if (V_VT(&obj->v) == VT_DISPATCH) {
if (!obj->have_default_bind && !com_get_default_binding(obj
TSRMLS_CC)) {
- return;
+ return FAILURE;
}
if (FAILURE == php_com_do_invoke_by_id(obj, obj->default_bind,
DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, 0, NULL
TSRMLS_CC)) {
- return;
+ return FAILURE;
}
} else {
VariantCopy(&v, &obj->v);
@@ -495,6 +495,7 @@
php_com_zval_from_variant(writeobj, &v, obj->code_page TSRMLS_CC);
VariantClear(&v);
+ return SUCCESS;
}
zend_object_handlers php_com_object_handlers = {
Index: php-src/ext/mono/php_mono.c
diff -u php-src/ext/mono/php_mono.c:1.9 php-src/ext/mono/php_mono.c:1.10
--- php-src/ext/mono/php_mono.c:1.9 Sun Oct 5 04:08:47 2003
+++ php-src/ext/mono/php_mono.c Tue Oct 7 11:47:22 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: php_mono.c,v 1.9 2003/10/05 08:08:47 zeev Exp $ */
+/* $Id: php_mono.c,v 1.10 2003/10/07 15:47:22 zeev Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -712,7 +712,7 @@
return mono_class_entry;
}
-static void
+static int
cast_object(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
{
php_mono_object *pm;
@@ -729,7 +729,10 @@
case IS_DOUBLE:
php_call_mono_method(pm, "ToDouble", sizeof("ToDouble")-1,
(void **) NULL, 0, &writeobj TSRMLS_CC);
break;
- }
+ default:
+ return FAILURE;
+ }
+ return SUCCESS;
}
static zend_object_handlers mono_object_handlers[] = {
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.63 php-src/ext/simplexml/simplexml.c:1.64
--- php-src/ext/simplexml/simplexml.c:1.63 Sun Oct 5 21:04:49 2003
+++ php-src/ext/simplexml/simplexml.c Tue Oct 7 11:47:23 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: simplexml.c,v 1.63 2003/10/06 01:04:49 moriyoshi Exp $ */
+/* $Id: simplexml.c,v 1.64 2003/10/07 15:47:23 zeev Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -724,7 +724,7 @@
/* {{{ cast_object()
*/
-static void
+static int
cast_object(zval *object, int type, char *contents TSRMLS_DC)
{
if (contents) {
@@ -744,18 +744,22 @@
case IS_DOUBLE:
convert_to_double(object);
break;
+ default:
+ return FAILURE;
}
+ return SUCCESS;
}
/* }}} */
/* {{{ sxe_object_cast()
*/
-static void
+static int
sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
{
php_sxe_object *sxe;
char *contents = NULL;
zval free_obj;
+ int rv;
sxe = php_sxe_fetch_object(readobj TSRMLS_CC);
if (should_free) {
@@ -774,7 +778,7 @@
}
}
- cast_object(writeobj, type, contents TSRMLS_CC);
+ rv = cast_object(writeobj, type, contents TSRMLS_CC);
if (contents) {
xmlFree(contents);
@@ -782,6 +786,7 @@
if (should_free) {
zval_dtor(&free_obj);
}
+ return rv;
}
/* }}} */
@@ -1070,7 +1075,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.63 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.64 $");
php_info_print_table_end();
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
[PHP-CVS] cvs: php-src /ext/com_dotnet com_com.c
wez Tue Oct 7 14:50:08 2003 EDT
Modified files:
/php-src/ext/com_dotnet com_com.c
Log:
A much better fix for moniker based COM object creation.
We now support binding monikers to remote machines.
However, MSDN docs indicate that this isn't yet implemented
as of Win2000.
Index: php-src/ext/com_dotnet/com_com.c
diff -u php-src/ext/com_dotnet/com_com.c:1.3 php-src/ext/com_dotnet/com_com.c:1.4
--- php-src/ext/com_dotnet/com_com.c:1.3Mon Oct 6 11:10:38 2003
+++ php-src/ext/com_dotnet/com_com.cTue Oct 7 14:50:07 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: com_com.c,v 1.3 2003/10/06 15:10:38 wez Exp $ */
+/* $Id: com_com.c,v 1.4 2003/10/07 18:50:07 wez Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -45,6 +45,13 @@
HRESULT res = E_FAIL;
int mode = COMG(autoreg_case_sensitive) ? CONST_CS : 0;
ITypeLib *TL = NULL;
+ COSERVERINFOinfo;
+ COAUTHIDENTITY authid = {0};
+ COAUTHINFO authinfo = {
+ RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL,
+ RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE,
+ &authid, EOAC_NONE
+ };
obj = CDNO_FETCH(object);
@@ -112,40 +119,9 @@
moniker = php_com_string_to_olestring(module_name, module_name_len,
obj->code_page TSRMLS_CC);
- if (FAILED(CLSIDFromString(moniker, &clsid))) {
- /* try to use it as a moniker */
- IBindCtx *pBindCtx = NULL;
- IMoniker *pMoniker = NULL;
- ULONG ulEaten;
-
- if (server_params != NULL) {
- /* TODO: review this.
-* The assumption seems to be that monikers cannot be invoked
for remote servers.
-* The BindCtx might allow this however */
- res = MK_E_SYNTAX;
- } else if (SUCCEEDED(res = CreateBindCtx(0, &pBindCtx)) &&
- SUCCEEDED(res = MkParseDisplayName(pBindCtx, moniker,
&ulEaten, &pMoniker))) {
- res = IMoniker_BindToObject(pMoniker, pBindCtx, NULL,
&IID_IDispatch, (LPVOID*)&V_DISPATCH(&obj->v));
-
- if (SUCCEEDED(res)) {
- V_VT(&obj->v) = VT_DISPATCH;
- }
-
- IMoniker_Release(pMoniker);
- }
- if (pBindCtx) {
- IBindCtx_Release(pBindCtx);
- }
- } else if (server_name) {
- COSERVERINFOinfo;
- MULTI_QIqi;
- COAUTHIDENTITY authid;
- COAUTHINFO authinfo = {
- RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL,
- RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE,
- &authid, EOAC_NONE
- };
-
+ /* if instantiating a remote object, either directly, or via
+* a moniker, fill in the relevant info */
+ if (server_name) {
info.dwReserved1 = 0;
info.dwReserved2 = 0;
info.pwszName = php_com_string_to_olestring(server_name,
server_name_len, obj->code_page TSRMLS_CC);
@@ -174,24 +150,72 @@
} else {
info.pAuthInfo = NULL;
}
+ }
+
+ if (FAILED(CLSIDFromString(moniker, &clsid))) {
+ /* try to use it as a moniker */
+ IBindCtx *pBindCtx = NULL;
+ IMoniker *pMoniker = NULL;
+ ULONG ulEaten;
+ BIND_OPTS2 bopt = {0};
+
+ if (SUCCEEDED(res = CreateBindCtx(0, &pBindCtx))) {
+ if (server_name) {
+ /* fill in the remote server info.
+* MSDN docs indicate that this might be ignored in
+* current win32 implementations, but at least we are
+* doing the right thing in readiness for the day that
+* it does work */
+ bopt.cbStruct = sizeof(bopt);
+ IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS*)&bopt);
+ bopt.pServerInfo = &info;
+ /* apparently, GetBindOptions will only ever return
+* a regular BIND_OPTS structure. My gut feeling is
+* that it will modify the size field to reflect that
+* so lets be safe and set it to the BIND_OPTS2 size
+* again */
+ bopt.cbStruct = sizeof(bopt);
+ IBindCtx_SetBindOptions(pBindCtx, (BIND_OPTS*)&bopt);
+
[PHP-CVS] cvs: php-src / NEWS
sniper Tue Oct 7 20:54:30 2003 EDT Modified files: /php-srcNEWS Log: BFN Index: php-src/NEWS diff -u php-src/NEWS:1.1472 php-src/NEWS:1.1473 --- php-src/NEWS:1.1472 Sun Oct 5 21:07:15 2003 +++ php-src/NEWSTue Oct 7 20:54:29 2003 @@ -55,6 +55,7 @@ - Fixed bug #22367 (undefined variable has a value). (Zeev) - Fixed bug #19859 (allow fast_call_user_function to support __call). (Stanislav) +- Fixed bug #17997 (Warning when switch() and reference are combined). (Zeev) - Fixed bug #17988 (strtotime failed to parse postgresql timestamp). (Derick) 29 Jun 2003, PHP 5 Beta 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard var.c /ext/standard/tests/array bug25758.phpt
iliaa Tue Oct 7 21:16:45 2003 EDT
Added files:
/php-src/ext/standard/tests/array bug25758.phpt
Modified files:
/php-src/ext/standard var.c
Log:
Fixed bug #25758 (var_export does not escape ' & \ inside array keys)
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.171 php-src/ext/standard/var.c:1.172
--- php-src/ext/standard/var.c:1.171Thu Aug 28 12:28:33 2003
+++ php-src/ext/standard/var.c Tue Oct 7 21:16:44 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: var.c,v 1.171 2003/08/28 16:28:33 sas Exp $ */
+/* $Id: var.c,v 1.172 2003/10/08 01:16:44 iliaa Exp $ */
/* {{{ includes
@@ -271,7 +271,11 @@
if (hash_key->nKeyLength==0) { /* numeric key */
php_printf("%*c%ld => ", level + 1, ' ', hash_key->h);
} else { /* string key */
- php_printf("%*c'%s' => ", level + 1, ' ', hash_key->arKey);
+ char *key;
+ int key_len;
+ key = php_addcslashes(hash_key->arKey, strlen(hash_key->arKey),
&key_len, 0, "'\\", 2 TSRMLS_CC);
+ php_printf("%*c'%s' => ", level + 1, ' ', key);
+ efree(key);
}
php_var_export(zv, level + 2 TSRMLS_CC);
PUTS (",\n");
Index: php-src/ext/standard/tests/array/bug25758.phpt
+++ php-src/ext/standard/tests/array/bug25758.phpt
--TEST--
Bug #25758 (var_export does not escape ' & \ inside array keys)
--FILE--
array("quote'"));
echo var_export($a, true);
?>
--EXPECT--
array (
'quote\'' =>
array (
0 => 'quote\'',
),
)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard var.c /ext/standard/tests/array bug25758.phpt
iliaa Tue Oct 7 21:17:13 2003 EDT
Added files: (Branch: PHP_4_3)
/php-src/ext/standard/tests/array bug25758.phpt
Modified files:
/php-srcNEWS
/php-src/ext/standard var.c
Log:
MFH: Fixed bug #25758 (var_export does not escape ' & \ inside array keys)
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.428 php-src/NEWS:1.1247.2.429
--- php-src/NEWS:1.1247.2.428 Tue Oct 7 06:04:51 2003
+++ php-src/NEWSTue Oct 7 21:17:11 2003
@@ -5,6 +5,7 @@
POSIX compatible mode. (K.Kosako , Moriyoshi)
- Fixed bug #25770 (Segfault with PHP and bison 1.875). ([EMAIL PROTECTED], Marcus)
- Fixed bug #25764 (ldap_get_option() crashes with unbound ldap link). (Jani)
+- Fixed bug #25758 (var_export does not escape ' & \ inside array keys). (Ilia)
- Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD). (Jani)
- Fixed bug #25745 (ctype functions fail with non-ascii characters). (Moriyoshi)
- Fixed bug #25744 (make ZTS build of ext/sybase compile). (Ilia)
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.150.2.10 php-src/ext/standard/var.c:1.150.2.11
--- php-src/ext/standard/var.c:1.150.2.10 Thu Aug 28 12:01:49 2003
+++ php-src/ext/standard/var.c Tue Oct 7 21:17:11 2003
@@ -256,7 +256,11 @@
if (hash_key->nKeyLength==0) { /* numeric key */
php_printf("%*c%ld => ", level + 1, ' ', hash_key->h);
} else { /* string key */
- php_printf("%*c'%s' => ", level + 1, ' ', hash_key->arKey);
+ char *key;
+ int key_len;
+ key = php_addcslashes(hash_key->arKey, strlen(hash_key->arKey),
&key_len, 0, "'\\", 2 TSRMLS_CC);
+ php_printf("%*c'%s' => ", level + 1, ' ', key);
+ efree(key);
}
php_var_export(zv, level + 2 TSRMLS_CC);
PUTS (",\n");
Index: php-src/ext/standard/tests/array/bug25758.phpt
+++ php-src/ext/standard/tests/array/bug25758.phpt
--TEST--
Bug #25758 (var_export does not escape ' & \ inside array keys)
--FILE--
array("quote'"));
echo var_export($a, true);
?>
--EXPECT--
array (
'quote\'' =>
array (
0 => 'quote\'',
),
)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard var.c
moriyoshi Tue Oct 7 21:49:32 2003 EDT
Modified files:
/php-src/ext/standard var.c
Log:
Better fix for bug #25758
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.172 php-src/ext/standard/var.c:1.173
--- php-src/ext/standard/var.c:1.172Tue Oct 7 21:16:44 2003
+++ php-src/ext/standard/var.c Tue Oct 7 21:49:31 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: var.c,v 1.172 2003/10/08 01:16:44 iliaa Exp $ */
+/* $Id: var.c,v 1.173 2003/10/08 01:49:31 moriyoshi Exp $ */
/* {{{ includes
@@ -273,7 +273,7 @@
} else { /* string key */
char *key;
int key_len;
- key = php_addcslashes(hash_key->arKey, strlen(hash_key->arKey),
&key_len, 0, "'\\", 2 TSRMLS_CC);
+ key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength, &key_len,
0, "'\\", 2 TSRMLS_CC);
php_printf("%*c'%s' => ", level + 1, ' ', key);
efree(key);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard var.c
moriyoshi Tue Oct 7 21:51:33 2003 EDT
Modified files:
/php-src/ext/standard var.c
Log:
Oops..
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.173 php-src/ext/standard/var.c:1.174
--- php-src/ext/standard/var.c:1.173Tue Oct 7 21:49:31 2003
+++ php-src/ext/standard/var.c Tue Oct 7 21:51:32 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: var.c,v 1.173 2003/10/08 01:49:31 moriyoshi Exp $ */
+/* $Id: var.c,v 1.174 2003/10/08 01:51:32 moriyoshi Exp $ */
/* {{{ includes
@@ -273,7 +273,7 @@
} else { /* string key */
char *key;
int key_len;
- key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength, &key_len,
0, "'\\", 2 TSRMLS_CC);
+ key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength - 1,
&key_len, 0, "'\\", 2 TSRMLS_CC);
php_printf("%*c'%s' => ", level + 1, ' ', key);
efree(key);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard var.c
moriyoshi Tue Oct 7 21:52:07 2003 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/standard var.c
Log:
MFH(r-1.174): Better fix for bug #25758
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.150.2.11 php-src/ext/standard/var.c:1.150.2.12
--- php-src/ext/standard/var.c:1.150.2.11 Tue Oct 7 21:17:11 2003
+++ php-src/ext/standard/var.c Tue Oct 7 21:52:07 2003
@@ -258,7 +258,7 @@
} else { /* string key */
char *key;
int key_len;
- key = php_addcslashes(hash_key->arKey, strlen(hash_key->arKey),
&key_len, 0, "'\\", 2 TSRMLS_CC);
+ key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength - 1,
&key_len, 0, "'\\", 2 TSRMLS_CC);
php_printf("%*c'%s' => ", level + 1, ' ', key);
efree(key);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
