[PHP-CVS] cvs: php-src / configure.in /ext/standard dns.c
markonenFri Oct 24 13:09:37 2003 EDT Modified files: /php-srcconfigure.in /php-src/ext/standard dns.c Log: Workaround for bug #25955 Generalized a Darwin check in dns.c to a check for inet_pton() (kalowsky) Index: php-src/configure.in diff -u php-src/configure.in:1.473 php-src/configure.in:1.474 --- php-src/configure.in:1.473 Wed Oct 22 17:43:39 2003 +++ php-src/configure.inFri Oct 24 13:09:35 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.473 2003/10/22 21:43:39 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.474 2003/10/24 17:09:35 markonen Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -189,6 +189,7 @@ CPPFLAGS=$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR;; *darwin*|*rhapsody*) CPPFLAGS=$CPPFLAGS -no-cpp-precomp +AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther]) php_multiple_shlib_versions_ok=yes;; *beos*) beos_threads=1 @@ -480,6 +481,7 @@ gmtime_r \ inet_ntoa \ inet_ntop \ +inet_pton \ isascii \ link \ localtime_r \ Index: php-src/ext/standard/dns.c diff -u php-src/ext/standard/dns.c:1.63 php-src/ext/standard/dns.c:1.64 --- php-src/ext/standard/dns.c:1.63 Fri Sep 26 04:09:55 2003 +++ php-src/ext/standard/dns.c Fri Oct 24 13:09:36 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: dns.c,v 1.63 2003/09/26 08:09:55 hholzgra Exp $ */ +/* $Id: dns.c,v 1.64 2003/10/24 17:09:36 markonen Exp $ */ /* {{{ includes */ #include php.h @@ -90,9 +90,7 @@ addr = php_gethostbyaddr(Z_STRVAL_PP(arg)); if(addr == NULL) { -#if HAVE_IPV6 !defined(__MacOSX__) -/* MacOSX at this time has support for IPv6, but not inet_pton() - * so disabling IPv6 until further notice. MacOSX 10.1.2 (kalowsky) */ +#if HAVE_IPV6 HAVE_INET_PTON php_error_docref(NULL TSRMLS_CC, E_WARNING, Address is not a valid IPv4 or IPv6 address); #else php_error_docref(NULL TSRMLS_CC, E_WARNING, Address is not in a.b.c.d form); @@ -107,17 +105,13 @@ /* {{{ php_gethostbyaddr */ static char *php_gethostbyaddr(char *ip) { -#if HAVE_IPV6 !defined(__MacOSX__) -/* MacOSX at this time has support for IPv6, but not inet_pton() - * so disabling IPv6 until further notice. MacOSX 10.1.2 (kalowsky) */ +#if HAVE_IPV6 HAVE_INET_PTON struct in6_addr addr6; #endif struct in_addr addr; struct hostent *hp; -#if HAVE_IPV6 !defined(__MacOSX__) -/* MacOSX at this time has support for IPv6, but not inet_pton() - * so disabling IPv6 until further notice. MacOSX 10.1.2 (kalowsky) */ +#if HAVE_IPV6 HAVE_INET_PTON if (inet_pton(AF_INET6, ip, addr6)) { hp = gethostbyaddr((char *) addr6, sizeof(addr6), AF_INET6); } else if (inet_pton(AF_INET, ip, addr)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS configure.in
iliaa Fri Oct 24 13:51:06 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS configure.in Log: MFH: Fixed bug #25955 (Compile failure on MacOSX 10.3 (Panther)). Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.444 php-src/NEWS:1.1247.2.445 --- php-src/NEWS:1.1247.2.444 Wed Oct 22 19:48:47 2003 +++ php-src/NEWSFri Oct 24 13:51:03 2003 @@ -1,7 +1,9 @@ PHP 4 NEWS ||| ?? Oct 2003, Version 4.3.4RC3 -- Fixed bug #25922 (Crash in error handler when 5th argument is modified). Ilia +- Fixed bug #25922 (Crash in error handler when 5th argument is modified). + (Ilia) +- Fixed bug #25955 (Compile failure on MacOSX 10.3 (Panther)). (Marko, Dan) 20 Oct 2003, Version 4.3.4RC2 - Fixed multibyte regex engine to properly handle .* pattern under Index: php-src/configure.in diff -u php-src/configure.in:1.396.2.82 php-src/configure.in:1.396.2.83 --- php-src/configure.in:1.396.2.82 Mon Oct 20 12:58:55 2003 +++ php-src/configure.inFri Oct 24 13:51:03 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.82 2003/10/20 16:58:55 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.83 2003/10/24 17:51:03 iliaa Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -189,6 +189,7 @@ CPPFLAGS=$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR;; *darwin*|*rhapsody*) CPPFLAGS=$CPPFLAGS -no-cpp-precomp +AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther]) php_multiple_shlib_versions_ok=yes;; *beos*) beos_threads=1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sockets sockets.c ZendEngine2 ZEND_CHANGES zend_API.c zend_execute_API.c
helly Fri Oct 24 14:24:29 2003 EDT Modified files: /ZendEngine2ZEND_CHANGES zend_API.c zend_execute_API.c /php-src/ext/socketssockets.c Log: Zend/ZEND_CHANGES Index: ZendEngine2/ZEND_CHANGES diff -u ZendEngine2/ZEND_CHANGES:1.61 ZendEngine2/ZEND_CHANGES:1.62 --- ZendEngine2/ZEND_CHANGES:1.61 Tue Oct 21 02:41:26 2003 +++ ZendEngine2/ZEND_CHANGESFri Oct 24 14:24:27 2003 @@ -651,6 +651,79 @@ TBD: Respect visibility: Show protected only when inside class method and only otherwise public properties only. + Each class whose instances can be iterated with foreach should + implement the empty interface 'Traversable'. Hence any object + that says it implements 'Traversable' can be used with forach. + + The interfaces 'IteratorAggregate' and 'Iterator' allow to specify + how class objects are iterated in PHP code. The first of them simply + has a method 'getIterator' which must return an array or an object + that either implements the interface 'Iterator' or is instantiated + from an internal class that can be iterated. + + Example: + +?php +class ObjectIterator implements Iterator { + +private $obj; +private $num; + +function __construct($obj) { +$this-obj = $obj; +} +function rewind() { +$this-num = 0; +} +function hasMore() { +return $this-num $this-obj-max; +} +function key() { +return $this-num; +} +function current() { +switch($this-num) { +case 0: return 1st; +case 1: return 2nd; +case 2: return 3rd; +default: return $this-num.th; +} +} +function next() { +$this-num++; +} +} + +class Oject implements IteratorAggregate { + +public $max = 3; + +function getIterator() { +return new ObjectIterator($this); +} +} + +$obj = new Object; + +// this foreach ... +foreach($obj as $key = $val) { +echo $key = $val\n; +} + +// matches the following 7 lines with the for directive. +$it = $obj-getIterator(); +for($it-rewind(); $it-hasMore(); $it-next) { +$key = $it-current(); +$val = $it-key(); +echo $key = $val\n; +} +unset($it); +? + + The matching for directive is very intersting here since it shows + the use of all abstract methods declared in the interfaces Iterator + and IteratorAggregate respectively. + * __METHOD__ The pseudo constant __METHOD__ shows the current class and method Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.221 ZendEngine2/zend_API.c:1.222 --- ZendEngine2/zend_API.c:1.221Wed Oct 22 15:59:58 2003 +++ ZendEngine2/zend_API.c Fri Oct 24 14:24:27 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: zend_API.c,v 1.221 2003/10/22 19:59:58 helly Exp $ */ +/* $Id: zend_API.c,v 1.222 2003/10/24 18:24:27 helly Exp $ */ #include zend.h #include zend_execute.h @@ -1588,8 +1588,23 @@ return 1; lcname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable)); - if (zend_hash_exists(EG(function_table), lcname, Z_STRLEN_P(callable)+1)) + if (zend_hash_exists(EG(function_table), lcname, Z_STRLEN_P(callable)+1)) { retval = 1; + } else { + char *func_pos; + if ((func_pos=strstr(lcname, ::))) { + int lcclass_len = (int)(func_pos - lcname); + char *lcclass = estrndup(lcname, lcclass_len); + zend_class_entry **ce; + + if (zend_lookup_class(lcclass, lcclass_len, ce TSRMLS_CC) == SUCCESS) { + int func_len = Z_STRLEN_P(callable) - lcclass_len - 2; + func_pos += 2; + retval = zend_hash_exists((*ce)-function_table, func_pos, func_len + 1) ? 1 : 0; + } +
Re: [PHP-CVS] cvs: php-src /ext/sockets sockets.c ZendEngine2 ZEND_CHANGES zend_API.c zend_execute_API.c
Hello Marcus, Friday, October 24, 2003, 8:24:29 PM, you wrote: FUCK cvs! -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sockets sockets.c
helly Fri Oct 24 14:44:42 2003 EDT Modified files: /php-src/ext/socketssockets.c Log: Revert accidential commit Index: php-src/ext/sockets/sockets.c diff -u php-src/ext/sockets/sockets.c:1.154 php-src/ext/sockets/sockets.c:1.155 --- php-src/ext/sockets/sockets.c:1.154 Fri Oct 24 14:24:28 2003 +++ php-src/ext/sockets/sockets.c Fri Oct 24 14:44:40 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sockets.c,v 1.154 2003/10/24 18:24:28 helly Exp $ */ +/* $Id: sockets.c,v 1.155 2003/10/24 18:44:40 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -107,6 +107,17 @@ ZEND_ARG_PASS_INFO(1) ZEND_ARG_PASS_INFO(0) ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(third_through_seventh_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) ZEND_ARG_PASS_INFO(1) ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/yaz php_yaz.c php_yaz.h
dickmeiss Fri Oct 24 15:32:08 2003 EDT Modified files: /php-src/ext/yazphp_yaz.c php_yaz.h Log: For YAZ, RSHUTDOWN closes persistent connections that have been idle more than yaz.keepalive seconds. Default value for config yaz.keepalive is 120 seconds. The shutdown prevents many sockets in CLOSE_WAIT state. Index: php-src/ext/yaz/php_yaz.c diff -u php-src/ext/yaz/php_yaz.c:1.80 php-src/ext/yaz/php_yaz.c:1.81 --- php-src/ext/yaz/php_yaz.c:1.80 Sun Aug 31 08:41:53 2003 +++ php-src/ext/yaz/php_yaz.c Fri Oct 24 15:32:06 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_yaz.c,v 1.80 2003/08/31 12:41:53 zeev Exp $ */ +/* $Id: php_yaz.c,v 1.81 2003/10/24 19:32:06 dickmeiss Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -48,7 +48,7 @@ #include yaz/yaz-ccl.h #include yaz/zoom.h -#define MAX_ASSOC 100 +#define MAX_ASSOC 200 typedef struct Yaz_AssociationInfo *Yaz_Association; @@ -63,6 +63,7 @@ int in_use; int order; int zval_resource; + long time_stamp; }; static Yaz_Association yaz_association_mk() @@ -81,6 +82,7 @@ p-persistent = 0; p-ccl_parser = ccl_parser_create(); p-ccl_parser-bibset = 0; + p-time_stamp = 0; return p; } @@ -374,7 +376,7 @@ as-in_use = 1; as-persistent = persistent; as-order = YAZSG(assoc_seq); - + as-time_stamp = time(0); #ifdef ZTS tsrm_mutex_unlock (yaz_mutex); #endif @@ -1484,6 +1486,11 @@ #else STD_PHP_INI_ENTRY(yaz.max_links, 100, PHP_INI_ALL, OnUpdateInt, max_links, zend_yaz_globals, yaz_globals) #endif +#if PHP_MAJOR_VERSION = 5 + STD_PHP_INI_ENTRY(yaz.keepalive, 120, PHP_INI_ALL, OnUpdateLong, keepalive, zend_yaz_globals, yaz_globals) +#else + STD_PHP_INI_ENTRY(yaz.keepalive, 120, PHP_INI_ALL, OnUpdateInt, keepalive, zend_yaz_globals, yaz_globals) +#endif STD_PHP_INI_ENTRY(yaz.log_file, NULL, PHP_INI_ALL, OnUpdateString, log_file, zend_yaz_globals, yaz_globals) PHP_INI_END() /* }}} */ @@ -1566,6 +1573,31 @@ PHP_RSHUTDOWN_FUNCTION(yaz) { + long now = time(0); + int i; + + yaz_log(LOG_LOG, rshutdown keepalive=%ld, YAZSG(keepalive)); +#ifdef ZTS + tsrm_mutex_lock(yaz_mutex); +#endif + for (i = 0; i YAZSG(max_links); i++) { + Yaz_Association *as = shared_associations + i; + if (*as) + { + if (now - (*as)-time_stamp YAZSG(keepalive)) + { + const char *host = option_get(*as, host); + if (host) + yaz_log(LOG_LOG, shutdown of %s, host); + + yaz_association_destroy(*as); + *as = 0; + } + } + } +#ifdef ZTS + tsrm_mutex_unlock(yaz_mutex); +#endif return SUCCESS; } Index: php-src/ext/yaz/php_yaz.h diff -u php-src/ext/yaz/php_yaz.h:1.18 php-src/ext/yaz/php_yaz.h:1.19 --- php-src/ext/yaz/php_yaz.h:1.18 Tue Jun 10 16:03:40 2003 +++ php-src/ext/yaz/php_yaz.h Fri Oct 24 15:32:06 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_yaz.h,v 1.18 2003/06/10 20:03:40 imajes Exp $ */ +/* $Id: php_yaz.h,v 1.19 2003/10/24 19:32:06 dickmeiss Exp $ */ #ifndef PHP_YAZ_H #define PHP_YAZ_H @@ -58,6 +58,7 @@ ZEND_BEGIN_MODULE_GLOBALS(yaz) int assoc_seq; long max_links; + long keepalive; char *log_file; ZEND_END_MODULE_GLOBALS(yaz) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS
sniper Fri Oct 24 18:44:43 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS Log: hrm Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.445 php-src/NEWS:1.1247.2.446 --- php-src/NEWS:1.1247.2.445 Fri Oct 24 13:51:03 2003 +++ php-src/NEWSFri Oct 24 18:44:41 2003 @@ -1,9 +1,9 @@ PHP 4 NEWS ||| ?? Oct 2003, Version 4.3.4RC3 +- Fixed bug #25955 (Compile failure on MacOSX 10.3 Panther). (Marko, Dan) - Fixed bug #25922 (Crash in error handler when 5th argument is modified). (Ilia) -- Fixed bug #25955 (Compile failure on MacOSX 10.3 (Panther)). (Marko, Dan) 20 Oct 2003, Version 4.3.4RC2 - Fixed multibyte regex engine to properly handle .* pattern under -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mbstring mbstring.c mbstring.h /main rfc1867.c
Yes, I have plan to commit to 4.3 branch. Ilia, is it possible to commit ? Rui On Thu, 23 Oct 2003 10:43:16 +0900 (JST) Rasmus Lerdorf [EMAIL PROTECTED] wrote: Are you committing this to 4.3 as well? On Wed, 22 Oct 2003, Rui Hirokawa wrote: hirokawaWed Oct 22 10:14:06 2003 EDT Modified files: /php-src/main rfc1867.c /php-src/ext/mbstring mbstring.c mbstring.h Log: name/value in multipart/form-date will be converted into internal encoding when mbstring.encoding_translation is On. -- Rui Hirokawa [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /tests/lang bug25831.phpt
moriyoshi Sat Oct 25 00:43:48 2003 EDT Added files: (Branch: PHP_4_3) /php-src/tests/lang bug25831.phpt Log: Add test case for bug #25831 Index: php-src/tests/lang/bug25831.phpt +++ php-src/tests/lang/bug25831.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php