Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
Well, comparitively speaking, to the whole of the PHP audience, there probably aren't that many people using the ext/mcve extension for PHP, but there are a few hundred, anyhow. I'll look into PECL though to see if it is a suitable fit... -Brad Antony Dovgal wrote: On Mon, 18 Jul 2005 16:34:44 -0400 Brad House [EMAIL PROTECTED] wrote: Perhaps. There was discussion once upon a time along those lines, but nothing else came of it. I'd have to know what it entails, and if it would prohibit the extension from being distributed with the main PHP codebase. AFAIK the general plan is to move almost all extensions to PECL (and we're working on it, take a look on how many extensions were moved there in 5.0 and 5.1), so users would be able to get install only extensions they really need. Personally I don't think that ext/mcve is used by large number of users (I haven't ever heard of someone using it) and IMO that's a perfect reason to move it from the core to PECL. I can be wrong, though. There are also several rather important reasons to do so: 1) you wouldn't depend on PHP release cycles. 2) you would be able to use PECL infrastructure to build Win32 *.dll's 3) Others. All this doesn't mean that users will not be able to install/use the extension or even have some problems with it. Extensions from PECL can be installed with this command: # pear install extname See details here: http://www.php.net/manual/en/install.pecl.php Forgive my ignorance, but I have not even looked into what PECL really is. Well, I'd recommend to take a look on it, since you're the maintainer of an extension.. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
Perhaps. There was discussion once upon a time along those lines, but nothing else came of it. I'd have to know what it entails, and if it would prohibit the extension from being distributed with the main PHP codebase. Forgive my ignorance, but I have not even looked into what PECL really is. -Brad Antony Dovgal wrote: Maybe it's time to move ext/mcve to PECL, where you can safely add new functions just before new PHP release? On Mon, 18 Jul 2005 20:10:09 - Brad House [EMAIL PROTECTED] wrote: bradmssw Mon Jul 18 16:10:09 2005 EDT Modified files: /php-src/ext/mcve mcve.c php_mcve.h Log: sync missing functions from libmonetra-5 http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.32r2=1.33ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.32 php-src/ext/mcve/mcve.c:1.33 --- php-src/ext/mcve/mcve.c:1.32 Thu Jun 30 10:11:11 2005 +++ php-src/ext/mcve/mcve.c Mon Jul 18 16:10:06 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.32 2005/06/30 14:11:11 sniper Exp $ */ +/* $Id: mcve.c,v 1.33 2005/07/18 20:10:06 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -60,6 +60,10 @@ PHP_FE(m_setdropfile, NULL) PHP_FE(m_setip, NULL) PHP_FE(m_setssl,NULL) +#if LIBMONETRA_VERSION = 05 + PHP_FE(m_setssl_cafile, NULL) + PHP_FE(m_responsekeys, NULL) +#endif PHP_FE(m_setssl_files, NULL) PHP_FE(m_settimeout,NULL) PHP_FE(m_setblocking, NULL) @@ -734,6 +738,31 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto int m_setssl_cafile(resource conn, string cafile) + Set SSL CA (Certificate Authority) file for verification of server + certificate +*/ +PHP_FUNCTION(m_setssl_cafile) +{ + MCVE_CONN *conn; + int retval; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + convert_to_string_ex(arg2); + + retval = M_SetSSL_CAfile(conn, Z_STRVAL_PP(arg2)); + + RETURN_LONG(retval); +} +/* }}} */ +#endif + /* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile) Set certificate key files and certificates if server requires client certificate verification @@ -1150,6 +1179,36 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto array m_responsekeys(resource conn, long identifier) + Returns array of strings which represents the keys that can be used + for response parameters on this transaction +*/ +PHP_FUNCTION(m_responsekeys) +{ + MCVE_CONN *conn; + char **retval; + int num_keys, i; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + convert_to_long_ex(arg2); + + array_init(return_value); + + retval=M_ResponseKeys(conn, Z_LVAL_PP(arg2), num_keys); + if (retval != NULL) { + for (i=0; inum_keys; i++) + add_next_index_string(return_value, retval[i], 1); + M_FreeResponseKeys(retval, num_keys); + } +} +/* }}} */ +#endif + /* {{{ proto string m_getuserparam(resource conn, long identifier, int key) Get a user response parameter */ PHP_FUNCTION(m_getuserparam) http://cvs.php.net/diff.php/php-src/ext/mcve/php_mcve.h?r1=1.15r2=1.16ty=u Index: php-src/ext/mcve/php_mcve.h diff -u php-src/ext/mcve/php_mcve.h:1.15 php-src/ext/mcve/php_mcve.h:1.16 --- php-src/ext/mcve/php_mcve.h:1.15 Mon Jun 6 12:43:23 2005 +++ php-src/ext/mcve/php_mcve.h Mon Jul 18 16:10:06 2005 @@ -16,7 +16,7 @@ | Chris Faulhaber [EMAIL PROTECTED] | +--+ */ -/* $Id: php_mcve.h,v 1.15 2005/06/06 16:43:23 bradmssw Exp $ */ +/* $Id: php_mcve.h,v 1.16 2005/07/18 20:10:06 bradmssw Exp $ */ #ifndef _PHP_MCVE_H #define _PHP_MCVE_H @@ -51,6 +51,10 @@ PHP_FUNCTION(m_setdropfile); PHP_FUNCTION(m_setip); PHP_FUNCTION(m_setssl); +#if LIBMONETRA_VERSION = 05 +PHP_FUNCTION(m_setssl_cafile); +PHP_FUNCTION(m_responsekeys); +#endif PHP_FUNCTION(m_setssl_files); PHP_FUNCTION(m_setblocking); PHP_FUNCTION(m_settimeout); -- 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
[PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
bradmsswMon Jul 18 16:10:09 2005 EDT Modified files: /php-src/ext/mcve mcve.c php_mcve.h Log: sync missing functions from libmonetra-5 http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.32r2=1.33ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.32 php-src/ext/mcve/mcve.c:1.33 --- php-src/ext/mcve/mcve.c:1.32Thu Jun 30 10:11:11 2005 +++ php-src/ext/mcve/mcve.c Mon Jul 18 16:10:06 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.32 2005/06/30 14:11:11 sniper Exp $ */ +/* $Id: mcve.c,v 1.33 2005/07/18 20:10:06 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -60,6 +60,10 @@ PHP_FE(m_setdropfile, NULL) PHP_FE(m_setip, NULL) PHP_FE(m_setssl,NULL) +#if LIBMONETRA_VERSION = 05 + PHP_FE(m_setssl_cafile, NULL) + PHP_FE(m_responsekeys, NULL) +#endif PHP_FE(m_setssl_files, NULL) PHP_FE(m_settimeout,NULL) PHP_FE(m_setblocking, NULL) @@ -734,6 +738,31 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto int m_setssl_cafile(resource conn, string cafile) + Set SSL CA (Certificate Authority) file for verification of server + certificate +*/ +PHP_FUNCTION(m_setssl_cafile) +{ + MCVE_CONN *conn; + int retval; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + convert_to_string_ex(arg2); + + retval = M_SetSSL_CAfile(conn, Z_STRVAL_PP(arg2)); + + RETURN_LONG(retval); +} +/* }}} */ +#endif + /* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile) Set certificate key files and certificates if server requires client certificate verification @@ -1150,6 +1179,36 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto array m_responsekeys(resource conn, long identifier) + Returns array of strings which represents the keys that can be used + for response parameters on this transaction +*/ +PHP_FUNCTION(m_responsekeys) +{ + MCVE_CONN *conn; + char **retval; + int num_keys, i; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + convert_to_long_ex(arg2); + + array_init(return_value); + + retval=M_ResponseKeys(conn, Z_LVAL_PP(arg2), num_keys); + if (retval != NULL) { + for (i=0; inum_keys; i++) + add_next_index_string(return_value, retval[i], 1); + M_FreeResponseKeys(retval, num_keys); + } +} +/* }}} */ +#endif + /* {{{ proto string m_getuserparam(resource conn, long identifier, int key) Get a user response parameter */ PHP_FUNCTION(m_getuserparam) http://cvs.php.net/diff.php/php-src/ext/mcve/php_mcve.h?r1=1.15r2=1.16ty=u Index: php-src/ext/mcve/php_mcve.h diff -u php-src/ext/mcve/php_mcve.h:1.15 php-src/ext/mcve/php_mcve.h:1.16 --- php-src/ext/mcve/php_mcve.h:1.15Mon Jun 6 12:43:23 2005 +++ php-src/ext/mcve/php_mcve.h Mon Jul 18 16:10:06 2005 @@ -16,7 +16,7 @@ | Chris Faulhaber [EMAIL PROTECTED]| +--+ */ -/* $Id: php_mcve.h,v 1.15 2005/06/06 16:43:23 bradmssw Exp $ */ +/* $Id: php_mcve.h,v 1.16 2005/07/18 20:10:06 bradmssw Exp $ */ #ifndef _PHP_MCVE_H #define _PHP_MCVE_H @@ -51,6 +51,10 @@ PHP_FUNCTION(m_setdropfile); PHP_FUNCTION(m_setip); PHP_FUNCTION(m_setssl); +#if LIBMONETRA_VERSION = 05 +PHP_FUNCTION(m_setssl_cafile); +PHP_FUNCTION(m_responsekeys); +#endif PHP_FUNCTION(m_setssl_files); PHP_FUNCTION(m_setblocking); PHP_FUNCTION(m_settimeout); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mcve mcve.c php_mcve.h
bradmsswMon Jul 18 16:11:09 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mcve mcve.c php_mcve.h Log: BACKPORT FROM HEAD: sync missing functions from libmonetra-5 http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.28.2.3r2=1.28.2.4ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.28.2.3 php-src/ext/mcve/mcve.c:1.28.2.4 --- php-src/ext/mcve/mcve.c:1.28.2.3Mon Jun 6 12:43:54 2005 +++ php-src/ext/mcve/mcve.c Mon Jul 18 16:11:09 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.28.2.3 2005/06/06 16:43:54 bradmssw Exp $ */ +/* $Id: mcve.c,v 1.28.2.4 2005/07/18 20:11:09 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -62,6 +62,10 @@ PHP_FE(m_setdropfile, NULL) PHP_FE(m_setip, NULL) PHP_FE(m_setssl,NULL) +#if LIBMONETRA_VERSION = 05 + PHP_FE(m_setssl_cafile, NULL) + PHP_FE(m_responsekeys, NULL) +#endif PHP_FE(m_setssl_files, NULL) PHP_FE(m_settimeout,NULL) PHP_FE(m_setblocking, NULL) @@ -736,6 +740,31 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto int m_setssl_cafile(resource conn, string cafile) + Set SSL CA (Certificate Authority) file for verification of server + certificate +*/ +PHP_FUNCTION(m_setssl_cafile) +{ + MCVE_CONN *conn; + int retval; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + convert_to_string_ex(arg2); + + retval = M_SetSSL_CAfile(conn, Z_STRVAL_PP(arg2)); + + RETURN_LONG(retval); +} +/* }}} */ +#endif + /* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile) Set certificate key files and certificates if server requires client certificate verification @@ -1152,6 +1181,36 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto array m_responsekeys(resource conn, long identifier) + Returns array of strings which represents the keys that can be used + for response parameters on this transaction +*/ +PHP_FUNCTION(m_responsekeys) +{ + MCVE_CONN *conn; + char **retval; + int num_keys, i; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + convert_to_long_ex(arg2); + + array_init(return_value); + + retval=M_ResponseKeys(conn, Z_LVAL_PP(arg2), num_keys); + if (retval != NULL) { + for (i=0; inum_keys; i++) + add_next_index_string(return_value, retval[i], 1); + M_FreeResponseKeys(retval, num_keys); + } +} +/* }}} */ +#endif + /* {{{ proto string m_getuserparam(resource conn, long identifier, int key) Get a user response parameter */ PHP_FUNCTION(m_getuserparam) http://cvs.php.net/diff.php/php-src/ext/mcve/php_mcve.h?r1=1.14.2.1r2=1.14.2.2ty=u Index: php-src/ext/mcve/php_mcve.h diff -u php-src/ext/mcve/php_mcve.h:1.14.2.1 php-src/ext/mcve/php_mcve.h:1.14.2.2 --- php-src/ext/mcve/php_mcve.h:1.14.2.1Mon Jun 6 12:43:54 2005 +++ php-src/ext/mcve/php_mcve.h Mon Jul 18 16:11:09 2005 @@ -16,7 +16,7 @@ | Chris Faulhaber [EMAIL PROTECTED]| +--+ */ -/* $Id: php_mcve.h,v 1.14.2.1 2005/06/06 16:43:54 bradmssw Exp $ */ +/* $Id: php_mcve.h,v 1.14.2.2 2005/07/18 20:11:09 bradmssw Exp $ */ #ifndef _PHP_MCVE_H #define _PHP_MCVE_H @@ -51,6 +51,10 @@ PHP_FUNCTION(m_setdropfile); PHP_FUNCTION(m_setip); PHP_FUNCTION(m_setssl); +#if LIBMONETRA_VERSION = 05 +PHP_FUNCTION(m_setssl_cafile); +PHP_FUNCTION(m_responsekeys); +#endif PHP_FUNCTION(m_setssl_files); PHP_FUNCTION(m_setblocking); PHP_FUNCTION(m_settimeout); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
bradmsswMon Jul 18 20:34:39 2005 EDT Modified files: /php-src/ext/mcve mcve.c php_mcve.h Log: \#if BRAD_0'd latest changes as requested until 5.1.0 release http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.33r2=1.34ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.33 php-src/ext/mcve/mcve.c:1.34 --- php-src/ext/mcve/mcve.c:1.33Mon Jul 18 16:10:06 2005 +++ php-src/ext/mcve/mcve.c Mon Jul 18 20:34:38 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.33 2005/07/18 20:10:06 bradmssw Exp $ */ +/* $Id: mcve.c,v 1.34 2005/07/19 00:34:38 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -60,10 +60,12 @@ PHP_FE(m_setdropfile, NULL) PHP_FE(m_setip, NULL) PHP_FE(m_setssl,NULL) +#if BRAD_0 #if LIBMONETRA_VERSION = 05 PHP_FE(m_setssl_cafile, NULL) PHP_FE(m_responsekeys, NULL) #endif +#endif PHP_FE(m_setssl_files, NULL) PHP_FE(m_settimeout,NULL) PHP_FE(m_setblocking, NULL) @@ -738,6 +740,7 @@ } /* }}} */ +#if BRAD_0 #if LIBMONETRA_VERSION = 05 /* {{{ proto int m_setssl_cafile(resource conn, string cafile) Set SSL CA (Certificate Authority) file for verification of server @@ -762,6 +765,7 @@ } /* }}} */ #endif +#endif /* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile) Set certificate key files and certificates if server requires client certificate @@ -1179,6 +1183,7 @@ } /* }}} */ +#if BRAD_0 #if LIBMONETRA_VERSION = 05 /* {{{ proto array m_responsekeys(resource conn, long identifier) Returns array of strings which represents the keys that can be used @@ -1208,6 +1213,7 @@ } /* }}} */ #endif +#endif /* {{{ proto string m_getuserparam(resource conn, long identifier, int key) Get a user response parameter */ http://cvs.php.net/diff.php/php-src/ext/mcve/php_mcve.h?r1=1.16r2=1.17ty=u Index: php-src/ext/mcve/php_mcve.h diff -u php-src/ext/mcve/php_mcve.h:1.16 php-src/ext/mcve/php_mcve.h:1.17 --- php-src/ext/mcve/php_mcve.h:1.16Mon Jul 18 16:10:06 2005 +++ php-src/ext/mcve/php_mcve.h Mon Jul 18 20:34:38 2005 @@ -16,7 +16,7 @@ | Chris Faulhaber [EMAIL PROTECTED]| +--+ */ -/* $Id: php_mcve.h,v 1.16 2005/07/18 20:10:06 bradmssw Exp $ */ +/* $Id: php_mcve.h,v 1.17 2005/07/19 00:34:38 bradmssw Exp $ */ #ifndef _PHP_MCVE_H #define _PHP_MCVE_H @@ -51,10 +51,12 @@ PHP_FUNCTION(m_setdropfile); PHP_FUNCTION(m_setip); PHP_FUNCTION(m_setssl); +#if BRAD_0 #if LIBMONETRA_VERSION = 05 PHP_FUNCTION(m_setssl_cafile); PHP_FUNCTION(m_responsekeys); #endif +#endif PHP_FUNCTION(m_setssl_files); PHP_FUNCTION(m_setblocking); PHP_FUNCTION(m_settimeout); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
Andi, Sorry about that, I haven't been paying much attention to the internals@ list, I'll make sure I check the list before committing next time. I have #if BRAD_0'd the code, and will remove those #if's after 5.1.0 release. -Brad Andi Gutmans wrote: Brad, In any case, we are in a complete feature freeze right now. I sent an email about this to [EMAIL PROTECTED] Only bug fixes allowed. Please #if BRAD_0 that code in HEAD. I don't see a problem allowing the addition of such simple wrapper functions after 5.1.0 goes out the door; but I don't want such code changes at this point. Andi At 12:54 AM 7/19/2005 +0400, Antony Dovgal wrote: On Mon, 18 Jul 2005 16:34:44 -0400 Brad House [EMAIL PROTECTED] wrote: Perhaps. There was discussion once upon a time along those lines, but nothing else came of it. I'd have to know what it entails, and if it would prohibit the extension from being distributed with the main PHP codebase. AFAIK the general plan is to move almost all extensions to PECL (and we're working on it, take a look on how many extensions were moved there in 5.0 and 5.1), so users would be able to get install only extensions they really need. Personally I don't think that ext/mcve is used by large number of users (I haven't ever heard of someone using it) and IMO that's a perfect reason to move it from the core to PECL. I can be wrong, though. There are also several rather important reasons to do so: 1) you wouldn't depend on PHP release cycles. 2) you would be able to use PECL infrastructure to build Win32 *.dll's 3) Others. All this doesn't mean that users will not be able to install/use the extension or even have some problems with it. Extensions from PECL can be installed with this command: # pear install extname See details here: http://www.php.net/manual/en/install.pecl.php Forgive my ignorance, but I have not even looked into what PECL really is. Well, I'd recommend to take a look on it, since you're the maintainer of an extension.. -- Wbr, Antony Dovgal -- 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
[PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
bradmsswMon Jun 6 12:43:23 2005 EDT Modified files: /php-src/ext/mcve mcve.c php_mcve.h Log: libmonetra-5.0 sync. added m_validateidentifier, which is enabled by default to keep invalid pointer addresses from causing PHP to crash kept compatability with older versions of libmonetra. http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.30r2=1.31ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.30 php-src/ext/mcve/mcve.c:1.31 --- php-src/ext/mcve/mcve.c:1.30Sun Jan 9 16:05:05 2005 +++ php-src/ext/mcve/mcve.c Mon Jun 6 12:43:23 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.30 2005/01/09 21:05:05 sniper Exp $ */ +/* $Id: mcve.c,v 1.31 2005/06/06 16:43:23 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -73,6 +73,10 @@ PHP_FE(m_connect, NULL) PHP_FE(m_transnew, NULL) PHP_FE(m_transparam,NULL) +#if LIBMONETRA_VERSION = 05 + PHP_FE(m_transkeyval, NULL) + PHP_FE(m_validateidentifier,NULL) +#endif PHP_FE(m_transsend, NULL) PHP_FE(m_ping, NULL) PHP_FE(m_responseparam, NULL) @@ -550,7 +554,7 @@ PHP_MINFO_FUNCTION(mcve) { php_info_print_table_start(); - php_info_print_table_row(2, mcve support, enabled); + php_info_print_table_row(2, mcve/monetra support, enabled); php_info_print_table_row(2, version, PHP_MCVE_VERSION); php_info_print_table_end(); } @@ -589,6 +593,11 @@ MCVE_InitConn(conn); +/* Since the identifiers are pointer addresses, we need to validate it by + * checking our linked list in PHP, since we don't want to cause segfaults */ +#if LIBMONETRA_VERSION = 05 + M_ValidateIdentifier(conn, 1); +#endif ZEND_REGISTER_RESOURCE(return_value, conn, le_conn); } /* }}} */ @@ -890,7 +899,7 @@ PHP_FUNCTION(m_connectionerror) { MCVE_CONN *conn; - char *retval; + const char *retval; zval **arg; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == FAILURE) @@ -903,7 +912,7 @@ if (retval == NULL) { RETVAL_STRING(,1); } else { - RETVAL_STRING(retval, 1); + RETVAL_STRING(estrdup(retval), 0); } } /* }}} */ @@ -965,8 +974,53 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto int m_validateidentifier(resource conn, int tf) + Whether or not to validate the passed identifier on any transaction it is passed to +*/ +PHP_FUNCTION(m_validateidentifier) +{ + MCVE_CONN *conn; + int retval; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + + convert_to_long_ex(arg2); + retval = M_ValidateIdentifier(conn, (int)Z_LVAL_PP(arg2)); + RETURN_LONG(retval); +} +/* }}} */ + +/* {{{ proto int m_transkeyval(resource conn, long identifier, string key, string value) + Add key/value pair to a transaction. Replaces deprecated transparam() */ +PHP_FUNCTION(m_transkeyval) +{ + MCVE_CONN *conn; + int retval; + zval **arg1, **arg2, **arg3, **arg4; + + if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, arg1, arg2, arg3, arg4) == FAILURE) + WRONG_PARAM_COUNT; + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + + convert_to_long_ex(arg2); + convert_to_string_ex(arg3); + convert_to_string_ex(arg4); + + retval = M_TransKeyVal(conn, (long)Z_LVAL_PP(arg2), Z_STRVAL_PP(arg3), Z_STRVAL_PP(arg4)); + + RETURN_LONG(retval); +} +/* }}} */ +#endif + /* {{{ proto int m_transparam(resource conn, long identifier, int key, ...) - Add a parameter to a transaction */ + Add a parameter to a transaction (deprecated) */ PHP_FUNCTION(m_transparam) { MCVE_CONN *conn; @@ -1076,7 +1130,7 @@ PHP_FUNCTION(m_responseparam) { MCVE_CONN *conn; - char *retval; + const char *retval; zval **arg1, **arg2, **arg3; if (ZEND_NUM_ARGS() != 3 || @@ -1093,7 +1147,7 @@ if (retval == NULL) { RETVAL_STRING(,1); } else { - RETVAL_STRING(retval, 1); + RETVAL_STRING(estrdup(retval), 0); } } /* }}} */ @@ -1103,7 +1157,7 @@ PHP_FUNCTION(m_getuserparam) { MCVE_CONN *conn; - char *retval; + const char *retval; zval **arg1, **arg2, **arg3; if (ZEND_NUM_ARGS() != 3 || @@ -1120,7 +1174,7 @@ if (retval == NULL) { RETVAL_STRING(,1); } else { -
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mcve mcve.c php_mcve.h
bradmsswMon Jun 6 12:43:54 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mcve mcve.c php_mcve.h Log: libmonetra 5.0 sync. added m_validateidentifier, which is enabled by default to keep invalid pointer addresses from causing PHP to crash kept compatability with older versions of libmonetra. http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.28.2.2r2=1.28.2.3ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.28.2.2 php-src/ext/mcve/mcve.c:1.28.2.3 --- php-src/ext/mcve/mcve.c:1.28.2.2Sun Jan 9 16:05:16 2005 +++ php-src/ext/mcve/mcve.c Mon Jun 6 12:43:54 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.28.2.2 2005/01/09 21:05:16 sniper Exp $ */ +/* $Id: mcve.c,v 1.28.2.3 2005/06/06 16:43:54 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -73,6 +73,10 @@ PHP_FE(m_connect, NULL) PHP_FE(m_transnew, NULL) PHP_FE(m_transparam,NULL) +#if LIBMONETRA_VERSION = 05 + PHP_FE(m_transkeyval, NULL) + PHP_FE(m_validateidentifier,NULL) +#endif PHP_FE(m_transsend, NULL) PHP_FE(m_ping, NULL) PHP_FE(m_responseparam, NULL) @@ -550,7 +554,7 @@ PHP_MINFO_FUNCTION(mcve) { php_info_print_table_start(); - php_info_print_table_row(2, mcve support, enabled); + php_info_print_table_row(2, mcve/monetra support, enabled); php_info_print_table_row(2, version, PHP_MCVE_VERSION); php_info_print_table_end(); } @@ -589,6 +593,11 @@ MCVE_InitConn(conn); +/* Since the identifiers are pointer addresses, we need to validate it by + * checking our linked list in PHP, since we don't want to cause segfaults */ +#if LIBMONETRA_VERSION = 05 + M_ValidateIdentifier(conn, 1); +#endif ZEND_REGISTER_RESOURCE(return_value, conn, le_conn); } /* }}} */ @@ -890,7 +899,7 @@ PHP_FUNCTION(m_connectionerror) { MCVE_CONN *conn; - char *retval; + const char *retval; zval **arg; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == FAILURE) @@ -903,7 +912,7 @@ if (retval == NULL) { RETVAL_STRING(,1); } else { - RETVAL_STRING(retval, 1); + RETVAL_STRING(estrdup(retval), 0); } } /* }}} */ @@ -965,8 +974,53 @@ } /* }}} */ +#if LIBMONETRA_VERSION = 05 +/* {{{ proto int m_validateidentifier(resource conn, int tf) + Whether or not to validate the passed identifier on any transaction it is passed to +*/ +PHP_FUNCTION(m_validateidentifier) +{ + MCVE_CONN *conn; + int retval; + zval **arg1, **arg2; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) + WRONG_PARAM_COUNT; + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + + convert_to_long_ex(arg2); + retval = M_ValidateIdentifier(conn, (int)Z_LVAL_PP(arg2)); + RETURN_LONG(retval); +} +/* }}} */ + +/* {{{ proto int m_transkeyval(resource conn, long identifier, string key, string value) + Add key/value pair to a transaction. Replaces deprecated transparam() */ +PHP_FUNCTION(m_transkeyval) +{ + MCVE_CONN *conn; + int retval; + zval **arg1, **arg2, **arg3, **arg4; + + if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, arg1, arg2, arg3, arg4) == FAILURE) + WRONG_PARAM_COUNT; + + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); + + convert_to_long_ex(arg2); + convert_to_string_ex(arg3); + convert_to_string_ex(arg4); + + retval = M_TransKeyVal(conn, (long)Z_LVAL_PP(arg2), Z_STRVAL_PP(arg3), Z_STRVAL_PP(arg4)); + + RETURN_LONG(retval); +} +/* }}} */ +#endif + /* {{{ proto int m_transparam(resource conn, long identifier, int key, ...) - Add a parameter to a transaction */ + Add a parameter to a transaction (deprecated) */ PHP_FUNCTION(m_transparam) { MCVE_CONN *conn; @@ -1076,7 +1130,7 @@ PHP_FUNCTION(m_responseparam) { MCVE_CONN *conn; - char *retval; + const char *retval; zval **arg1, **arg2, **arg3; if (ZEND_NUM_ARGS() != 3 || @@ -1093,7 +1147,7 @@ if (retval == NULL) { RETVAL_STRING(,1); } else { - RETVAL_STRING(retval, 1); + RETVAL_STRING(estrdup(retval), 0); } } /* }}} */ @@ -1103,7 +1157,7 @@ PHP_FUNCTION(m_getuserparam) { MCVE_CONN *conn; - char *retval; + const char *retval; zval **arg1, **arg2, **arg3; if (ZEND_NUM_ARGS() != 3 || @@ -1120,7 +1174,7 @@ if (retval == NULL) { RETVAL_STRING(,1);
[PHP-CVS] cvs: php-src /ext/mcve config.m4 mcve.c
bradmsswTue Dec 7 22:02:33 2004 EDT Modified files: /php-src/ext/mcve config.m4 mcve.c Log: Newer versions of libmonetra broke compatability with one function. Make workaround that detects version, and works with both. http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.10r2=1.11ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.10 php-src/ext/mcve/config.m4:1.11 --- php-src/ext/mcve/config.m4:1.10 Sun May 30 10:33:44 2004 +++ php-src/ext/mcve/config.m4 Tue Dec 7 22:02:33 2004 @@ -51,6 +51,20 @@ ],[ AC_MSG_ERROR([libmcve 3.2.2 or greater required.]) ]) + + AC_MSG_CHECKING([for correct libmonetra 4.2 or higher]) + AC_EGREP_CPP(yes,[ +#include $MCVE_DIR/include/mcve.h +#ifdef MCVE_SetSSL_CAfile +yes +#endif + ],[ +AC_MSG_RESULT([yes]) + ],[ +AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using libmonetra 4.2 or higher ]) +AC_MSG_ERROR([no]) + ]) + CPPFLAGS=$saved_CPPFLAGS PHP_ADD_INCLUDE($MCVE_DIR/include) http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.28r2=1.29ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.28 php-src/ext/mcve/mcve.c:1.29 --- php-src/ext/mcve/mcve.c:1.28Sun May 30 18:41:13 2004 +++ php-src/ext/mcve/mcve.c Tue Dec 7 22:02:33 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.28 2004/05/30 22:41:13 bradmssw Exp $ */ +/* $Id: mcve.c,v 1.29 2004/12/08 03:02:33 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -25,6 +25,14 @@ #include php.h +#if PHP_WIN32 +#include config.w32.h +#elif defined NETWARE +#include config.nw.h +#else +#include php_config.h +#endif + #if HAVE_MCVE /* standard php include(s) */ @@ -719,23 +727,34 @@ } /* }}} */ -/* {{{ proto int m_setssl_files(string sslkeyfile, string sslcertfile) +/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile) Set certificate key files and certificates if server requires client certificate verification */ PHP_FUNCTION(m_setssl_files) { + MCVE_CONN *conn; int retval; - zval **arg1, **arg2; + zval **arg1, **arg2, **arg3; +#ifndef LIBMONETRA_BELOW_4_2 + if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, arg1, arg2, arg3) == FAILURE) + WRONG_PARAM_COUNT; + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); +#else if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) WRONG_PARAM_COUNT; +#endif - convert_to_string_ex(arg1); convert_to_string_ex(arg2); +#ifndef LIBMONETRA_BELOW_4_2 + convert_to_string_ex(arg3); + retval = MCVE_SetSSL_Files(conn, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3)); +#else + convert_to_string_ex(arg1); retval = MCVE_SetSSL_Files(Z_STRVAL_PP(arg1), Z_STRVAL_PP(arg2)); - +#endif RETURN_LONG(retval); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mcve config.m4 mcve.c
bradmsswTue Dec 7 22:08:39 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mcve config.m4 mcve.c Log: backport from head. compatability fix with libmonetra 4.2 and higher (still works with older releases too). http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.10r2=1.10.2.1ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.10 php-src/ext/mcve/config.m4:1.10.2.1 --- php-src/ext/mcve/config.m4:1.10 Sun May 30 10:33:44 2004 +++ php-src/ext/mcve/config.m4 Tue Dec 7 22:08:37 2004 @@ -51,6 +51,20 @@ ],[ AC_MSG_ERROR([libmcve 3.2.2 or greater required.]) ]) + + AC_MSG_CHECKING([for correct libmonetra 4.2 or higher]) + AC_EGREP_CPP(yes,[ +#include $MCVE_DIR/include/mcve.h +#ifdef MCVE_SetSSL_CAfile +yes +#endif + ],[ +AC_MSG_RESULT([yes]) + ],[ +AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using libmonetra 4.2 or higher ]) +AC_MSG_ERROR([no]) + ]) + CPPFLAGS=$saved_CPPFLAGS PHP_ADD_INCLUDE($MCVE_DIR/include) http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.28r2=1.28.2.1ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.28 php-src/ext/mcve/mcve.c:1.28.2.1 --- php-src/ext/mcve/mcve.c:1.28Sun May 30 18:41:13 2004 +++ php-src/ext/mcve/mcve.c Tue Dec 7 22:08:38 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.28 2004/05/30 22:41:13 bradmssw Exp $ */ +/* $Id: mcve.c,v 1.28.2.1 2004/12/08 03:08:38 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -25,6 +25,14 @@ #include php.h +#if PHP_WIN32 +#include config.w32.h +#elif defined NETWARE +#include config.nw.h +#else +#include php_config.h +#endif + #if HAVE_MCVE /* standard php include(s) */ @@ -719,23 +727,34 @@ } /* }}} */ -/* {{{ proto int m_setssl_files(string sslkeyfile, string sslcertfile) +/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile) Set certificate key files and certificates if server requires client certificate verification */ PHP_FUNCTION(m_setssl_files) { + MCVE_CONN *conn; int retval; - zval **arg1, **arg2; + zval **arg1, **arg2, **arg3; +#ifndef LIBMONETRA_BELOW_4_2 + if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, arg1, arg2, arg3) == FAILURE) + WRONG_PARAM_COUNT; + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); +#else if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) WRONG_PARAM_COUNT; +#endif - convert_to_string_ex(arg1); convert_to_string_ex(arg2); +#ifndef LIBMONETRA_BELOW_4_2 + convert_to_string_ex(arg3); + retval = MCVE_SetSSL_Files(conn, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3)); +#else + convert_to_string_ex(arg1); retval = MCVE_SetSSL_Files(Z_STRVAL_PP(arg1), Z_STRVAL_PP(arg2)); - +#endif RETURN_LONG(retval); } /* }}} */ -- 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/mcve config.m4 mcve.c
bradmsswTue Dec 7 22:11:31 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve config.m4 mcve.c Log: backport from 5.0/head. Newer versions of libmonetra broke compatability with one function. Make workaround that detects version, and works with both. http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.2.4.9r2=1.2.4.10ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.2.4.9 php-src/ext/mcve/config.m4:1.2.4.10 --- php-src/ext/mcve/config.m4:1.2.4.9 Sun May 30 10:33:12 2004 +++ php-src/ext/mcve/config.m4 Tue Dec 7 22:11:31 2004 @@ -51,6 +51,20 @@ ],[ AC_MSG_ERROR([libmcve 3.2.2 or greater required.]) ]) + + AC_MSG_CHECKING([for correct libmonetra 4.2 or higher]) + AC_EGREP_CPP(yes,[ +#include $MCVE_DIR/include/mcve.h +#ifdef MCVE_SetSSL_CAfile +yes +#endif + ],[ +AC_MSG_RESULT([yes]) + ],[ +AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using libmonetra 4.2 or higher ]) +AC_MSG_ERROR([no]) + ]) + CPPFLAGS=$saved_CPPFLAGS PHP_ADD_INCLUDE($MCVE_DIR/include) http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.14.2.9r2=1.14.2.10ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.14.2.9 php-src/ext/mcve/mcve.c:1.14.2.10 --- php-src/ext/mcve/mcve.c:1.14.2.9Wed Jun 16 23:16:54 2004 +++ php-src/ext/mcve/mcve.c Tue Dec 7 22:11:31 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.14.2.9 2004/06/17 03:16:54 bradmssw Exp $ */ +/* $Id: mcve.c,v 1.14.2.10 2004/12/08 03:11:31 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -25,6 +25,14 @@ #include php.h +#if PHP_WIN32 +#include config.w32.h +#elif defined NETWARE +#include config.nw.h +#else +#include php_config.h +#endif + #if HAVE_MCVE /* standard php include(s) */ @@ -717,23 +725,34 @@ } /* }}} */ -/* {{{ proto int m_setssl_files(string sslkeyfile, string sslcertfile) +/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile) Set certificate key files and certificates if server requires client certificate verification */ PHP_FUNCTION(m_setssl_files) { + MCVE_CONN *conn; int retval; - zval **arg1, **arg2; + zval **arg1, **arg2, **arg3; +#ifndef LIBMONETRA_BELOW_4_2 + if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, arg1, arg2, arg3) == FAILURE) + WRONG_PARAM_COUNT; + ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, le_conn); +#else if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == FAILURE) WRONG_PARAM_COUNT; +#endif - convert_to_string_ex(arg1); convert_to_string_ex(arg2); +#ifndef LIBMONETRA_BELOW_4_2 + convert_to_string_ex(arg3); + retval = MCVE_SetSSL_Files(conn, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3)); +#else + convert_to_string_ex(arg1); retval = MCVE_SetSSL_Files(Z_STRVAL_PP(arg1), Z_STRVAL_PP(arg2)); - +#endif RETURN_LONG(retval); } /* }}} */ -- 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/mcve mcve.c php_mcve.h
bradmsswWed Jun 16 23:16:54 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve mcve.c php_mcve.h Log: merge name change from mcve - monetra add compatability layer for v3.2 functionality, so existing scripts will work without any migration needed. This patch has been sitting in PHP 5 for some time, and seems to be working quite well. A quick backport of that patch to php4. http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.14.2.8r2=1.14.2.9ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.14.2.8 php-src/ext/mcve/mcve.c:1.14.2.9 --- php-src/ext/mcve/mcve.c:1.14.2.8Thu Aug 28 20:53:15 2003 +++ php-src/ext/mcve/mcve.c Wed Jun 16 23:16:54 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.14.2.8 2003/08/29 00:53:15 sniper Exp $ */ +/* $Id: mcve.c,v 1.14.2.9 2004/06/17 03:16:54 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -48,6 +48,83 @@ /* {{{ extension definition structures */ static unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; function_entry mcve_functions[] = { + PHP_FE(m_initengine,NULL) + PHP_FE(m_initconn, NULL) + PHP_FE(m_deleteresponse,NULL) + PHP_FE(m_destroyconn, NULL) + PHP_FE(m_setdropfile, NULL) + PHP_FE(m_setip, NULL) + PHP_FE(m_setssl,NULL) + PHP_FE(m_setssl_files, NULL) + PHP_FE(m_settimeout,NULL) + PHP_FE(m_setblocking, NULL) + PHP_FE(m_verifyconnection, NULL) + PHP_FE(m_verifysslcert, NULL) + PHP_FE(m_maxconntimeout,NULL) + PHP_FE(m_connectionerror, NULL) + PHP_FE(m_deletetrans, NULL) + PHP_FE(m_connect, NULL) + PHP_FE(m_transnew, NULL) + PHP_FE(m_transparam,NULL) + PHP_FE(m_transsend, NULL) + PHP_FE(m_ping, NULL) + PHP_FE(m_responseparam, NULL) + PHP_FE(m_returnstatus, NULL) + PHP_FE(m_returncode,NULL) + PHP_FE(m_transactionssent, NULL) + PHP_FE(m_transactionitem, NULL) + PHP_FE(m_transactionbatch, NULL) + PHP_FE(m_transactionid, NULL) + PHP_FE(m_transactionauth, NULL) + PHP_FE(m_transactiontext, NULL) + PHP_FE(m_transactionavs,NULL) + PHP_FE(m_transactioncv, NULL) + PHP_FE(m_getuserparam, NULL) + PHP_FE(m_monitor, NULL) + PHP_FE(m_transinqueue, NULL) + PHP_FE(m_checkstatus, NULL) + PHP_FE(m_completeauthorizations,second_arg_force_ref) + PHP_FE(m_sale, NULL) + PHP_FE(m_preauth, NULL) + PHP_FE(m_void, NULL) + PHP_FE(m_preauthcompletion, NULL) + PHP_FE(m_force, NULL) + PHP_FE(m_override, NULL) + PHP_FE(m_return,NULL) + PHP_FE(m_iscommadelimited, NULL) + PHP_FE(m_parsecommadelimited, NULL) + PHP_FE(m_getcommadelimited, NULL) + PHP_FE(m_getcell, NULL) + PHP_FE(m_getcellbynum, NULL) + PHP_FE(m_numcolumns,NULL) + PHP_FE(m_numrows, NULL) + PHP_FE(m_getheader, NULL) + PHP_FE(m_destroyengine, NULL) + PHP_FE(m_settle,NULL) + PHP_FE(m_gut, NULL) + PHP_FE(m_gl,NULL) + PHP_FE(m_gft, NULL) + PHP_FE(m_qc,NULL) + PHP_FE(m_ub,NULL) + PHP_FE(m_chkpwd,NULL) + PHP_FE(m_bt,NULL) + PHP_FE(m_uwait, NULL) + PHP_FE(m_text_code, NULL) + PHP_FE(m_text_avs, NULL) + PHP_FE(m_text_cv, NULL) + PHP_FE(m_chngpwd, NULL) + PHP_FE(m_listusers, NULL) + PHP_FE(m_adduser, NULL) + PHP_FE(m_enableuser,NULL) + PHP_FE(m_disableuser, NULL) + PHP_FE(m_getuserarg,NULL) +
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mcve config.m4
bradmsswSun May 30 10:33:12 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve config.m4 Log: Manually check for egrep http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.2.4.8r2=1.2.4.9ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.2.4.8 php-src/ext/mcve/config.m4:1.2.4.9 --- php-src/ext/mcve/config.m4:1.2.4.8 Wed May 26 08:29:55 2004 +++ php-src/ext/mcve/config.m4 Sun May 30 10:33:12 2004 @@ -7,6 +7,9 @@ [ --with-openssl-dir[=DIR] MCVE: openssl install prefix.], no, no) if test $PHP_MCVE != no; then + dnl properly set EGREP for AC_EGREP_CPP later on + AC_CHECK_PROG(EGREP, egrep, grep -E) + AC_SUBST(EGREP) if test $PHP_OPENSSL_DIR != no; then PHP_OPENSSL=$PHP_OPENSSL_DIR -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve config.m4
bradmsswSun May 30 10:33:44 2004 EDT Modified files: /php-src/ext/mcve config.m4 Log: manually check for egrep http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.9r2=1.10ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.9 php-src/ext/mcve/config.m4:1.10 --- php-src/ext/mcve/config.m4:1.9 Wed May 26 06:11:18 2004 +++ php-src/ext/mcve/config.m4 Sun May 30 10:33:44 2004 @@ -7,6 +7,9 @@ [ --with-openssl-dir[=DIR] MCVE: openssl install prefix.], no, no) if test $PHP_MCVE != no; then + dnl determine egrep command for AC_EGREP_CPP below + AC_CHECK_PROG(EGREP, egrep, grep -E) + AC_SUBST(EGREP) if test $PHP_OPENSSL_DIR != no; then PHP_OPENSSL=$PHP_OPENSSL_DIR -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
bradmsswSun May 30 18:41:14 2004 EDT Modified files: /php-src/ext/mcve mcve.c php_mcve.h Log: Update the mcve module for libmonetra 4.0 A compatability layer has been introduced which should mean all scripts written for v 3.2 of the module should continue working, as well as compilation should still work against libmcve 3.2.x. This module eventually needs to be renamed to 'monetra' to reflect the naming change of the underlying library. http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.27r2=1.28ty=u Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.27 php-src/ext/mcve/mcve.c:1.28 --- php-src/ext/mcve/mcve.c:1.27Thu Jan 8 03:16:03 2004 +++ php-src/ext/mcve/mcve.c Sun May 30 18:41:13 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.27 2004/01/08 08:16:03 andi Exp $ */ +/* $Id: mcve.c,v 1.28 2004/05/30 22:41:13 bradmssw Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -47,6 +47,83 @@ /* {{{ extension definition structures */ function_entry mcve_functions[] = { + PHP_FE(m_initengine,NULL) + PHP_FE(m_initconn, NULL) + PHP_FE(m_deleteresponse,NULL) + PHP_FE(m_destroyconn, NULL) + PHP_FE(m_setdropfile, NULL) + PHP_FE(m_setip, NULL) + PHP_FE(m_setssl,NULL) + PHP_FE(m_setssl_files, NULL) + PHP_FE(m_settimeout,NULL) + PHP_FE(m_setblocking, NULL) + PHP_FE(m_verifyconnection, NULL) + PHP_FE(m_verifysslcert, NULL) + PHP_FE(m_maxconntimeout,NULL) + PHP_FE(m_connectionerror, NULL) + PHP_FE(m_deletetrans, NULL) + PHP_FE(m_connect, NULL) + PHP_FE(m_transnew, NULL) + PHP_FE(m_transparam,NULL) + PHP_FE(m_transsend, NULL) + PHP_FE(m_ping, NULL) + PHP_FE(m_responseparam, NULL) + PHP_FE(m_returnstatus, NULL) + PHP_FE(m_returncode,NULL) + PHP_FE(m_transactionssent, NULL) + PHP_FE(m_transactionitem, NULL) + PHP_FE(m_transactionbatch, NULL) + PHP_FE(m_transactionid, NULL) + PHP_FE(m_transactionauth, NULL) + PHP_FE(m_transactiontext, NULL) + PHP_FE(m_transactionavs,NULL) + PHP_FE(m_transactioncv, NULL) + PHP_FE(m_getuserparam, NULL) + PHP_FE(m_monitor, NULL) + PHP_FE(m_transinqueue, NULL) + PHP_FE(m_checkstatus, NULL) + PHP_FE(m_completeauthorizations,second_arg_force_ref) + PHP_FE(m_sale, NULL) + PHP_FE(m_preauth, NULL) + PHP_FE(m_void, NULL) + PHP_FE(m_preauthcompletion, NULL) + PHP_FE(m_force, NULL) + PHP_FE(m_override, NULL) + PHP_FE(m_return,NULL) + PHP_FE(m_iscommadelimited, NULL) + PHP_FE(m_parsecommadelimited, NULL) + PHP_FE(m_getcommadelimited, NULL) + PHP_FE(m_getcell, NULL) + PHP_FE(m_getcellbynum, NULL) + PHP_FE(m_numcolumns,NULL) + PHP_FE(m_numrows, NULL) + PHP_FE(m_getheader, NULL) + PHP_FE(m_destroyengine, NULL) + PHP_FE(m_settle,NULL) + PHP_FE(m_gut, NULL) + PHP_FE(m_gl,NULL) + PHP_FE(m_gft, NULL) + PHP_FE(m_qc,NULL) + PHP_FE(m_ub,NULL) + PHP_FE(m_chkpwd,NULL) + PHP_FE(m_bt,NULL) + PHP_FE(m_uwait, NULL) + PHP_FE(m_text_code, NULL) + PHP_FE(m_text_avs, NULL) + PHP_FE(m_text_cv, NULL) + PHP_FE(m_chngpwd, NULL) + PHP_FE(m_listusers, NULL) + PHP_FE(m_adduser, NULL) + PHP_FE(m_enableuser,NULL) + PHP_FE(m_disableuser, NULL) + PHP_FE(m_getuserarg,NULL) + PHP_FE(m_adduserarg,
Re: [PHP-CVS] cvs: php-src /ext/mcve config.m4
heh, yours seems so much ... erm ... simpler I'll give it a test and commit it if it works. Thanks! -Brad Wez Furlong wrote: That code might be GPL'd ;-) It looks a bit too magical, so how about a simple: AC_CHECK_PROG(EGREP, egrep, grep -E) AC_SUBST(EGREP) Instead? (please check that it works!) --Wez. -Original Message- From: Brad House [mailto:[EMAIL PROTECTED] Sent: 26 May 2004 13:32 To: Wez Furlong Cc: 'Brad House'; [EMAIL PROTECTED] Subject: Re: [PHP-CVS] cvs: php-src /ext/mcve config.m4 oops, didn't realize that ... I got an error message with 'phpize' when I tried to use autoconf 2.13, and it said I must use 2.5 ... The reason I added it is someone else did the AC_EGREP_CPP stuff, and it pretty much just hangs on that line without defining $EGREP, and AC_PROG_EGREP is what defines it... Anyhow, is it ok with you if I just add this snippet to the config.m4 file (above the AC_PROG_EGREP call) ... I just ripped it out of the aclocal.m4 that was generated with phpize: # AC_PROG_EGREP # - # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') /dev/null 21 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) -Brad Wez Furlong wrote: AC_PROG_EGREP is not supported by autoconf 2.13, which is the recommended version to use. Please revert this and solve it some other way, particularly in the 4.3 branch! :-) -Wez. -Original Message- From: Brad House [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 18:09 To: [EMAIL PROTECTED] Subject: [PHP-CVS] cvs: php-src /ext/mcve config.m4 bradmsswTue May 25 13:08:41 2004 EDT Modified files: /php-src/ext/mcve config.m4 Log: PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD requires AC_PROG_EGREP when you phpize -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mcve config.m4
oops, didn't realize that ... I got an error message with 'phpize' when I tried to use autoconf 2.13, and it said I must use 2.5 ... The reason I added it is someone else did the AC_EGREP_CPP stuff, and it pretty much just hangs on that line without defining $EGREP, and AC_PROG_EGREP is what defines it... Anyhow, is it ok with you if I just add this snippet to the config.m4 file (above the AC_PROG_EGREP call) ... I just ripped it out of the aclocal.m4 that was generated with phpize: # AC_PROG_EGREP # - # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') /dev/null 21 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) -Brad Wez Furlong wrote: AC_PROG_EGREP is not supported by autoconf 2.13, which is the recommended version to use. Please revert this and solve it some other way, particularly in the 4.3 branch! :-) -Wez. -Original Message- From: Brad House [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 18:09 To: [EMAIL PROTECTED] Subject: [PHP-CVS] cvs: php-src /ext/mcve config.m4 bradmsswTue May 25 13:08:41 2004 EDT Modified files: /php-src/ext/mcve config.m4 Log: PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD requires AC_PROG_EGREP when you phpize -- 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/mcve config.m4
bradmsswTue May 25 13:05:56 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve config.m4 Log: PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD requires AC_PROG_EGREP when you phpize http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.2.4.6r2=1.2.4.7ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.2.4.6 php-src/ext/mcve/config.m4:1.2.4.7 --- php-src/ext/mcve/config.m4:1.2.4.6 Sat May 15 23:01:36 2004 +++ php-src/ext/mcve/config.m4 Tue May 25 13:05:56 2004 @@ -1,5 +1,7 @@ dnl config.m4 for PHP4 MCVE Extension +AC_PROG_EGREP + PHP_ARG_WITH(mcve, for MCVE support, [ --with-mcve[=DIR] Include MCVE support. libmcve = 3.2.2 or libmonetra = 4.0 required]) @@ -10,7 +12,7 @@ if test $PHP_OPENSSL_DIR != no; then PHP_OPENSSL=$PHP_OPENSSL_DIR -PHP_SETUP_OPENSSL(SNMP_SHARED_LIBADD, [], [ +PHP_SETUP_OPENSSL(MCVE_SHARED_LIBADD, [], [ AC_MSG_ERROR([MCVE: OpenSSL check failed. Please check config.log for more information.]) ]) else -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve config.m4
bradmsswTue May 25 13:08:41 2004 EDT Modified files: /php-src/ext/mcve config.m4 Log: PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD requires AC_PROG_EGREP when you phpize http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.7r2=1.8ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.7 php-src/ext/mcve/config.m4:1.8 --- php-src/ext/mcve/config.m4:1.7 Sat May 15 22:59:33 2004 +++ php-src/ext/mcve/config.m4 Tue May 25 13:08:41 2004 @@ -1,5 +1,7 @@ dnl config.m4 for PHP MCVE Extension +AC_PROG_EGREP + PHP_ARG_WITH(mcve, for MCVE support, [ --with-mcve[=DIR] Include MCVE support. libmcve = 3.2.2 or libmonetra = 4.0 required]) @@ -10,7 +12,7 @@ if test $PHP_OPENSSL_DIR != no; then PHP_OPENSSL=$PHP_OPENSSL_DIR -PHP_SETUP_OPENSSL(SNMP_SHARED_LIBADD, [], [ +PHP_SETUP_OPENSSL(MCVE_SHARED_LIBADD, [], [ AC_MSG_ERROR([MCVE: OpenSSL check failed. Please check config.log for more information.]) ]) else -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve config.m4
bradmsswSat May 15 22:59:33 2004 EDT Modified files: /php-src/ext/mcve config.m4 Log: update config.m4 for libmonetra 4.0 compatability. Library no longer has MCVE_ symbols, the header file has #define\'s to convert MCVE_ - M_ to reflect the Monetra name change from MCVE. More updates to follow. http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.6r2=1.7ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.6 php-src/ext/mcve/config.m4:1.7 --- php-src/ext/mcve/config.m4:1.6 Sat Jan 17 07:59:32 2004 +++ php-src/ext/mcve/config.m4 Sat May 15 22:59:33 2004 @@ -1,7 +1,7 @@ dnl config.m4 for PHP MCVE Extension PHP_ARG_WITH(mcve, for MCVE support, -[ --with-mcve[=DIR] Include MCVE support. libmcve = 3.2.2 required]) +[ --with-mcve[=DIR] Include MCVE support. libmcve = 3.2.2 or libmonetra = 4.0 required]) PHP_ARG_WITH(openssl-dir,OpenSSL dir for MCVE, [ --with-openssl-dir[=DIR] MCVE: openssl install prefix.], no, no) @@ -14,7 +14,7 @@ AC_MSG_ERROR([MCVE: OpenSSL check failed. Please check config.log for more information.]) ]) else -AC_MSG_RESULT([If configure fails, try adding --with-openssl-dir=DIR]) +AC_MSG_RESULT([If configure fails, try adding --with-openssl-dir=DIR]) fi case $PHP_MCVE in @@ -53,16 +53,41 @@ PHP_ADD_INCLUDE($MCVE_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD) - dnl Build test + dnl Build test. Check for libmcve or libmonetra + dnl libmonetra_compat.h handle's MCVE_ - M_ conversion + dnl so it is API compatible + + has_mcve=0 + dnl check for libmcve PHP_CHECK_LIBRARY(mcve, MCVE_DestroyEngine, [ -AC_DEFINE(HAVE_MCVE, 1, [ ]) +has_mcve=1 ], [ -AC_MSG_ERROR([MCVE: Sanity check failed. Please check config.log for more information.]) +has_mcve=0 ], [ $MCVE_SHARED_LIBADD ]) + dnl check for libmonetra if no proper libmcve + dnl symlink named libmcve is created to libmonetra + dnl during libmonetra install, so this is valid + if test $has_mcve = 0 ; then +PHP_CHECK_LIBRARY(mcve, M_DestroyEngine, +[ + has_mcve=1 +], [ + has_mcve=0 +], [ + $MCVE_SHARED_LIBADD +]) + fi + + if test $has_mcve = 1 ; then +AC_DEFINE(HAVE_MCVE, 1, [ ]) + else +AC_MSG_ERROR([MCVE: Sanity check failed. Please check config.log for more information.]) + fi + PHP_NEW_EXTENSION(mcve, mcve.c, $ext_shared) PHP_SUBST(MCVE_SHARED_LIBADD) fi -- 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/mcve config.m4
bradmsswSat May 15 23:01:36 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve config.m4 Log: update config.m4 for libmonetra 4.0 compatability. Library no longer has MCVE_ symbols, the header file has #define\'s to convert MCVE_ - M_ to reflect the Monetra name change from MCVE. More updates to follow. http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.2.4.5r2=1.2.4.6ty=u Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.2.4.5 php-src/ext/mcve/config.m4:1.2.4.6 --- php-src/ext/mcve/config.m4:1.2.4.5 Fri Oct 3 01:25:36 2003 +++ php-src/ext/mcve/config.m4 Sat May 15 23:01:36 2004 @@ -1,7 +1,7 @@ dnl config.m4 for PHP4 MCVE Extension PHP_ARG_WITH(mcve, for MCVE support, -[ --with-mcve[=DIR] Include MCVE support. libmcve = 3.2.2 required]) +[ --with-mcve[=DIR] Include MCVE support. libmcve = 3.2.2 or libmonetra = 4.0 required]) PHP_ARG_WITH(openssl-dir,OpenSSL dir for MCVE, [ --with-openssl-dir[=DIR] MCVE: openssl install prefix.], no, no) @@ -53,16 +53,41 @@ PHP_ADD_INCLUDE($MCVE_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD) - dnl Build test + dnl Build test. Check for libmcve or libmonetra + dnl libmonetra_compat.h handle's MCVE_ - M_ conversion + dnl so it is API compatible + + has_mcve=0 + dnl check for libmcve PHP_CHECK_LIBRARY(mcve, MCVE_DestroyEngine, [ -AC_DEFINE(HAVE_MCVE, 1, [ ]) +has_mcve=1 ], [ -AC_MSG_ERROR([MCVE: Sanity check failed. Please check config.log for more information.]) +has_mcve=0 ], [ $MCVE_SHARED_LIBADD ]) + dnl check for libmonetra if no proper libmcve + dnl symlink named libmcve is created to libmonetra + dnl during libmonetra install, so this is valid + if test $has_mcve = 0 ; then +PHP_CHECK_LIBRARY(mcve, M_DestroyEngine, +[ + has_mcve=1 +], [ + has_mcve=0 +], [ + $MCVE_SHARED_LIBADD +]) + fi + + if test $has_mcve = 1 ; then +AC_DEFINE(HAVE_MCVE, 1, [ ]) + else +AC_MSG_ERROR([MCVE: Sanity check failed. Please check config.log for more information.]) + fi + PHP_NEW_EXTENSION(mcve, mcve.c, $ext_shared) PHP_SUBST(MCVE_SHARED_LIBADD) fi -- 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/mcve mcve.c
bradmsswWed Aug 20 15:43:07 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve mcve.c Log: allow destructor to clean up connection data Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.14.2.4 php-src/ext/mcve/mcve.c:1.14.2.5 --- php-src/ext/mcve/mcve.c:1.14.2.4Wed Jul 9 09:48:28 2003 +++ php-src/ext/mcve/mcve.c Wed Aug 20 15:43:06 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.14.2.4 2003/07/09 13:48:28 bradmssw Exp $ */ +/* $Id: mcve.c,v 1.14.2.5 2003/08/20 19:43:06 bradmssw Exp $ */ /* standard php include(s) */ #include php.h @@ -509,10 +509,17 @@ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == FAILURE) WRONG_PARAM_COUNT; +/* If MCVE_DestroyConn() is called within a PHP script, the Resource handle is + never cleared, as there does not appear to be an UNREGISTER or DESTROY resource + call in the Zend API. What happens is this uninitialized memory location is + passed again to the MCVE_DestroyConn() function at script exit (cleanup), and + causes weird stuff. So we just go ahead and let the PHP garbage collector call + our _free_mcve_conn() we registered (le_conn) to clean up */ +#if 0 ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg, -1, mcve connection, le_conn); MCVE_DestroyConn(conn); - +#endif RETURN_TRUE; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve mcve.c
bradmsswWed Aug 20 15:45:07 2003 EDT Modified files: /php-src/ext/mcve mcve.c Log: allow destructor to clean up connection data Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.22 php-src/ext/mcve/mcve.c:1.23 --- php-src/ext/mcve/mcve.c:1.22Sun Aug 3 13:44:36 2003 +++ php-src/ext/mcve/mcve.c Wed Aug 20 15:45:06 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.22 2003/08/03 17:44:36 zeev Exp $ */ +/* $Id: mcve.c,v 1.23 2003/08/20 19:45:06 bradmssw Exp $ */ /* standard php include(s) */ #include php.h @@ -508,10 +508,17 @@ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == FAILURE) WRONG_PARAM_COUNT; +/* If MCVE_DestroyConn() is called within a PHP script, the Resource handle is + never cleared, as there does not appear to be an UNREGISTER or DESTROY resource + call in the Zend API. What happens is this uninitialized memory location is + passed again to the MCVE_DestroyConn() function at script exit (cleanup), and + causes weird stuff. So we just go ahead and let the PHP garbage collector call + our _free_mcve_conn() we registered (le_conn) to clean up */ +#if 0 ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg, -1, mcve connection, le_conn); MCVE_DestroyConn(conn); - +#endif RETURN_TRUE; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve mcve.c
bradmsswWed Jul 9 09:45:19 2003 EDT Modified files: /php-src/ext/mcve mcve.c Log: fix typecasting errors, especially for new constants. Don't assume long and int are the same size, as on 64bit architectures, they are normally not Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.20 php-src/ext/mcve/mcve.c:1.21 --- php-src/ext/mcve/mcve.c:1.20Mon Jul 7 22:59:50 2003 +++ php-src/ext/mcve/mcve.c Wed Jul 9 09:45:19 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.20 2003/07/08 02:59:50 bradmssw Exp $ */ +/* $Id: mcve.c,v 1.21 2003/07/09 13:45:19 bradmssw Exp $ */ /* standard php include(s) */ #include php.h @@ -588,7 +588,6 @@ */ PHP_FUNCTION(mcve_setssl_files) { - MCVE_CONN *conn; int retval; zval **arg1, **arg2; @@ -841,29 +840,53 @@ convert_to_long_ex(arg2); switch (key) { - case MC_TRANTYPE: - case MC_PTRANNUM: + /* Typecast to MCVE_int64 */ case MC_TTID: + convert_to_long_ex(arg4); + retval = MCVE_TransParam(conn, (long)Z_LVAL_PP(arg2), key, (MCVE_int64)Z_LVAL_PP(arg4)); + break; + + /* Typecast to long */ + + case MC_PTRANNUM: + case MC_TIMESTAMP: + case MC_MARKER: + convert_to_long_ex(arg4); + retval = MCVE_TransParam(conn, (long)Z_LVAL_PP(arg2), key, (long)Z_LVAL_PP(arg4)); + break; + + /* Typecast to int */ case MC_ADMIN: + case MC_SUB: + case MC_TRANTYPE: case MC_AUDITTYPE: + case MC_EXCHARGES: + case MC_INQUIRY: + case MC_PRIORITY: + case MC_CARDTYPES: + case MC_ORIGTYPE: + case MC_VOIDORIGTYPE: convert_to_long_ex(arg4); - retval = MCVE_TransParam(conn, Z_LVAL_PP(arg2), key, Z_LVAL_PP(arg4)); + retval = MCVE_TransParam(conn, (long)Z_LVAL_PP(arg2), key, (int)Z_LVAL_PP(arg4)); break; + /* Typecast to double */ case MC_AMOUNT: + case MC_EXAMOUNT: + case MC_RATE: convert_to_double_ex(arg4); - retval = MCVE_TransParam(conn, Z_LVAL_PP(arg2), key, Z_DVAL_PP(arg4)); + retval = MCVE_TransParam(conn, (long)Z_LVAL_PP(arg2), key, (double)Z_DVAL_PP(arg4)); break; case MC_CUSTOM: convert_to_string_ex(arg4); convert_to_string_ex(arg5); - retval = MCVE_TransParam(conn, Z_LVAL_PP(arg2), key, Z_STRVAL_PP(arg4), Z_STRVAL_PP(arg5)); + retval = MCVE_TransParam(conn, (long)Z_LVAL_PP(arg2), key, Z_STRVAL_PP(arg4), Z_STRVAL_PP(arg5)); break; default: convert_to_string_ex(arg4); - retval = MCVE_TransParam(conn, Z_LVAL_PP(arg2), key, Z_STRVAL_PP(arg4)); + retval = MCVE_TransParam(conn, (long)Z_LVAL_PP(arg2), key, Z_STRVAL_PP(arg4)); break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/mcve mcve.c php_mcve.h
The functionality is not experimental. It has been in our private stable branch for quite some time, and we had just not merged it into the tree. We've actually had quite a few requests from people to merge it into the next official release so they could update php via the FreeBSD ports system or whatnot without having to apply our patches, and compile by hand. You should notice that very little had actually changed. It simply added a lot of Constants, and added one function mcve_setssl_files. I see no reason not to update the branch, especially since the changes are really non-intrusive. I can back it out if necessary, as I don't want to adversely affect any policy you may have. -Brad Derick Rethans wrote: On Tue, 8 Jul 2003, Brad House wrote: bradmssw Mon Jul 7 23:16:38 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve mcve.c php_mcve.h Log: update mcve ext from HEAD. Sync with libmcve-3.2 functionality Our policy is to put no new functionality in stable branches, can you explain why this is necessary? regards, Derick -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
bradmsswMon Jul 7 22:59:50 2003 EDT Modified files: /php-src/ext/mcve mcve.c php_mcve.h Log: sync functionality with libmcve 3.2 Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.19 php-src/ext/mcve/mcve.c:1.20 --- php-src/ext/mcve/mcve.c:1.19Mon Jun 16 10:20:05 2003 +++ php-src/ext/mcve/mcve.c Mon Jul 7 22:59:50 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mcve.c,v 1.19 2003/06/16 14:20:05 andrey Exp $ */ +/* $Id: mcve.c,v 1.20 2003/07/08 02:59:50 bradmssw Exp $ */ /* standard php include(s) */ #include php.h @@ -49,6 +49,7 @@ PHP_FE(mcve_setdropfile,NULL) PHP_FE(mcve_setip, NULL) PHP_FE(mcve_setssl, NULL) + PHP_FE(mcve_setssl_files, NULL) PHP_FE(mcve_settimeout, NULL) PHP_FE(mcve_setblocking,NULL) PHP_FE(mcve_verifyconnection, NULL) @@ -190,6 +191,33 @@ REGISTER_LONG_CONSTANT(MC_ADMIN, MC_ADMIN, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_AUDITTYPE, MC_AUDITTYPE, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_CUSTOM, MC_CUSTOM, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_EXAMOUNT, MC_EXAMOUNT, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_EXCHARGES, MC_EXCHARGES, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RATE, MC_RATE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RENTERNAME, MC_RENTERNAME, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RETURNCITY, MC_RETURNCITY, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RETURNSTATE, MC_RETURNSTATE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RETURNLOCATION, MC_RETURNLOCATION, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PRIORITY, MC_PRIORITY, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_INQUIRY, MC_INQUIRY, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_CARDTYPES, MC_CARDTYPES, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_SUB, MC_SUB, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_MARKER, MC_MARKER, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_DEVICETYPE, MC_DEVICETYPE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_ERRORCODE, MC_ERRORCODE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_NEWBATCH, MC_NEWBATCH, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_CURR, MC_CURR, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_DESCMERCH, MC_DESCMERCH, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_DESCLOC, MC_DESCLOC, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_ORIGTYPE, MC_ORIGTYPE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PIN, MC_PIN, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_VOIDORIGTYPE, MC_VOIDORIGTYPE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_TIMESTAMP, MC_TIMESTAMP, MCVE_CONST); + + /* Args for priorities */ + REGISTER_LONG_CONSTANT(MC_PRIO_HIGH, MC_PRIO_HIGH, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PRIO_NORMAL, MC_PRIO_NORMAL, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PRIO_LOW, MC_PRIO_LOW, MCVE_CONST); /* Args for adding a user */ REGISTER_LONG_CONSTANT(MC_USER_PROC, MC_USER_PROC, MCVE_CONST); @@ -210,16 +238,87 @@ REGISTER_LONG_CONSTANT(MC_USER_MERCHLOC, MC_USER_MERCHLOC, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_USER_STATECODE, MC_USER_STATECODE, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_USER_PHONE, MC_USER_PHONE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_SUB, MC_USER_SUB, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_CARDTYPES, MC_USER_CARDTYPES, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_MODE, MC_USER_MODE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_VNUMBER, MC_USER_VNUMBER, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_ROUTINGID, MC_USER_ROUTINGID, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_PPROPERTY, MC_USER_PPROPERTY, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_PID, MC_USER_PID, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_PIDPWD, MC_USER_PIDPWD, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_SMID, MC_USER_SMID, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_SMIDPWD, MC_USER_SMIDPWD, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_USDDIV, MC_USER_USDDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_AUDDIV, MC_USER_AUDDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_DKKDIV, MC_USER_DKKDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_GBPDIV, MC_USER_GBPDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_HKDDIV, MC_USER_HKDDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_JPYDIV, MC_USER_JPYDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_NZDDIV, MC_USER_NZDDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_NOKDIV, MC_USER_NOKDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_SGDDIV, MC_USER_SGDDIV, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_ZARDIV, MC_USER_ZARDIV, MCVE_CONST); +
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mcve mcve.c php_mcve.h
bradmsswMon Jul 7 23:16:38 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve mcve.c php_mcve.h Log: update mcve ext from HEAD. Sync with libmcve-3.2 functionality Index: php-src/ext/mcve/mcve.c diff -u php-src/ext/mcve/mcve.c:1.14.2.2 php-src/ext/mcve/mcve.c:1.14.2.3 --- php-src/ext/mcve/mcve.c:1.14.2.2Fri Jun 6 02:17:08 2003 +++ php-src/ext/mcve/mcve.c Mon Jul 7 23:16:38 2003 @@ -4,10 +4,10 @@ +--+ | Copyright (c) 1997-2003 The PHP Group| +--+ - | This source file is subject to version 2.02 of the PHP license, | + | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | @@ -17,6 +17,8 @@ +--+ */ +/* $Id: mcve.c,v 1.14.2.3 2003/07/08 03:16:38 bradmssw Exp $ */ + /* standard php include(s) */ #include php.h #include ext/standard/head.h @@ -47,6 +49,7 @@ PHP_FE(mcve_setdropfile,NULL) PHP_FE(mcve_setip, NULL) PHP_FE(mcve_setssl, NULL) + PHP_FE(mcve_setssl_files, NULL) PHP_FE(mcve_settimeout, NULL) PHP_FE(mcve_setblocking,NULL) PHP_FE(mcve_verifyconnection, NULL) @@ -188,6 +191,33 @@ REGISTER_LONG_CONSTANT(MC_ADMIN, MC_ADMIN, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_AUDITTYPE, MC_AUDITTYPE, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_CUSTOM, MC_CUSTOM, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_EXAMOUNT, MC_EXAMOUNT, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_EXCHARGES, MC_EXCHARGES, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RATE, MC_RATE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RENTERNAME, MC_RENTERNAME, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RETURNCITY, MC_RETURNCITY, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RETURNSTATE, MC_RETURNSTATE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_RETURNLOCATION, MC_RETURNLOCATION, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PRIORITY, MC_PRIORITY, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_INQUIRY, MC_INQUIRY, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_CARDTYPES, MC_CARDTYPES, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_SUB, MC_SUB, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_MARKER, MC_MARKER, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_DEVICETYPE, MC_DEVICETYPE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_ERRORCODE, MC_ERRORCODE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_NEWBATCH, MC_NEWBATCH, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_CURR, MC_CURR, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_DESCMERCH, MC_DESCMERCH, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_DESCLOC, MC_DESCLOC, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_ORIGTYPE, MC_ORIGTYPE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PIN, MC_PIN, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_VOIDORIGTYPE, MC_VOIDORIGTYPE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_TIMESTAMP, MC_TIMESTAMP, MCVE_CONST); + + /* Args for priorities */ + REGISTER_LONG_CONSTANT(MC_PRIO_HIGH, MC_PRIO_HIGH, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PRIO_NORMAL, MC_PRIO_NORMAL, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_PRIO_LOW, MC_PRIO_LOW, MCVE_CONST); /* Args for adding a user */ REGISTER_LONG_CONSTANT(MC_USER_PROC, MC_USER_PROC, MCVE_CONST); @@ -208,16 +238,87 @@ REGISTER_LONG_CONSTANT(MC_USER_MERCHLOC, MC_USER_MERCHLOC, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_USER_STATECODE, MC_USER_STATECODE, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_USER_PHONE, MC_USER_PHONE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_SUB, MC_USER_SUB, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_CARDTYPES, MC_USER_CARDTYPES, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_MODE, MC_USER_MODE, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_VNUMBER, MC_USER_VNUMBER, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_ROUTINGID, MC_USER_ROUTINGID, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_USER_PPROPERTY, MC_USER_PPROPERTY, MCVE_CONST); +
[PHP-CVS] cvs: php4 /ext/mcve mcve.c
bradmsswTue Oct 29 20:08:10 2002 EDT Modified files: /php4/ext/mcve mcve.c Log: constant MC_TRAN_CHNGPWD typo Index: php4/ext/mcve/mcve.c diff -u php4/ext/mcve/mcve.c:1.13 php4/ext/mcve/mcve.c:1.14 --- php4/ext/mcve/mcve.c:1.13 Tue Aug 27 22:44:39 2002 +++ php4/ext/mcve/mcve.cTue Oct 29 20:08:09 2002 -223,7 +223,7 REGISTER_LONG_CONSTANT(MC_TRAN_CHKPWD, MC_TRAN_CHKPWD, MCVE_CONST); /* Engine Admin Transaction Types */ - REGISTER_LONG_CONSTANT(MC_TRAN_CHNGPWD, MC_TRAN_CHKPWD, MCVE_CONST); + REGISTER_LONG_CONSTANT(MC_TRAN_CHNGPWD, MC_TRAN_CHNGPWD, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_TRAN_LISTSTATS, MC_TRAN_LISTSTATS, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_TRAN_LISTUSERS, MC_TRAN_LISTUSERS, MCVE_CONST); REGISTER_LONG_CONSTANT(MC_TRAN_GETUSERINFO, MC_TRAN_GETUSERINFO, MCVE_CONST); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php