Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
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
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
Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
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 -- Wbr, Antony Dovgal -- 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
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 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
Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
Hi Jani Taskinen, you wrote: Excuse me, but what's the point with this change: - RETVAL_STRING(retval, 1); + RETVAL_STRING(estrdup(retval), 0); The second parameter '1' will duplicate the value? If I do this, then usually because it gives a warning for const values. Regards, -- Michael - mike(@)php.net signature.asc Description: OpenPGP digital signature
[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 { -
Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h
Excuse me, but what's the point with this change: - RETVAL_STRING(retval, 1); + RETVAL_STRING(estrdup(retval), 0); The second parameter '1' will duplicate the value? --Jani On Mon, 6 Jun 2005, Brad House wrote: bradmsswMon Jun 6 12:43:23 2005 EDT Modified files: /php-src/ext/mcvemcve.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. -- Donate @ http://pecl.php.net/wishlist.php/sniper -- 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,
[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); +