[PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ php_snmp.h snmp.c
lytboris Fri, 02 Sep 2011 08:07:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316022 Log: remove php_snmp_get_ce() Changed paths: U php/php-src/trunk/ext/snmp/php_snmp.h U php/php-src/trunk/ext/snmp/snmp.c Modified: php/php-src/trunk/ext/snmp/php_snmp.h === --- php/php-src/trunk/ext/snmp/php_snmp.h 2011-09-02 07:18:24 UTC (rev 316021) +++ php/php-src/trunk/ext/snmp/php_snmp.h 2011-09-02 08:07:58 UTC (rev 316022) @@ -127,7 +127,7 @@ #endif #define REGISTER_SNMP_CLASS_CONST_LONG(const_name, value) \ - zend_declare_class_constant_long(php_snmp_get_ce(), const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); + zend_declare_class_constant_long(php_snmp_ce, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); #else Modified: php/php-src/trunk/ext/snmp/snmp.c === --- php/php-src/trunk/ext/snmp/snmp.c 2011-09-02 07:18:24 UTC (rev 316021) +++ php/php-src/trunk/ext/snmp/snmp.c 2011-09-02 08:07:58 UTC (rev 316022) @@ -132,13 +132,8 @@ static zend_object_handlers php_snmp_object_handlers; /* Class entries */ -zend_class_entry *php_snmp_class_entry; +zend_class_entry *php_snmp_ce; -zend_class_entry *php_snmp_get_ce() -{ - return php_snmp_class_entry; -} - /* Class object properties */ static HashTable php_snmp_properties; @@ -2399,7 +2394,7 @@ INIT_CLASS_ENTRY(ce, SNMP, php_snmp_class_methods); ce.create_object = php_snmp_object_new; php_snmp_object_handlers.clone_obj = NULL; - php_snmp_class_entry = zend_register_internal_class(ce TSRMLS_CC); + php_snmp_ce = zend_register_internal_class(ce TSRMLS_CC); /* Register SNMP Class properties */ zend_hash_init(php_snmp_properties, 0, NULL, NULL, 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ext/snmp/ php_snmp.h snmp.c
lytboris Fri, 02 Sep 2011 08:09:23 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316023 Log: merge from trunk: remove php_snmp_get_ce() Changed paths: _U php/php-src/branches/PHP_5_4/ext/snmp/ U php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h U php/php-src/branches/PHP_5_4/ext/snmp/snmp.c _U php/php-src/branches/PHP_5_4/ext/snmp/tests/ Property changes on: php/php-src/branches/PHP_5_4/ext/snmp ___ Modified: svn:mergeinfo - /php/php-src/trunk/ext/snmp:284726,311033-315236,315606,315608,315862,315924 + /php/php-src/trunk/ext/snmp:284726,311033-315236,315606,315608,315862,315924,316022 Modified: php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h === --- php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h2011-09-02 08:07:58 UTC (rev 316022) +++ php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h2011-09-02 08:09:23 UTC (rev 316023) @@ -127,7 +127,7 @@ #endif #define REGISTER_SNMP_CLASS_CONST_LONG(const_name, value) \ - zend_declare_class_constant_long(php_snmp_get_ce(), const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); + zend_declare_class_constant_long(php_snmp_ce, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); #else Modified: php/php-src/branches/PHP_5_4/ext/snmp/snmp.c === --- php/php-src/branches/PHP_5_4/ext/snmp/snmp.c2011-09-02 08:07:58 UTC (rev 316022) +++ php/php-src/branches/PHP_5_4/ext/snmp/snmp.c2011-09-02 08:09:23 UTC (rev 316023) @@ -124,13 +124,8 @@ static zend_object_handlers php_snmp_object_handlers; /* Class entries */ -zend_class_entry *php_snmp_class_entry; +zend_class_entry *php_snmp_ce; -zend_class_entry *php_snmp_get_ce() -{ - return php_snmp_class_entry; -} - /* Class object properties */ static HashTable php_snmp_properties; @@ -2330,7 +2325,7 @@ INIT_CLASS_ENTRY(ce, SNMP, php_snmp_class_methods); ce.create_object = php_snmp_object_new; php_snmp_object_handlers.clone_obj = NULL; - php_snmp_class_entry = zend_register_internal_class(ce TSRMLS_CC); + php_snmp_ce = zend_register_internal_class(ce TSRMLS_CC); /* Register SNMP Class properties */ zend_hash_init(php_snmp_properties, 0, NULL, NULL, 1); Property changes on: php/php-src/branches/PHP_5_4/ext/snmp/tests ___ Modified: svn:mergeinfo - /php/php-src/trunk/ext/snmp/tests:284726,311033-315236,315386,315606,315608,315862,315916,315924 + /php/php-src/trunk/ext/snmp/tests:284726,311033-315236,315386,315606,315608,315862,315916,315924,316022 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_character_set.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_set_charset.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_character_se
uw Fri, 02 Sep 2011 09:27:23 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316028 Log: MySQL 5.6 update Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_character_set.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_charset.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_character_set.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_set_charset.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_character_set.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_charset.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_character_set.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_character_set.phpt 2011-09-02 08:57:50 UTC (rev 316027) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_character_set.phpt 2011-09-02 09:27:23 UTC (rev 316028) @@ -48,7 +48,8 @@ $k = $charset['Charset']; /* The server currently 17.07.2007 can't handle data sent in ucs2 */ /* The server currently 16.08.2010 can't handle data sent in utf16 and utf32 */ - if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32') { + /* The server currently 02.09.2011 can't handle data sent in utf16le */ + if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32' || 'utf16le' == $charset['Charset']) { continue; } Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_charset.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_charset.phpt 2011-09-02 08:57:50 UTC (rev 316027) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_charset.phpt 2011-09-02 09:27:23 UTC (rev 316028) @@ -102,7 +102,7 @@ printf([016] Cannot get list of character sets\n); while ($tmp = mysqli_fetch_assoc($res)) { - if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset']) + if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset'] || 'utf16le' == $tmp['Charset']) continue; /* Uncomment to see where it hangs - var_dump($tmp); flush(); */ Modified: php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_character_set.phpt === --- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_character_set.phpt 2011-09-02 08:57:50 UTC (rev 316027) +++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_character_set.phpt 2011-09-02 09:27:23 UTC (rev 316028) @@ -48,7 +48,8 @@ $k = $charset['Charset']; /* The server currently 17.07.2007 can't handle data sent in ucs2 */ /* The server currently 16.08.2010 can't handle data sent in utf16 and utf32 */ - if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32') { + /* The server currently 02.09.2011 can't handle data sent in utf16le */ + if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32' || 'utf16le' == $charset['Charset']) { continue; } Modified: php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_set_charset.phpt === --- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_set_charset.phpt 2011-09-02 08:57:50 UTC (rev 316027) +++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_set_charset.phpt 2011-09-02 09:27:23 UTC (rev 316028) @@ -102,7 +102,7 @@ printf([016] Cannot get list of character sets\n); while ($tmp = mysqli_fetch_assoc($res)) { - if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset']) + if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset'] || 'utf16le' == $tmp['Charset']) continue; /* Uncomment to see where it hangs - var_dump($tmp); flush(); */ Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_character_set.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_character_set.phpt 2011-09-02 08:57:50 UTC (rev 316027) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_character_set.phpt 2011-09-02 09:27:23 UTC (rev 316028) @@ -48,7 +48,8 @@ $k = $charset['Charset']; /* The server currently 17.07.2007 can't handle data
[PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ php_snmp.h snmp.c tests/snmp-object-error.phpt tests/snmp-object-properties.phpt
lytboris Fri, 02 Sep 2011 10:04:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316029 Log: added SNMPException class, enabling ability to throw exceptions when a known SNMP error has occured FR #55542 Bug: https://bugs.php.net/55542 (Assigned) SNMP class should use Exceptions instead of PHP Errors Changed paths: U php/php-src/trunk/ext/snmp/php_snmp.h U php/php-src/trunk/ext/snmp/snmp.c U php/php-src/trunk/ext/snmp/tests/snmp-object-error.phpt U php/php-src/trunk/ext/snmp/tests/snmp-object-properties.phpt Modified: php/php-src/trunk/ext/snmp/php_snmp.h === --- php/php-src/trunk/ext/snmp/php_snmp.h 2011-09-02 09:27:23 UTC (rev 316028) +++ php/php-src/trunk/ext/snmp/php_snmp.h 2011-09-02 10:04:19 UTC (rev 316029) @@ -94,6 +94,7 @@ int oid_output_format; int snmp_errno; int oid_increasing_check; + int exceptions_enabled; char snmp_errstr[256]; } php_snmp_object; Modified: php/php-src/trunk/ext/snmp/snmp.c === --- php/php-src/trunk/ext/snmp/snmp.c 2011-09-02 09:27:23 UTC (rev 316028) +++ php/php-src/trunk/ext/snmp/snmp.c 2011-09-02 10:04:19 UTC (rev 316029) @@ -34,6 +34,10 @@ #include zend_exceptions.h +#if HAVE_SPL +#include ext/spl/spl_exceptions.h +#endif + #if HAVE_SNMP #include sys/types.h @@ -113,12 +117,21 @@ } #define PHP_SNMP_ERRNO_NOERROR 0 -#define PHP_SNMP_ERRNO_GENERIC 1 -#define PHP_SNMP_ERRNO_TIMEOUT 2 -#define PHP_SNMP_ERRNO_ERROR_IN_REPLY 3 -#define PHP_SNMP_ERRNO_OID_NOT_INCREASING 4 -#define PHP_SNMP_ERRNO_OID_PARSING_ERROR 5 -#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES 6 +#define PHP_SNMP_ERRNO_GENERIC (1 1) +#define PHP_SNMP_ERRNO_TIMEOUT (1 2) +#define PHP_SNMP_ERRNO_ERROR_IN_REPLY (1 3) +#define PHP_SNMP_ERRNO_OID_NOT_INCREASING (1 4) +#define PHP_SNMP_ERRNO_OID_PARSING_ERROR (1 5) +#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES (1 6) +#define PHP_SNMP_ERRNO_ANY ( \ + PHP_SNMP_ERRNO_GENERIC | \ + PHP_SNMP_ERRNO_TIMEOUT | \ + PHP_SNMP_ERRNO_ERROR_IN_REPLY | \ + PHP_SNMP_ERRNO_OID_NOT_INCREASING | \ + PHP_SNMP_ERRNO_OID_PARSING_ERROR | \ + PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES | \ + PHP_SNMP_ERRNO_NOERROR \ + ) ZEND_DECLARE_MODULE_GLOBALS(snmp) static PHP_GINIT_FUNCTION(snmp); @@ -133,6 +146,7 @@ /* Class entries */ zend_class_entry *php_snmp_ce; +zend_class_entry *php_snmp_exception_ce; /* Class object properties */ static HashTable php_snmp_properties; @@ -533,9 +547,13 @@ return; } - va_start(args, format); - php_verror(docref, , E_WARNING, format, args TSRMLS_CC); - va_end(args); + if (object (snmp_object-exceptions_enabled type)) { + zend_throw_exception_ex(php_snmp_exception_ce, type, snmp_object-snmp_errstr TSRMLS_CC); + } else { + va_start(args, format); + php_verror(docref, , E_WARNING, format, args TSRMLS_CC); + va_end(args); + } } /* }}} */ @@ -1829,6 +1847,7 @@ snmp_object-oid_output_format = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT); snmp_object-quick_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT); snmp_object-oid_increasing_check = TRUE; + snmp_object-exceptions_enabled = 0; } /* }}} */ @@ -2204,6 +2223,7 @@ PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(valueretrieval) PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(oid_output_format) +PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(exceptions_enabled) /* {{{ */ static int php_snmp_write_info(php_snmp_object *snmp_object, zval *newval TSRMLS_DC) @@ -2330,6 +2350,27 @@ } /* }}} */ +/* {{{ */ +static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval TSRMLS_DC) +{ + zval ztmp; + int ret = SUCCESS; + if (Z_TYPE_P(newval) != IS_LONG) { + ztmp = *newval; + zval_copy_ctor(ztmp); + convert_to_long(ztmp); + newval = ztmp; + } + + snmp_object-exceptions_enabled = Z_LVAL_P(newval); + + if (newval == ztmp) { + zval_dtor(newval); + } + return ret; +} +/* }}} */ + /* {{{ php_snmp_class_methods[] */ static zend_function_entry php_snmp_class_methods[] = { PHP_ME(snmp, __construct, arginfo_snmp_create, ZEND_ACC_PUBLIC) @@ -2357,6 +2398,7 @@ PHP_SNMP_PROPERTY_ENTRY_RECORD(enum_print), PHP_SNMP_PROPERTY_ENTRY_RECORD(oid_output_format), PHP_SNMP_PROPERTY_ENTRY_RECORD(oid_increasing_check), + PHP_SNMP_PROPERTY_ENTRY_RECORD(exceptions_enabled), { NULL, 0, NULL, NULL} }; /* }}} */ @@ -2366,7 +2408,7 @@ PHP_MINIT_FUNCTION(snmp) { netsnmp_log_handler *logh; - zend_class_entry ce; + zend_class_entry ce, cex; le_snmp_session = zend_register_list_destructors_ex(php_snmp_session_destructor, NULL, PHP_SNMP_SESSION_RES_NAME, module_number); @@ -2424,19 +2466,28 @@ REGISTER_LONG_CONSTANT(SNMP_INTEGER, ASN_INTEGER, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SNMP_COUNTER64, ASN_COUNTER64, CONST_CS | CONST_PERSISTENT); -
[PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ snmp.c
lytboris Fri, 02 Sep 2011 10:07:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316031 Log: remove extra white space Changed paths: U php/php-src/trunk/ext/snmp/snmp.c Modified: php/php-src/trunk/ext/snmp/snmp.c === --- php/php-src/trunk/ext/snmp/snmp.c 2011-09-02 10:06:06 UTC (rev 316030) +++ php/php-src/trunk/ext/snmp/snmp.c 2011-09-02 10:07:01 UTC (rev 316031) @@ -2526,8 +2526,6 @@ ZEND_MOD_END }; #endif - - /* }}} */ /* {{{ snmp_module_entry -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ext/snmp/ php_snmp.h snmp.c tests/snmp-object-error.phpt tests/snmp-object-properties.phpt
lytboris Fri, 02 Sep 2011 10:13:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316032 Log: merge from trunk added SNMPException class, enabling ability to throw exceptions when a known SNMP error has occured FR #55542 Bug: https://bugs.php.net/55542 (Assigned) SNMP class should use Exceptions instead of PHP Errors Changed paths: _U php/php-src/branches/PHP_5_4/ext/snmp/ U php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h U php/php-src/branches/PHP_5_4/ext/snmp/snmp.c _U php/php-src/branches/PHP_5_4/ext/snmp/tests/ U php/php-src/branches/PHP_5_4/ext/snmp/tests/snmp-object-error.phpt U php/php-src/branches/PHP_5_4/ext/snmp/tests/snmp-object-properties.phpt Property changes on: php/php-src/branches/PHP_5_4/ext/snmp ___ Modified: svn:mergeinfo - /php/php-src/trunk/ext/snmp:284726,311033-315236,315606,315608,315862,315924,316022 + /php/php-src/trunk/ext/snmp:284726,311033-315236,315606,315608,315862,315924,316022,316029,316031 Modified: php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h === --- php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h 2011-09-02 10:07:01 UTC (rev 316031) +++ php/php-src/branches/PHP_5_4/ext/snmp/php_snmp.h 2011-09-02 10:13:30 UTC (rev 316032) @@ -94,6 +94,7 @@ int oid_output_format; int snmp_errno; int oid_increasing_check; + int exceptions_enabled; char snmp_errstr[256]; } php_snmp_object; Modified: php/php-src/branches/PHP_5_4/ext/snmp/snmp.c === --- php/php-src/branches/PHP_5_4/ext/snmp/snmp.c 2011-09-02 10:07:01 UTC (rev 316031) +++ php/php-src/branches/PHP_5_4/ext/snmp/snmp.c 2011-09-02 10:13:30 UTC (rev 316032) @@ -34,6 +34,10 @@ #include zend_exceptions.h +#if HAVE_SPL +#include ext/spl/spl_exceptions.h +#endif + #if HAVE_SNMP #include sys/types.h @@ -105,12 +109,21 @@ } #define PHP_SNMP_ERRNO_NOERROR 0 -#define PHP_SNMP_ERRNO_GENERIC 1 -#define PHP_SNMP_ERRNO_TIMEOUT 2 -#define PHP_SNMP_ERRNO_ERROR_IN_REPLY 3 -#define PHP_SNMP_ERRNO_OID_NOT_INCREASING 4 -#define PHP_SNMP_ERRNO_OID_PARSING_ERROR 5 -#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES 6 +#define PHP_SNMP_ERRNO_GENERIC (1 1) +#define PHP_SNMP_ERRNO_TIMEOUT (1 2) +#define PHP_SNMP_ERRNO_ERROR_IN_REPLY (1 3) +#define PHP_SNMP_ERRNO_OID_NOT_INCREASING (1 4) +#define PHP_SNMP_ERRNO_OID_PARSING_ERROR (1 5) +#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES (1 6) +#define PHP_SNMP_ERRNO_ANY ( \ + PHP_SNMP_ERRNO_GENERIC | \ + PHP_SNMP_ERRNO_TIMEOUT | \ + PHP_SNMP_ERRNO_ERROR_IN_REPLY | \ + PHP_SNMP_ERRNO_OID_NOT_INCREASING | \ + PHP_SNMP_ERRNO_OID_PARSING_ERROR | \ + PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES | \ + PHP_SNMP_ERRNO_NOERROR \ + ) ZEND_DECLARE_MODULE_GLOBALS(snmp) static PHP_GINIT_FUNCTION(snmp); @@ -125,6 +138,7 @@ /* Class entries */ zend_class_entry *php_snmp_ce; +zend_class_entry *php_snmp_exception_ce; /* Class object properties */ static HashTable php_snmp_properties; @@ -518,9 +532,13 @@ return; } - va_start(args, format); - php_verror(docref, , E_WARNING, format, args TSRMLS_CC); - va_end(args); + if (object (snmp_object-exceptions_enabled type)) { + zend_throw_exception_ex(php_snmp_exception_ce, type, snmp_object-snmp_errstr TSRMLS_CC); + } else { + va_start(args, format); + php_verror(docref, , E_WARNING, format, args TSRMLS_CC); + va_end(args); + } } /* }}} */ @@ -1796,6 +1814,7 @@ snmp_object-oid_output_format = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT); snmp_object-quick_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT); snmp_object-oid_increasing_check = TRUE; + snmp_object-exceptions_enabled = 0; } /* }}} */ @@ -2135,6 +2154,7 @@ PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(valueretrieval) PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(oid_output_format) +PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(exceptions_enabled) /* {{{ */ static int php_snmp_write_info(php_snmp_object *snmp_object, zval *newval TSRMLS_DC) @@ -2261,6 +2281,27 @@ } /* }}} */ +/* {{{ */ +static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval TSRMLS_DC) +{ + zval ztmp; + int ret = SUCCESS; + if (Z_TYPE_P(newval) != IS_LONG) { + ztmp = *newval; + zval_copy_ctor(ztmp); + convert_to_long(ztmp); + newval = ztmp; + } + + snmp_object-exceptions_enabled = Z_LVAL_P(newval); + + if (newval == ztmp) { + zval_dtor(newval); + } + return ret; +} +/* }}} */ + /* {{{ php_snmp_class_methods[] */ static zend_function_entry php_snmp_class_methods[] = { PHP_ME(snmp, __construct, arginfo_snmp_create, ZEND_ACC_PUBLIC) @@ -2288,6 +2329,7 @@ PHP_SNMP_PROPERTY_ENTRY_RECORD(enum_print), PHP_SNMP_PROPERTY_ENTRY_RECORD(oid_output_format), PHP_SNMP_PROPERTY_ENTRY_RECORD(oid_increasing_check), +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/014.phpt branches/PHP_5_3/ext/mysqli/tests/015.phpt branches/PHP_5_3/ext/mysqli/tests/connect.inc branches/PHP_5_3/ext/mysqli/tests/mysql
uw Fri, 02 Sep 2011 10:38:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316033 Log: As of MySQL 5.6.1 the server variable have_innodb is no more. Updating InnoDB check... Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/014.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_autocommit.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_autocommit_oo.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_rollback.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_commit.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_commit_oo.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fork.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_rollback.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/014.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/015.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/connect.inc U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_autocommit.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_autocommit_oo.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_change_user_rollback.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_commit.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_commit_oo.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_fork.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_rollback.phpt U php/php-src/trunk/ext/mysqli/tests/014.phpt U php/php-src/trunk/ext/mysqli/tests/015.phpt U php/php-src/trunk/ext/mysqli/tests/connect.inc U php/php-src/trunk/ext/mysqli/tests/mysqli_autocommit.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_autocommit_oo.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_rollback.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_commit.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_commit_oo.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fork.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_rollback.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/014.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/014.phpt 2011-09-02 10:13:30 UTC (rev 316032) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/014.phpt 2011-09-02 10:38:51 UTC (rev 316033) @@ -5,19 +5,13 @@ require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once(connect.inc); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); - if (!$result = mysqli_query($link, SHOW VARIABLES LIKE 'have_innodb')) { - die(skip Cannot check for required InnoDB suppot); - } - if (!$row = mysqli_fetch_row($result)) - die(skip Cannot check for required InnoDB suppot); + if (!$link) + die(sprintf(Cannot connect, [%d] %s, mysqli_connect_errno(), mysqli_connect_error())); - mysqli_free_result($result); - mysqli_close($link); - if ($row[1] == DISABLED || $row[1] == NO) { - printf (skip innodb support is not installed or enabled.); - exit; - } + if (!have_innodb($link)) + die(sprintf(Needs InnoDB support, [%d] %s, $link-errno, $link-error)); ? --FILE-- ?php Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt 2011-09-02 10:13:30 UTC (rev 316032) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt 2011-09-02 10:38:51 UTC (rev 316033) @@ -4,17 +4,13 @@ ?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); - require_once(connect.inc); - $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); - $result = mysqli_query($link, SHOW VARIABLES LIKE 'have_innodb'); - $row = mysqli_fetch_row($result); - mysqli_free_result($result); - mysqli_close($link); - if ($row[1] == DISABLED || $row[1] == NO) { - printf (skip innodb support is not installed or enabled.); - exit; - } + require_once('connect.inc'); + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf(Cannot connect, [%d] %s, mysqli_connect_errno(), mysqli_connect_error())); + + if (!have_innodb($link)) + die(sprintf(Needs InnoDB support, [%d] %s, $link-errno, $link-error)); ? --FILE-- ?php Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc 2011-09-02 10:13:30 UTC (rev 316032) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc 2011-09-02 10:38:51 UTC (rev 316033) @@ -222,7 +222,47 @@ return $charsets; } +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/connect.inc branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc branches/PHP_5_4/ext/mysqli/tests/connect.inc branches/PHP_5_4/ext/pd
uw Fri, 02 Sep 2011 11:06:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316034 Log: Hopefully, this is an even better way to check for InnoDB support as of MySQL 5.6.1 Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc U php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc U php/php-src/branches/PHP_5_4/ext/mysqli/tests/connect.inc U php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/mysql_pdo_test.inc U php/php-src/trunk/ext/mysqli/tests/connect.inc U php/php-src/trunk/ext/pdo_mysql/tests/mysql_pdo_test.inc Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc 2011-09-02 10:38:51 UTC (rev 316033) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/connect.inc 2011-09-02 11:06:51 UTC (rev 316034) @@ -234,7 +234,12 @@ /* MySQL 5.6.1+ */ if ($res = $link-query(SHOW ENGINES)) { while ($row = $res-fetch_assoc()) { - if (('InnoDB' == $row['Engine']) ('YES' == $row['Support'])) { + if (!isset($row['Engine']) || !isset($row['Support'])) + return false; + + if (('InnoDB' == $row['Engine']) + (('YES' == $row['Support']) || ('DEFAULT' == $row['Support'])) + ) { return true; } } Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc 2011-09-02 10:38:51 UTC (rev 316033) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc 2011-09-02 11:06:51 UTC (rev 316034) @@ -141,12 +141,19 @@ } - static function detect_transactional_mysql_engine($db) { + static function detect_transactional_mysql_engine($db) { foreach ($db-query(show variables like 'have%') as $row) { - if ($row[1] == 'YES' ($row[0] == 'have_innodb' || $row[0] == 'have_bdb')) { + if (!empty($row) $row[1] == 'YES' ($row[0] == 'have_innodb' || $row[0] == 'have_bdb')) { return str_replace(have_, , $row[0]); } } + /* MySQL 5.6.1+ */ + foreach ($db-query(SHOW ENGINES) as $row) { + if (isset($row['engine']) isset($row['support'])) { +if ('InnoDB' == $row['engine'] ('YES' == $row['support'] || 'DEFAULT' == $row['support'])) + return 'innodb'; + } + } return false; } Modified: php/php-src/branches/PHP_5_4/ext/mysqli/tests/connect.inc === --- php/php-src/branches/PHP_5_4/ext/mysqli/tests/connect.inc 2011-09-02 10:38:51 UTC (rev 316033) +++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/connect.inc 2011-09-02 11:06:51 UTC (rev 316034) @@ -234,7 +234,12 @@ /* MySQL 5.6.1+ */ if ($res = $link-query(SHOW ENGINES)) { while ($row = $res-fetch_assoc()) { - if (('InnoDB' == $row['Engine']) ('YES' == $row['Support'])) { + if (!isset($row['Engine']) || !isset($row['Support'])) + return false; + + if (('InnoDB' == $row['Engine']) + (('YES' == $row['Support']) || ('DEFAULT' == $row['Support'])) + ) { return true; } } Modified: php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/mysql_pdo_test.inc === --- php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/mysql_pdo_test.inc 2011-09-02 10:38:51 UTC (rev 316033) +++ php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/mysql_pdo_test.inc 2011-09-02 11:06:51 UTC (rev 316034) @@ -141,12 +141,19 @@ } - static
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c branches/PHP_5_4/ext/mysqlnd/mysqlnd_ps.c trunk/ext/mysqlnd/mysqlnd_ps.c
andrey Fri, 02 Sep 2011 11:22:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316035 Log: function rename to comply with the schema of other callbacks Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c U php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_ps.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c 2011-09-02 11:06:51 UTC (rev 316034) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c 2011-09-02 11:22:41 UTC (rev 316035) @@ -41,7 +41,7 @@ /* Exported by mysqlnd_ps_codec.c */ enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC); -enum_func_status mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, +enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC); @@ -97,7 +97,7 @@ result = stmt-result; result-type= MYSQLND_RES_PS_BUF; - result-m.fetch_row = mysqlnd_fetch_stmt_row_buffered; + result-m.fetch_row = mysqlnd_stmt_fetch_row_buffered; result-m.fetch_lengths = NULL;/* makes no sense */ result-result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); @@ -724,16 +724,16 @@ /* }}} */ -/* {{{ mysqlnd_fetch_stmt_row_buffered */ +/* {{{ mysqlnd_stmt_fetch_row_buffered */ enum_func_status -mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) +mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { MYSQLND_STMT * s = (MYSQLND_STMT *) param; MYSQLND_STMT_DATA * stmt = s? s-data:NULL; MYSQLND_RES_BUFFERED *set = result-stored_data; unsigned int field_count = result-meta-field_count; - DBG_ENTER(mysqlnd_fetch_stmt_row_buffered); + DBG_ENTER(mysqlnd_stmt_fetch_row_buffered); *fetched_anything = FALSE; DBG_INF_FMT(stmt=%lu, stmt != NULL ? stmt-stmt_id : 0L); Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_ps.c === --- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_ps.c 2011-09-02 11:06:51 UTC (rev 316034) +++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_ps.c 2011-09-02 11:22:41 UTC (rev 316035) @@ -41,7 +41,7 @@ /* Exported by mysqlnd_ps_codec.c */ enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC); -enum_func_status mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, +enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC); @@ -112,7 +112,7 @@ result = stmt-result; result-type= MYSQLND_RES_PS_BUF; - result-m.fetch_row = mysqlnd_fetch_stmt_row_buffered; + result-m.fetch_row = mysqlnd_stmt_fetch_row_buffered; result-m.fetch_lengths = NULL;/* makes no sense */ result-m.row_decoder = php_mysqlnd_rowp_read_binary_protocol; @@ -720,16 +720,16 @@ /* }}} */ -/* {{{ mysqlnd_fetch_stmt_row_buffered */ +/* {{{ mysqlnd_stmt_fetch_row_buffered */ enum_func_status -mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) +mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { MYSQLND_STMT * s = (MYSQLND_STMT *) param; MYSQLND_STMT_DATA * stmt = s? s-data:NULL; MYSQLND_RES_BUFFERED *set = result-stored_data; unsigned int field_count = result-meta-field_count; - DBG_ENTER(mysqlnd_fetch_stmt_row_buffered); + DBG_ENTER(mysqlnd_stmt_fetch_row_buffered); *fetched_anything = FALSE; DBG_INF_FMT(stmt=%lu, stmt != NULL ? stmt-stmt_id : 0L); Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c 2011-09-02
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/connect.inc branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc branches/PHP_5_4/ext/mysqli/tests/connect.inc branches/PHP_5_4/ex
On Fri, Sep 2, 2011 at 13:06, Ulf Wendel u...@php.net wrote: uw Fri, 02 Sep 2011 11:06:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316034 Log: Hopefully, this is an even better way to check for InnoDB support as of MySQL 5.6.1 How about creating a native function that can return the list of supported engines? Or is that something the client libs don't support without a literal query, making this way just as good as any? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/connect.inc branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc branches/PHP_5_4/ext/mysqli/tests/connect.inc branches/PHP_5_4/ex
On 09/02/2011 01:27 PM, Hannes Magnusson wrote: On Fri, Sep 2, 2011 at 13:06, Ulf Wendelu...@php.net wrote: uw                    Fri, 02 Sep 2011 11:06:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316034 Log: Hopefully, this is an even better way to check for InnoDB support as of MySQL 5.6.1 How about creating a native function that can return the list of supported engines? Or is that something the client libs don't support without a literal query, making this way just as good as any? -Hannes will be nothing different than asking the server with SHOW ENGINES, thus will be extending the API too much, or? Andrey -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/connect.inc branches/PHP_5_3/ext/pdo_mysql/tests/mysql_pdo_test.inc branches/PHP_5_4/ext/mysqli/tests/connect.inc branches/PHP_5_4/ex
Am 02.09.2011 13:27, schrieb Hannes Magnusson: On Fri, Sep 2, 2011 at 13:06, Ulf Wendelu...@php.net wrote: uw Fri, 02 Sep 2011 11:06:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316034 Log: Hopefully, this is an even better way to check for InnoDB support as of MySQL 5.6.1 How about creating a native function that can return the list of supported engines? Or is that something the client libs don't support without a literal query, making this way just as good as any? Then you end up with stuff like mysql_list_dbs() or mysql_list_tables() (http://dev.mysql.com/doc/refman/5.5/en/mysql-list-dbs.html) which does not do anything that can't be done easily in user space. I'm not a big fan of such calls in the C API. They bloat up the API. Is it worth it, if such BC breaks happen only every couple of years or would PHP as such be much better off if, for example, PDO hat proper metadata support, including user space calls specific to a particular DB? Ulf -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/libxml/libxml.c trunk/ext/libxml/libxml.c
I finally got a chance to look at the code. Any reason you didn't just manage everything in a per request state similar to the other global function usage? You might even be able to get away with only initializing it on the first call to setting the loader and you already are performing actions in the RSHUTDOWN so no real additional overhead taking that approach. Rob On 9/2/11 1:14 AM, Gustavo André dos Santos Lopes wrote: cataphract Fri, 02 Sep 2011 05:14:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316019 Log: - Use our external entity loader only in the context of a PHP request. Changed paths: U php/php-src/branches/PHP_5_4/ext/libxml/libxml.c U php/php-src/trunk/ext/libxml/libxml.c Modified: php/php-src/branches/PHP_5_4/ext/libxml/libxml.c === --- php/php-src/branches/PHP_5_4/ext/libxml/libxml.c2011-09-02 04:55:59 UTC (rev 316018) +++ php/php-src/branches/PHP_5_4/ext/libxml/libxml.c2011-09-02 05:14:32 UTC (rev 316019) @@ -674,6 +674,18 @@ return ret; } +static xmlParserInputPtr _php_libxml_pre_ext_ent_loader(const char *URL, + const char *ID, xmlParserCtxtPtr context) +{ + /* Check whether we're running in a PHP context, since the entity loader +* we've defined is an application level (true global) setting */ + if (xmlGenericError == php_libxml_error_handler) { + return _php_libxml_external_entity_loader(URL, ID, context); + } else { + return _php_libxml_default_entity_loader(URL, ID, context); + } +} + PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...) { va_list args; @@ -713,7 +725,7 @@ xmlInitParser(); _php_libxml_default_entity_loader = xmlGetExternalEntityLoader(); - xmlSetExternalEntityLoader(_php_libxml_external_entity_loader); + xmlSetExternalEntityLoader(_php_libxml_pre_ext_ent_loader); zend_hash_init(php_libxml_exports, 0, NULL, NULL, 1); @@ -729,6 +741,8 @@ #endif xmlCleanupParser(); zend_hash_destroy(php_libxml_exports); + + xmlSetExternalEntityLoader(_php_libxml_default_entity_loader); _php_libxml_initialized = 0; } } Modified: php/php-src/trunk/ext/libxml/libxml.c === --- php/php-src/trunk/ext/libxml/libxml.c 2011-09-02 04:55:59 UTC (rev 316018) +++ php/php-src/trunk/ext/libxml/libxml.c 2011-09-02 05:14:32 UTC (rev 316019) @@ -674,6 +674,18 @@ return ret; } +static xmlParserInputPtr _php_libxml_pre_ext_ent_loader(const char *URL, + const char *ID, xmlParserCtxtPtr context) +{ + /* Check whether we're running in a PHP context, since the entity loader +* we've defined is an application level (true global) setting */ + if (xmlGenericError == php_libxml_error_handler) { + return _php_libxml_external_entity_loader(URL, ID, context); + } else { + return _php_libxml_default_entity_loader(URL, ID, context); + } +} + PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...) { va_list args; @@ -713,7 +725,7 @@ xmlInitParser(); _php_libxml_default_entity_loader = xmlGetExternalEntityLoader(); - xmlSetExternalEntityLoader(_php_libxml_external_entity_loader); + xmlSetExternalEntityLoader(_php_libxml_pre_ext_ent_loader); zend_hash_init(php_libxml_exports, 0, NULL, NULL, 1); @@ -729,6 +741,8 @@ #endif xmlCleanupParser(); zend_hash_destroy(php_libxml_exports); + + xmlSetExternalEntityLoader(_php_libxml_default_entity_loader); _php_libxml_initialized = 0; } }
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/config9.m4 branches/PHP_5_4/ext/mysqlnd/config9.m4 trunk/ext/mysqlnd/config9.m4
andrey Fri, 02 Sep 2011 12:59:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316036 Log: fix message Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 U php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4 U php/php-src/trunk/ext/mysqlnd/config9.m4 Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2011-09-02 11:22:41 UTC (rev 316035) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2011-09-02 12:59:32 UTC (rev 316036) @@ -3,7 +3,7 @@ dnl config.m4 for mysqlnd driver -PHP_ARG_ENABLE(mysqlnd_compression_support, whether to enable compressed protocol support in mysqlnd, +PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, [ --disable-mysqlnd-compression-support Disable support for the MySQL compressed protocol in mysqlnd], yes, no) Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4 === --- php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4 2011-09-02 11:22:41 UTC (rev 316035) +++ php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4 2011-09-02 12:59:32 UTC (rev 316036) @@ -3,7 +3,7 @@ dnl config.m4 for mysqlnd driver -PHP_ARG_ENABLE(mysqlnd_compression_support, whether to enable compressed protocol support in mysqlnd, +PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, [ --disable-mysqlnd-compression-support Disable support for the MySQL compressed protocol in mysqlnd], yes, no) Modified: php/php-src/trunk/ext/mysqlnd/config9.m4 === --- php/php-src/trunk/ext/mysqlnd/config9.m42011-09-02 11:22:41 UTC (rev 316035) +++ php/php-src/trunk/ext/mysqlnd/config9.m42011-09-02 12:59:32 UTC (rev 316036) @@ -3,7 +3,7 @@ dnl config.m4 for mysqlnd driver -PHP_ARG_ENABLE(mysqlnd_compression_support, whether to enable compressed protocol support in mysqlnd, +PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, [ --disable-mysqlnd-compression-support Disable support for the MySQL compressed protocol in mysqlnd], yes, no) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
andrey Fri, 02 Sep 2011 13:24:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316037 Log: here comes the news Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-02 12:59:32 UTC (rev 316036) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-02 13:24:05 UTC (rev 316037) @@ -15,6 +15,10 @@ - MySQL: . Fixed bug #0 (mysql.trace_mode miscounts result sets). (Johannes) +- mysqlnd + . Fixed bug #55067 (MySQL doesn't support compression - wrong config option). +(Andrey) + - Phar: . Fixed bug#52013 (Unable to decompress files in a compressed phar). (Hannes) . Fixed bug#53872 (internal corruption of phar). (Hannes) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/mysql_num_rows.phpt branches/PHP_5_4/ext/mysql/tests/mysql_num_rows.phpt trunk/ext/mysql/tests/mysql_num_rows.phpt
uw Fri, 02 Sep 2011 13:35:17 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316038 Log: Coverage for bug#54704, of which I think it is bogus, thus no dedicated test. Bug: https://bugs.php.net/54704 (Feedback) mysql_num_rows() does work with mysql_unbuffered_query() Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_num_rows.phpt U php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_num_rows.phpt U php/php-src/trunk/ext/mysql/tests/mysql_num_rows.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_num_rows.phpt === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_num_rows.phpt 2011-09-02 13:24:05 UTC (rev 316037) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_num_rows.phpt 2011-09-02 13:35:17 UTC (rev 316038) @@ -54,6 +54,23 @@ printf([030] [%d] %s\n, mysql_errno($link), mysql_error($link)); } +if ($res = mysql_unbuffered_query('SELECT id, label FROM test')) { + + if (0 != mysql_num_rows($res)) + printf([032] Expecting 0 rows got %d\n, mysql_num_rows($res)); + + $rows = 0; + while ($row = mysql_fetch_assoc($res)) + $rows++; + + if ($rows != mysql_num_rows($res)) + printf([033] Expecting %d rows got %d\n, $rows, mysql_num_rows($res)); + + mysql_free_result($res); +} else { + printf([034] [%d] %s\n, mysql_errno($link), mysql_error($link)); +} + mysql_close($link); print done!; ? Modified: php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_num_rows.phpt === --- php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_num_rows.phpt 2011-09-02 13:24:05 UTC (rev 316037) +++ php/php-src/branches/PHP_5_4/ext/mysql/tests/mysql_num_rows.phpt 2011-09-02 13:35:17 UTC (rev 316038) @@ -54,6 +54,23 @@ printf([030] [%d] %s\n, mysql_errno($link), mysql_error($link)); } +if ($res = mysql_unbuffered_query('SELECT id, label FROM test')) { + + if (0 != mysql_num_rows($res)) + printf([032] Expecting 0 rows got %d\n, mysql_num_rows($res)); + + $rows = 0; + while ($row = mysql_fetch_assoc($res)) + $rows++; + + if ($rows != mysql_num_rows($res)) + printf([033] Expecting %d rows got %d\n, $rows, mysql_num_rows($res)); + + mysql_free_result($res); +} else { + printf([034] [%d] %s\n, mysql_errno($link), mysql_error($link)); +} + mysql_close($link); print done!; ? Modified: php/php-src/trunk/ext/mysql/tests/mysql_num_rows.phpt === --- php/php-src/trunk/ext/mysql/tests/mysql_num_rows.phpt 2011-09-02 13:24:05 UTC (rev 316037) +++ php/php-src/trunk/ext/mysql/tests/mysql_num_rows.phpt 2011-09-02 13:35:17 UTC (rev 316038) @@ -54,6 +54,23 @@ printf([030] [%d] %s\n, mysql_errno($link), mysql_error($link)); } +if ($res = mysql_unbuffered_query('SELECT id, label FROM test')) { + + if (0 != mysql_num_rows($res)) + printf([032] Expecting 0 rows got %d\n, mysql_num_rows($res)); + + $rows = 0; + while ($row = mysql_fetch_assoc($res)) + $rows++; + + if ($rows != mysql_num_rows($res)) + printf([033] Expecting %d rows got %d\n, $rows, mysql_num_rows($res)); + + mysql_free_result($res); +} else { + printf([034] [%d] %s\n, mysql_errno($link), mysql_error($link)); +} + mysql_close($link); print done!; ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c branches/PHP_5_4/ext/pdo_mysql/mysql_driver.c trunk/ext/pdo_mysql/mysql_driver.c
andrey Fri, 02 Sep 2011 13:53:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316039 Log: Fix for Bug #54158 MYSQLND + PDO MySQL requires #define MYSQL_OPT_LOCAL_INFILE and a bunch of other small preprocessor fixes Bug: https://bugs.php.net/54158 (Analyzed) MYSQLND + PDO MySQL requires #define MYSQL_OPT_LOCAL_INFILE Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c U php/php-src/branches/PHP_5_4/ext/pdo_mysql/mysql_driver.c U php/php-src/trunk/ext/pdo_mysql/mysql_driver.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-02 13:35:17 UTC (rev 316038) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-02 13:53:41 UTC (rev 316039) @@ -19,6 +19,10 @@ . Fixed bug #55067 (MySQL doesn't support compression - wrong config option). (Andrey) +- PDO MySQL driver: + . Fixed bug #54158 (MYSQLND+PDO MySQL requires #define MYSQL_OPT_LOCAL_INFILE) + (Andrey) + - Phar: . Fixed bug#52013 (Unable to decompress files in a compressed phar). (Hannes) . Fixed bug#53872 (internal corruption of phar). (Hannes) Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2011-09-02 13:35:17 UTC (rev 316038) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2011-09-02 13:53:41 UTC (rev 316039) @@ -42,7 +42,7 @@ # define pdo_mysql_init(persistent) mysql_init(NULL) #endif -#if !HAVE_MYSQL_SQLSTATE !PDO_USE_MYSQLND +#if !defined(HAVE_MYSQL_SQLSTATE) !defined(PDO_USE_MYSQLND) static const char *pdo_mysql_get_sqlstate(unsigned int my_errno) { /* {{{ */ switch (my_errno) { /* import auto-generated case: code */ @@ -72,7 +72,7 @@ einfo = H-einfo; } -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) if (S S-stmt) { einfo-errcode = mysql_stmt_errno(S-stmt); } @@ -112,8 +112,8 @@ PDO_DBG_RETURN(0); } -#if HAVE_MYSQL_SQLSTATE || PDO_USE_MYSQLND -# if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_SQLSTATE) || defined(PDO_USE_MYSQLND) +# if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) if (S S-stmt) { strcpy(*pdo_err, mysql_stmt_sqlstate(S-stmt)); } else @@ -187,7 +187,7 @@ { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh-driver_data; pdo_mysql_stmt *S = ecalloc(1, sizeof(pdo_mysql_stmt)); -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) char *nsql = NULL; int nsql_len = 0; int ret; @@ -206,7 +206,7 @@ goto end; } -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) server_version = mysql_get_server_version(H-server); if (server_version 40100) { goto fallback; @@ -255,7 +255,7 @@ if (S-num_params) { S-params_given = 0; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND S-params = NULL; #else S-params = ecalloc(S-num_params, sizeof(MYSQL_BIND)); @@ -296,7 +296,7 @@ PDO_DBG_RETURN(H-einfo.errcode ? -1 : 0); } else { -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_NEXT_RESULT) || defined(PDO_USE_MYSQLND) /* MULTI_QUERY support - eat up all unfetched result sets */ MYSQL_RES* result; while (mysql_more_results(H-server)) { @@ -461,7 +461,7 @@ break; case PDO_ATTR_SERVER_INFO: { char *tmp; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND unsigned int tmp_len; if (mysqlnd_stat(H-server, tmp, tmp_len) == PASS) { @@ -583,7 +583,7 @@ #endif ; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND int dbname_len = 0; int password_len = 0; #endif @@ -625,7 +625,7 @@ char *default_file = NULL, *default_group = NULL; long compress = 0; #endif -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSLQND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSLQND) char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL; #endif H-buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1 TSRMLS_CC); @@ -660,7 +660,7 @@ { local_infile = 0; } -#ifdef MYSQL_OPT_LOCAL_INFILE +#if defined(MYSQL_OPT_LOCAL_INFILE) || defined(PDO_USE_MYSQLND) if (mysql_options(H-server, MYSQL_OPT_LOCAL_INFILE, (const char *)local_infile)) { pdo_mysql_error(dbh); goto cleanup; @@ -668,7 +668,9 @@ #endif #ifdef MYSQL_OPT_RECONNECT /* since 5.0.3, the default for this option is 0 if not specified. - * we want the old behaviour */ + * we want the old behaviour + * mysqlnd doesn't support reconnect, thus we don't have || defined(PDO_USE_MYSQLND) + */ { long reconnect = 1; mysql_options(H-server, MYSQL_OPT_RECONNECT,
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/zip/tests/bug38943.inc branches/PHP_5_3/ext/zip/tests/bug38943.phpt branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt branches/PHP_5_4/ext/zip/tests/bug3
sheinFri, 02 Sep 2011 17:41:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316041 Log: Removed old ( 5.3) version of test and cleaned up the actual version. Changed paths: D php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc D php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt A + php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt (from php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt:r316040) D php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt D php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.inc D php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.phpt A + php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.phpt (from php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943_2.phpt:r316040) D php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943_2.phpt D php/php-src/trunk/ext/zip/tests/bug38943.inc D php/php-src/trunk/ext/zip/tests/bug38943.phpt A + php/php-src/trunk/ext/zip/tests/bug38943.phpt (from php/php-src/trunk/ext/zip/tests/bug38943_2.phpt:r316040) D php/php-src/trunk/ext/zip/tests/bug38943_2.phpt Deleted: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc === --- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc 2011-09-02 14:40:39 UTC (rev 316040) +++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc 2011-09-02 17:41:39 UTC (rev 316041) @@ -1,16 +0,0 @@ -?php -class myZip extends ZipArchive { - private $test = 0; - public $testp = 1; - private $testarray = array(); - - public function __construct() { - $this-testarray[] = 1; - var_dump($this-testarray); - } -} - -$z = new myZip; -$z-testp = foobar; -var_dump($z); - Deleted: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt === --- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt 2011-09-02 14:40:39 UTC (rev 316040) +++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt 2011-09-02 17:41:39 UTC (rev 316041) @@ -1,38 +0,0 @@ ---TEST-- -#38943, properties in extended class cannot be set ( 5.3) ---SKIPIF-- -?php -/* $Id$ */ -if(!extension_loaded('zip')) die('skip'); -if (!defined('PHP_VERSION_MAJOR')) die('skip'); -? ---FILE-- -?php -include dirname(__FILE__) . '/bug38943.inc'; -? ---EXPECTF-- -array(1) { - [0]= - int(1) -} -object(myZip)#1 (%d) { - [test:private]= - int(0) - [testp]= - string(6) foobar - [testarray:private]= - array(1) { -[0]= -int(1) - } - [status]= - int(0) - [statusSys]= - int(0) - [numFiles]= - int(0) - [filename]= - string(0) - [comment]= - string(0) -} Copied: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt (from rev 316040, php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt) === --- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt 2011-09-02 17:41:39 UTC (rev 316041) @@ -0,0 +1,50 @@ +--TEST-- +#38943, properties in extended class cannot be set (5.3+) +--SKIPIF-- +?php +if(!extension_loaded('zip')) die('skip'); +? +--FILE-- +?php +class myZip extends ZipArchive { + private $test = 0; + public $testp = 1; + private $testarray = array(); + + public function __construct() { + $this-testarray[] = 1; + var_dump($this-testarray); + } +} + +$z = new myZip; +$z-testp = foobar; +var_dump($z); + +? +--EXPECTF-- +array(1) { + [0]= + int(1) +} +object(myZip)#1 (%d) { + [test:myZip:private]= + int(0) + [testp]= + string(6) foobar + [testarray:myZip:private]= + array(1) { +[0]= +int(1) + } + [status]= + int(0) + [statusSys]= + int(0) + [numFiles]= + int(0) + [filename]= + string(0) + [comment]= + string(0) +} Deleted: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt === --- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt 2011-09-02 14:40:39 UTC (rev 316040) +++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt 2011-09-02 17:41:39 UTC (rev 316041) @@ -1,38 +0,0 @@ ---TEST-- -#38943, properties in extended class cannot be set (5.3) ---SKIPIF-- -?php -/* $Id$ */ -if(!extension_loaded('zip')) die('skip'); -if (version_compare(PHP_VERSION, 5.3, )) die('skip test for5.3+ only'); -? ---FILE-- -?php -include 'bug38943.inc'; -? ---EXPECTF-- -array(1) { - [0]= - int(1) -} -object(myZip)#1 (%d) { - [test:myZip:private]= - int(0) - [testp]= - string(6) foobar - [testarray:myZip:private]= - array(1) { -[0]= -int(1) - } - [status]= - int(0) - [statusSys]= - int(0) - [numFiles]= - int(0) - [filename]= - string(0) - [comment]= - string(0) -} Deleted: php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.inc
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt trunk/
sheinFri, 02 Sep 2011 18:01:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316043 Log: Synchronized fixed tests from 5.3 branch. Changed paths: U php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt U php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt U php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt U php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt Modified: php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt === --- php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt 2011-09-02 17:56:07 UTC (rev 316042) +++ php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt 2011-09-02 18:01:20 UTC (rev 316043) @@ -21,10 +21,17 @@ $proc-importStylesheet($phpfuncxsl); var_dump($proc-registerPHPFunctions()); var_dump($proc-transformToXml($dom)); +? --EXPECTF-- NULL Warning: XSLTProcessor::transformToXml(): Handler name must be a string in %s on line %d + +Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation failed in %s on line %d + +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element value-of in %s on line %d + +Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d NULL --CREDITS-- Christian Weiske, cwei...@php.net Modified: php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt === --- php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt 2011-09-02 17:56:07 UTC (rev 316042) +++ php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt 2011-09-02 18:01:20 UTC (rev 316043) @@ -20,10 +20,17 @@ $proc-importStylesheet($phpfuncxsl); var_dump($proc-registerPHPFunctions()); var_dump($proc-transformToXml($dom)); +? --EXPECTF-- NULL Warning: XSLTProcessor::transformToXml(): Unable to call handler undefinedfunc() in %s on line %d + +Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation failed in %s on line %d + +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element value-of in %s on line %d + +Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d NULL --CREDITS-- Christian Weiske, cwei...@php.net Modified: php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt === --- php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt 2011-09-02 17:56:07 UTC (rev 316042) +++ php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt 2011-09-02 18:01:20 UTC (rev 316043) @@ -21,10 +21,17 @@ $proc-importStylesheet($phpfuncxsl); var_dump($proc-registerPHPFunctions()); var_dump($proc-transformToXml($dom)); +? --EXPECTF-- NULL Warning: XSLTProcessor::transformToXml(): Handler name must be a string in %s on line %d + +Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation failed in %s on line %d + +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element value-of in %s on line %d + +Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d NULL --CREDITS-- Christian Weiske, cwei...@php.net Modified: php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt === --- php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt 2011-09-02 17:56:07 UTC (rev 316042) +++ php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt 2011-09-02 18:01:20 UTC (rev 316043) @@ -20,10 +20,17 @@ $proc-importStylesheet($phpfuncxsl); var_dump($proc-registerPHPFunctions()); var_dump($proc-transformToXml($dom)); +? --EXPECTF-- NULL Warning: XSLTProcessor::transformToXml(): Unable to call handler undefinedfunc() in %s on line %d + +Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation failed in %s on line %d + +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element value-of in %s on line %d + +Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d NULL --CREDITS-- Christian Weiske, cwei...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/libxml/libxml.c trunk/ext/libxml/libxml.c
On Fri, 02 Sep 2011 12:42:26 +0100, Rob Richards rricha...@cdatazone.org wrote: I finally got a chance to look at the code. Any reason you didn't just manage everything in a per request state similar to the other global function usage? You might even be able to get away with only initializing it on the first call to setting the loader and you already are performing actions in the RSHUTDOWN so no real additional overhead taking that approach. Because this setting is different from the others. It's a global setting, while the others are per-thread: http://www.google.com/codesearch#y1w3ejFL0VQ/xmlIO.cq=xmlCurrentExternalEntityLoadertype=csl=3838 http://www.google.com/codesearch#y1w3ejFL0VQ/include/libxml/globals.hq=define%5C%20xmlGenericErrortype=csl=335 If I took the per-request approach, a request ending while other were active could deactivate the loader for those active. Additionally, setting this global option means threads with no PHP context will be affected too, so the preloader implementation has to determine whether it has a valid context. -- Gustavo Lopes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt trunk/ext/standard/tests/streams/bug46024.phpt
tyrael Fri, 02 Sep 2011 20:28:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316056 Log: pass an absolute path for the php binary to proc_open, without this the test would fail if ran with a relative TEST_DEV_EXECUTABLE Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt U php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt U php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:02:12 UTC (rev 316055) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:28:39 UTC (rev 316056) @@ -4,7 +4,7 @@ ?php if (!getenv('TEST_PHP_EXECUTABLE')) die(skip TEST_PHP_EXECUTABLE not defined); ? --FILE-- ?php -$php = getenv('TEST_PHP_EXECUTABLE'); +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); $pipes = array(); $proc = proc_open( $php -n -i Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:02:12 UTC (rev 316055) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:28:39 UTC (rev 316056) @@ -4,7 +4,7 @@ ?php if (!getenv('TEST_PHP_EXECUTABLE')) die(skip TEST_PHP_EXECUTABLE not defined); ? --FILE-- ?php -$php = getenv('TEST_PHP_EXECUTABLE'); +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); $pipes = array(); $proc = proc_open( $php -n -i Modified: php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt === --- php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:02:12 UTC (rev 316055) +++ php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:28:39 UTC (rev 316056) @@ -4,7 +4,7 @@ ?php if (!getenv('TEST_PHP_EXECUTABLE')) die(skip TEST_PHP_EXECUTABLE not defined); ? --FILE-- ?php -$php = getenv('TEST_PHP_EXECUTABLE'); +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); $pipes = array(); $proc = proc_open( $php -n -i -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo/tests/bug_34630.phpt branches/PHP_5_3/ext/pdo/tests/bug_43130.phpt branches/PHP_5_3/ext/pdo/tests/bug_44861.phpt branches/PHP_5_3/ext/pdo/tests/pd
sixd Fri, 02 Sep 2011 22:19:03 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316060 Log: gcov test fixes Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_34630.phpt U php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_43130.phpt U php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_44861.phpt U php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016.phpt U php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016a.phpt U php/php-src/branches/PHP_5_3/ext/pdo_oci/tests/bug46274.phpt U php/php-src/branches/PHP_5_3/ext/pdo_oci/tests/bug46274_2.phpt U php/php-src/branches/PHP_5_4/ext/pdo/tests/bug_34630.phpt U php/php-src/branches/PHP_5_4/ext/pdo/tests/bug_43130.phpt U php/php-src/branches/PHP_5_4/ext/pdo/tests/bug_44861.phpt U php/php-src/branches/PHP_5_4/ext/pdo/tests/pdo_016.phpt U php/php-src/branches/PHP_5_4/ext/pdo/tests/pdo_016a.phpt U php/php-src/branches/PHP_5_4/ext/pdo_oci/tests/bug46274.phpt U php/php-src/branches/PHP_5_4/ext/pdo_oci/tests/bug46274_2.phpt U php/php-src/trunk/ext/pdo/tests/bug_34630.phpt U php/php-src/trunk/ext/pdo/tests/bug_43130.phpt U php/php-src/trunk/ext/pdo/tests/bug_44861.phpt U php/php-src/trunk/ext/pdo/tests/pdo_016.phpt U php/php-src/trunk/ext/pdo/tests/pdo_016a.phpt U php/php-src/trunk/ext/pdo_oci/tests/bug46274.phpt U php/php-src/trunk/ext/pdo_oci/tests/bug46274_2.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_34630.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_34630.phpt 2011-09-02 20:46:05 UTC (rev 316059) +++ php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_34630.phpt 2011-09-02 22:19:03 UTC (rev 316060) @@ -45,8 +45,6 @@ var_dump($db-query(SELECT * from test)-fetchAll(PDO::FETCH_ASSOC)); ? ---XFAIL-- -This bug might be still open on aix5.2-ppc64 and hpux11.23-ia64 --EXPECT-- array(1) { [0]= Modified: php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_43130.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_43130.phpt 2011-09-02 20:46:05 UTC (rev 316059) +++ php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_43130.phpt 2011-09-02 22:19:03 UTC (rev 316060) @@ -7,6 +7,7 @@ if (false == $dir) die('skip no driver'); if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite', strlen('sqlite'))) die('skip not relevant for sqlite driver'); if (!strncasecmp(getenv('PDOTEST_DSN'), 'pgsql', strlen('pgsql'))) die('skip not relevant for pgsql driver'); +if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - Hyphen is not legal for bind names in Oracle DB'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); ? Modified: php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_44861.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_44861.phpt 2011-09-02 20:46:05 UTC (rev 316059) +++ php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_44861.phpt 2011-09-02 22:19:03 UTC (rev 316060) @@ -28,11 +28,13 @@ if ($db-getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') { $from = 'FROM DUAL'; + $ob = '1'; } else { $from = ''; + $ob = 'r'; } -$query = SELECT 'row1' AS r $from UNION SELECT 'row2' $from UNION SELECT 'row3' $from UNION SELECT 'row4' $from ORDER BY r; +$query = SELECT 'row1' AS r $from UNION SELECT 'row2' $from UNION SELECT 'row3' $from UNION SELECT 'row4' $from ORDER BY $ob; $aParams = array(PDO::ATTR_CURSOR = PDO::CURSOR_SCROLL); $res = $db-prepare($query, $aParams); Modified: php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016.phpt 2011-09-02 20:46:05 UTC (rev 316059) +++ php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016.phpt 2011-09-02 22:19:03 UTC (rev 316060) @@ -5,6 +5,7 @@ if (!extension_loaded('pdo')) die('skip'); $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); +if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors without reparse'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); ? Modified: php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016a.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016a.phpt 2011-09-02 20:46:05 UTC (rev 316059) +++ php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_016a.phpt 2011-09-02 22:19:03 UTC (rev 316060) @@ -6,6 +6,7 @@ $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; +if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt trunk/ext/standard/tests/streams/bug46024.phpt
Hi Afair realpath() is not always available, so maybe a function_exist() check here? Sendt fra min iPhone Den 02/09/2011 kl. 22.28 skrev Ferenc Kovacs tyr...@php.net: tyrael Fri, 02 Sep 2011 20:28:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316056 Log: pass an absolute path for the php binary to proc_open, without this the test would fail if ran with a relative TEST_DEV_EXECUTABLE Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt U php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt U php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:02:12 UTC (rev 316055) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:28:39 UTC (rev 316056) @@ -4,7 +4,7 @@ ?php if (!getenv('TEST_PHP_EXECUTABLE')) die(skip TEST_PHP_EXECUTABLE not defined); ? --FILE-- ?php -$php = getenv('TEST_PHP_EXECUTABLE'); +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); $pipes = array(); $proc = proc_open( $php -n -i Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:02:12 UTC (rev 316055) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug46024.phpt 2011-09-02 20:28:39 UTC (rev 316056) @@ -4,7 +4,7 @@ ?php if (!getenv('TEST_PHP_EXECUTABLE')) die(skip TEST_PHP_EXECUTABLE not defined); ? --FILE-- ?php -$php = getenv('TEST_PHP_EXECUTABLE'); +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); $pipes = array(); $proc = proc_open( $php -n -i Modified: php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt === --- php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt2011-09-02 20:02:12 UTC (rev 316055) +++ php/php-src/trunk/ext/standard/tests/streams/bug46024.phpt2011-09-02 20:28:39 UTC (rev 316056) @@ -4,7 +4,7 @@ ?php if (!getenv('TEST_PHP_EXECUTABLE')) die(skip TEST_PHP_EXECUTABLE not defined); ? --FILE-- ?php -$php = getenv('TEST_PHP_EXECUTABLE'); +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); $pipes = array(); $proc = proc_open( $php -n -i -- 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