[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2007-01-15 Thread changelog
changelog   Tue Jan 16 01:31:03 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2572r2=1.2573diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2572 php-src/ChangeLog:1.2573
--- php-src/ChangeLog:1.2572Mon Jan 15 01:31:06 2007
+++ php-src/ChangeLog   Tue Jan 16 01:31:03 2007
@@ -1,3 +1,50 @@
+2007-01-15  Marcus Boerger  [EMAIL PROTECTED]
+
+* main/php_streams.h
+  main/streams/cast.c
+  main/streams/streams.c:
+  - Help streams debugging
+
+2007-01-15  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/standard/user_filters.c
+  main/streams/streams.c
+  main/streams/transports.c
+  main/streams/userspace.c:
+  add trailing '\0' to stream hashes
+
+* (PHP_5_2)
+  main/streams/filter.c:
+  revert the patch temporarily, I need to test a bigger patch in HEAD..
+
+* main/streams/filter.c:
+  include \0 to the hash
+  it does matter because we use these strings in phpinfo()
+
+* acinclude.m4:
+  tabs - ws
+
+* acinclude.m4:
+  improve icu-config check
+
+* ZendEngine2/tests/bug36214.phpt
+  ZendEngine2/tests/bug36214.phpt:
+  fix test
+
+* (PHP_5_2)
+  ZendEngine2/zend_compile.c:
+  missing comma
+
+* (PHP_5_2)
+  ZendEngine2/zend_compile.c:
+  fix error message and #40111
+
+2007-01-15  Frank M. Kromann  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/pdo_dblib/dblib_stmt.c:
+  Fix mysql - dblib
+
 2007-01-14  Marcus Boerger  [EMAIL PROTECTED]
 
 * main/streams/memory.c:


[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2007-01-15 Thread changelog
changelog   Tue Jan 16 01:31:06 2007 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1056r2=1.1057diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1056 ZendEngine2/ChangeLog:1.1057
--- ZendEngine2/ChangeLog:1.1056Fri Jan 12 01:31:05 2007
+++ ZendEngine2/ChangeLog   Tue Jan 16 01:31:06 2007
@@ -1,3 +1,17 @@
+2007-01-15  Antony Dovgal  [EMAIL PROTECTED]
+
+* tests/bug36214.phpt
+  tests/bug36214.phpt:
+  fix test
+
+* (PHP_5_2)
+  zend_compile.c:
+  missing comma
+
+* (PHP_5_2)
+  zend_compile.c:
+  fix error message and #40111
+
 2007-01-11  Marcus Boerger  [EMAIL PROTECTED]
 
 * zend_API.h
@@ -16635,7 +16649,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1056 2007/01/12 01:31:05 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1057 2007/01/16 01:31:06 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -18359,7 +18373,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1056 2007/01/12 01:31:05 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1057 2007/01/16 01:31:06 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src / acinclude.m4

2007-01-15 Thread Antony Dovgal
tony2001Mon Jan 15 14:03:55 2007 UTC

  Modified files:  
/php-srcacinclude.m4 
  Log:
  improve icu-config check
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.358r2=1.359diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.358 php-src/acinclude.m4:1.359
--- php-src/acinclude.m4:1.358  Fri Jan 12 19:13:07 2007
+++ php-src/acinclude.m4Mon Jan 15 14:03:55 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.358 2007/01/12 19:13:07 andrei Exp $
+dnl $Id: acinclude.m4,v 1.359 2007/01/15 14:03:55 tony2001 Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2121,9 +2121,9 @@
 
   dnl Trust icu-config to know better what the install prefix is..
   icu_install_prefix=`$ICU_CONFIG --prefix 2 /dev/null`
-  if test -z $icu_install_prefix; then
+  if test $? != 0 || test -z $icu_install_prefix; then
 AC_MSG_RESULT([not found])
-AC_MSG_ERROR([Please specify the correct ICU install prefix.])
+AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please 
verify ICU install prefix and make sure icu-config works.])
   else
 AC_MSG_RESULT([found in $icu_install_prefix])
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / acinclude.m4

2007-01-15 Thread Antony Dovgal
tony2001Mon Jan 15 14:07:18 2007 UTC

  Modified files:  
/php-srcacinclude.m4 
  Log:
  tabs - ws
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.359r2=1.360diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.359 php-src/acinclude.m4:1.360
--- php-src/acinclude.m4:1.359  Mon Jan 15 14:03:55 2007
+++ php-src/acinclude.m4Mon Jan 15 14:07:18 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.359 2007/01/15 14:03:55 tony2001 Exp $
+dnl $Id: acinclude.m4,v 1.360 2007/01/15 14:07:18 tony2001 Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2098,25 +2098,25 @@
   AC_ARG_WITH(icu-dir,
   [  --with-icu-dir=DIR  Specify where ICU libraries and headers can be 
found], 
   [
-   if test x$withval != xyes; then
- PHP_ICU_DIR=$withval
-   else
- PHP_ICU_DIR=DEFAULT
-   fi
+if test x$withval != xyes; then
+  PHP_ICU_DIR=$withval
+else
+  PHP_ICU_DIR=DEFAULT
+fi
   ], [
-   PHP_ICU_DIR=DEFAULT
+PHP_ICU_DIR=DEFAULT
   ])
 
   if test $PHP_ICU_DIR = DEFAULT; then
-   ICU_CONFIG=icu-config
-   for i in /usr/local/bin /usr/bin; do
- if test -x $i/icu-config; then
-   ICU_CONFIG=$i/icu-config
-   break;
- fi
-   done
+ICU_CONFIG=icu-config
+for i in /usr/local/bin /usr/bin; do
+  if test -x $i/icu-config; then
+ICU_CONFIG=$i/icu-config
+break;
+  fi
+done
   else
-   ICU_CONFIG=$PHP_ICU_DIR/bin/icu-config
+ICU_CONFIG=$PHP_ICU_DIR/bin/icu-config
   fi
 
   dnl Trust icu-config to know better what the install prefix is..
@@ -2127,23 +2127,24 @@
   else
 AC_MSG_RESULT([found in $icu_install_prefix])
 
-   dnl Check ICU version
-   AC_MSG_CHECKING([for ICU 3.4 or greater])
-   icu_version_full=`$ICU_CONFIG --version`
-   ac_IFS=$IFS
-   IFS=.
-   set $icu_version_full
-   IFS=$ac_IFS
-   icu_version=`expr [$]1 \* 1000 + [$]2`
-   AC_MSG_RESULT([found $icu_version_full])
-   if test $icu_version -lt 3004; then
- AC_MSG_ERROR([ICU version 3.4 or later is required])
-   fi
-
-   ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
-   ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
-   PHP_EVAL_INCLINE($ICU_INCS)
-   PHP_EVAL_LIBLINE($ICU_LIBS, $1)
+dnl Check ICU version
+AC_MSG_CHECKING([for ICU 3.4 or greater])
+icu_version_full=`$ICU_CONFIG --version`
+ac_IFS=$IFS
+IFS=.
+set $icu_version_full
+IFS=$ac_IFS
+icu_version=`expr [$]1 \* 1000 + [$]2`
+AC_MSG_RESULT([found $icu_version_full])
+   
+if test $icu_version -lt 3004; then
+  AC_MSG_ERROR([ICU version 3.4 or later is required])
+fi
+
+ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
+ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
+PHP_EVAL_INCLINE($ICU_INCS)
+PHP_EVAL_LIBLINE($ICU_LIBS, $1)
   fi
 ])
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /main/streams filter.c

2007-01-15 Thread Antony Dovgal
tony2001Mon Jan 15 14:59:40 2007 UTC

  Modified files:  
/php-src/main/streams   filter.c 
  Log:
  include \0 to the hash
  it does matter because we use these strings in phpinfo()
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.41r2=1.42diff_format=u
Index: php-src/main/streams/filter.c
diff -u php-src/main/streams/filter.c:1.41 php-src/main/streams/filter.c:1.42
--- php-src/main/streams/filter.c:1.41  Mon Jan  1 09:29:35 2007
+++ php-src/main/streams/filter.c   Mon Jan 15 14:59:40 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filter.c,v 1.41 2007/01/01 09:29:35 sebastian Exp $ */
+/* $Id: filter.c,v 1.42 2007/01/15 14:59:40 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -46,12 +46,12 @@
 /* API for registering GLOBAL filters */
 PHPAPI int php_stream_filter_register_factory(const char *filterpattern, 
php_stream_filter_factory *factory TSRMLS_DC)
 {
-   return zend_hash_add(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern), factory, sizeof(*factory), NULL);
+   return zend_hash_add(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern) + 1, factory, sizeof(*factory), NULL);
 }
 
 PHPAPI int php_stream_filter_unregister_factory(const char *filterpattern 
TSRMLS_DC)
 {
-   return zend_hash_del(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern));
+   return zend_hash_del(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern) + 1);
 }
 
 /* API for registering VOLATILE wrappers */
@@ -65,7 +65,7 @@
zend_hash_copy(FG(stream_filters), stream_filters_hash, NULL, 
tmpfactory, sizeof(php_stream_filter_factory));
}
 
-   return zend_hash_add(FG(stream_filters), (char*)filterpattern, 
strlen(filterpattern), factory, sizeof(*factory), NULL);
+   return zend_hash_add(FG(stream_filters), (char*)filterpattern, 
strlen(filterpattern) + 1, factory, sizeof(*factory), NULL);
 }
 
 /* Buckets */
@@ -317,7 +317,7 @@
 
n = strlen(filtername);

-   if (SUCCESS == zend_hash_find(filter_hash, (char*)filtername, n, 
(void**)factory)) {
+   if (SUCCESS == zend_hash_find(filter_hash, (char*)filtername, n + 1, 
(void**)factory)) {
filter = factory-create_filter(filtername, filterparams, 
persistent TSRMLS_CC);
} else if ((period = strrchr(filtername, '.'))) {
/* try a wildcard */
@@ -329,7 +329,7 @@
while (period  !filter) {
*period = '\0';
strcat(wildname, .*);
-   if (SUCCESS == zend_hash_find(filter_hash, wildname, 
strlen(wildname), (void**)factory)) {
+   if (SUCCESS == zend_hash_find(filter_hash, wildname, 
strlen(wildname) + 1, (void**)factory)) {
filter = factory-create_filter(filtername, 
filterparams, persistent TSRMLS_CC);
}
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /main/streams filter.c

2007-01-15 Thread Antony Dovgal
tony2001Mon Jan 15 14:59:49 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main/streams   filter.c 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.17.2.3.2.6r2=1.17.2.3.2.7diff_format=u
Index: php-src/main/streams/filter.c
diff -u php-src/main/streams/filter.c:1.17.2.3.2.6 
php-src/main/streams/filter.c:1.17.2.3.2.7
--- php-src/main/streams/filter.c:1.17.2.3.2.6  Mon Jan  1 09:36:11 2007
+++ php-src/main/streams/filter.c   Mon Jan 15 14:59:49 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filter.c,v 1.17.2.3.2.6 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: filter.c,v 1.17.2.3.2.7 2007/01/15 14:59:49 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -46,12 +46,12 @@
 /* API for registering GLOBAL filters */
 PHPAPI int php_stream_filter_register_factory(const char *filterpattern, 
php_stream_filter_factory *factory TSRMLS_DC)
 {
-   return zend_hash_add(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern), factory, sizeof(*factory), NULL);
+   return zend_hash_add(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern) + 1, factory, sizeof(*factory), NULL);
 }
 
 PHPAPI int php_stream_filter_unregister_factory(const char *filterpattern 
TSRMLS_DC)
 {
-   return zend_hash_del(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern));
+   return zend_hash_del(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern) + 1);
 }
 
 /* API for registering VOLATILE wrappers */
@@ -65,7 +65,7 @@
zend_hash_copy(FG(stream_filters), stream_filters_hash, NULL, 
tmpfactory, sizeof(php_stream_filter_factory));
}
 
-   return zend_hash_add(FG(stream_filters), (char*)filterpattern, 
strlen(filterpattern), factory, sizeof(*factory), NULL);
+   return zend_hash_add(FG(stream_filters), (char*)filterpattern, 
strlen(filterpattern) + 1, factory, sizeof(*factory), NULL);
 }
 
 /* Buckets */
@@ -259,7 +259,7 @@
 
n = strlen(filtername);

-   if (SUCCESS == zend_hash_find(filter_hash, (char*)filtername, n, 
(void**)factory)) {
+   if (SUCCESS == zend_hash_find(filter_hash, (char*)filtername, n + 1, 
(void**)factory)) {
filter = factory-create_filter(filtername, filterparams, 
persistent TSRMLS_CC);
} else if ((period = strrchr(filtername, '.'))) {
/* try a wildcard */
@@ -271,7 +271,7 @@
while (period  !filter) {
*period = '\0';
strcat(wildname, .*);
-   if (SUCCESS == zend_hash_find(filter_hash, wildname, 
strlen(wildname), (void**)factory)) {
+   if (SUCCESS == zend_hash_find(filter_hash, wildname, 
strlen(wildname) + 1, (void**)factory)) {
filter = factory-create_filter(filtername, 
filterparams, persistent TSRMLS_CC);
}
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /main/streams filter.c

2007-01-15 Thread Antony Dovgal
tony2001Mon Jan 15 16:03:43 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main/streams   filter.c 
  Log:
  revert the patch temporarily, I need to test a bigger patch in HEAD..
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.17.2.3.2.7r2=1.17.2.3.2.8diff_format=u
Index: php-src/main/streams/filter.c
diff -u php-src/main/streams/filter.c:1.17.2.3.2.7 
php-src/main/streams/filter.c:1.17.2.3.2.8
--- php-src/main/streams/filter.c:1.17.2.3.2.7  Mon Jan 15 14:59:49 2007
+++ php-src/main/streams/filter.c   Mon Jan 15 16:03:42 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filter.c,v 1.17.2.3.2.7 2007/01/15 14:59:49 tony2001 Exp $ */
+/* $Id: filter.c,v 1.17.2.3.2.8 2007/01/15 16:03:42 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -46,12 +46,12 @@
 /* API for registering GLOBAL filters */
 PHPAPI int php_stream_filter_register_factory(const char *filterpattern, 
php_stream_filter_factory *factory TSRMLS_DC)
 {
-   return zend_hash_add(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern) + 1, factory, sizeof(*factory), NULL);
+   return zend_hash_add(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern), factory, sizeof(*factory), NULL);
 }
 
 PHPAPI int php_stream_filter_unregister_factory(const char *filterpattern 
TSRMLS_DC)
 {
-   return zend_hash_del(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern) + 1);
+   return zend_hash_del(stream_filters_hash, (char*)filterpattern, 
strlen(filterpattern));
 }
 
 /* API for registering VOLATILE wrappers */
@@ -65,7 +65,7 @@
zend_hash_copy(FG(stream_filters), stream_filters_hash, NULL, 
tmpfactory, sizeof(php_stream_filter_factory));
}
 
-   return zend_hash_add(FG(stream_filters), (char*)filterpattern, 
strlen(filterpattern) + 1, factory, sizeof(*factory), NULL);
+   return zend_hash_add(FG(stream_filters), (char*)filterpattern, 
strlen(filterpattern), factory, sizeof(*factory), NULL);
 }
 
 /* Buckets */
@@ -259,7 +259,7 @@
 
n = strlen(filtername);

-   if (SUCCESS == zend_hash_find(filter_hash, (char*)filtername, n + 1, 
(void**)factory)) {
+   if (SUCCESS == zend_hash_find(filter_hash, (char*)filtername, n, 
(void**)factory)) {
filter = factory-create_filter(filtername, filterparams, 
persistent TSRMLS_CC);
} else if ((period = strrchr(filtername, '.'))) {
/* try a wildcard */
@@ -271,7 +271,7 @@
while (period  !filter) {
*period = '\0';
strcat(wildname, .*);
-   if (SUCCESS == zend_hash_find(filter_hash, wildname, 
strlen(wildname) + 1, (void**)factory)) {
+   if (SUCCESS == zend_hash_find(filter_hash, wildname, 
strlen(wildname), (void**)factory)) {
filter = factory-create_filter(filtername, 
filterparams, persistent TSRMLS_CC);
}
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard user_filters.c /main/streams streams.c transports.c userspace.c

2007-01-15 Thread Antony Dovgal
tony2001Mon Jan 15 17:06:52 2007 UTC

  Modified files:  
/php-src/ext/standard   user_filters.c 
/php-src/main/streams   streams.c transports.c userspace.c 
  Log:
  add trailing '\0' to stream hashes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.42r2=1.43diff_format=u
Index: php-src/ext/standard/user_filters.c
diff -u php-src/ext/standard/user_filters.c:1.42 
php-src/ext/standard/user_filters.c:1.43
--- php-src/ext/standard/user_filters.c:1.42Sun Jan  7 06:29:40 2007
+++ php-src/ext/standard/user_filters.c Mon Jan 15 17:06:52 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: user_filters.c,v 1.42 2007/01/07 06:29:40 pollita Exp $ */
+/* $Id: user_filters.c,v 1.43 2007/01/15 17:06:52 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -270,7 +270,7 @@
 
/* determine the classname/class entry */
if (FAILURE == zend_hash_find(BG(user_filter_map), (char*)filtername,
-   strlen(filtername), (void**)fdat)) {
+   strlen(filtername) + 1, (void**)fdat)) {
char *period;
 
/* Userspace Filters using ambiguous wildcards could cause 
problems.
@@ -287,7 +287,7 @@
while (period) {
*period = '\0';
strcat(wildcard, .*);
-   if (SUCCESS == 
zend_hash_find(BG(user_filter_map), wildcard, strlen(wildcard), (void**)fdat)) 
{
+   if (SUCCESS == 
zend_hash_find(BG(user_filter_map), wildcard, strlen(wildcard) + 1, 
(void**)fdat)) {
period = NULL;
} else {
*period = '\0';
@@ -617,7 +617,7 @@
fdat-classname = ezstrndup(classname_type, classname, classname_len);
fdat-classname_len = classname_len;
 
-   if (zend_hash_add(BG(user_filter_map), filtername, filtername_len, 
(void*)fdat,
+   if (zend_hash_add(BG(user_filter_map), filtername, filtername_len + 1, 
(void*)fdat,
sizeof(*fdat) + classname_len, NULL) == SUCCESS 

php_stream_filter_register_factory_volatile(filtername, 
user_filter_factory TSRMLS_CC) == SUCCESS) {
RETVAL_TRUE;
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.143r2=1.144diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.143 
php-src/main/streams/streams.c:1.144
--- php-src/main/streams/streams.c:1.143Wed Jan 10 22:43:17 2007
+++ php-src/main/streams/streams.c  Mon Jan 15 17:06:52 2007
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.143 2007/01/10 22:43:17 pollita Exp $ */
+/* $Id: streams.c,v 1.144 2007/01/15 17:06:52 tony2001 Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -1997,12 +1997,12 @@
return FAILURE;
}
 
-   return zend_hash_add(url_stream_wrappers_hash, protocol, protocol_len, 
wrapper, sizeof(wrapper), NULL);
+   return zend_hash_add(url_stream_wrappers_hash, protocol, protocol_len 
+ 1, wrapper, sizeof(wrapper), NULL);
 }
 
 PHPAPI int php_unregister_url_stream_wrapper(char *protocol TSRMLS_DC)
 {
-   return zend_hash_del(url_stream_wrappers_hash, protocol, 
strlen(protocol));
+   return zend_hash_del(url_stream_wrappers_hash, protocol, 
strlen(protocol) + 1);
 }
 
 static void clone_wrapper_hash(TSRMLS_D)
@@ -2027,7 +2027,7 @@
clone_wrapper_hash(TSRMLS_C);
}
 
-   return zend_hash_add(FG(stream_wrappers), protocol, protocol_len, 
wrapper, sizeof(wrapper), NULL);
+   return zend_hash_add(FG(stream_wrappers), protocol, protocol_len + 1, 
wrapper, sizeof(wrapper), NULL);
 }
 
 PHPAPI int php_unregister_url_stream_wrapper_volatile(char *protocol TSRMLS_DC)
@@ -2036,7 +2036,7 @@
clone_wrapper_hash(TSRMLS_C);
}
 
-   return zend_hash_del(FG(stream_wrappers), protocol, strlen(protocol));
+   return zend_hash_del(FG(stream_wrappers), protocol, strlen(protocol) + 
1);
 }
 /* }}} */
 
@@ -2070,10 +2070,10 @@
}
 
if (protocol)   {
-   if (FAILURE == zend_hash_find(wrapper_hash, (char*)protocol, n, 
(void**)wrapperpp)) {
-   char *tmp = estrndup(protocol, n);
+   char *tmp = estrndup(protocol, n);
+   if (FAILURE == zend_hash_find(wrapper_hash, (char*)tmp, n + 1, 
(void**)wrapperpp)) {
php_strtolower(tmp, n);
-   if (FAILURE == zend_hash_find(wrapper_hash, (char*)tmp, 
n, (void**)wrapperpp)) {
+   if (FAILURE == zend_hash_find(wrapper_hash, (char*)tmp, 
n + 1, (void**)wrapperpp)) {
char 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard user_filters.c /main/streams filter.c streams.c transports.c userspace.c

2007-01-15 Thread Antony Dovgal
tony2001Mon Jan 15 17:07:08 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main/streams   userspace.c transports.c streams.c filter.c 
/php-src/ext/standard   user_filters.c 
  Log:
  MFH: add trailing '\0' to stream hashes
  
  http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.31.2.3.2.2r2=1.31.2.3.2.3diff_format=u
Index: php-src/main/streams/userspace.c
diff -u php-src/main/streams/userspace.c:1.31.2.3.2.2 
php-src/main/streams/userspace.c:1.31.2.3.2.3
--- php-src/main/streams/userspace.c:1.31.2.3.2.2   Mon Jan  1 09:36:12 2007
+++ php-src/main/streams/userspace.cMon Jan 15 17:07:07 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: userspace.c,v 1.31.2.3.2.2 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: userspace.c,v 1.31.2.3.2.3 2007/01/15 17:07:07 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -455,7 +455,7 @@
RETURN_TRUE;
} else {
/* We failed.  But why? */
-   if 
(zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), protocol, 
protocol_len)) {
+   if 
(zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), protocol, 
protocol_len + 1)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Protocol %s:// is already defined., protocol);
} else {
/* Should never happen */
@@ -511,7 +511,7 @@
RETURN_TRUE;
}
 
-   if ((zend_hash_find(global_wrapper_hash, protocol, protocol_len, 
(void**)wrapperpp) == FAILURE) || !wrapperpp) {
+   if ((zend_hash_find(global_wrapper_hash, protocol, protocol_len + 1, 
(void**)wrapperpp) == FAILURE) || !wrapperpp) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, %s:// never 
existed, nothing to restore, protocol);
RETURN_FALSE;
}
http://cvs.php.net/viewvc.cgi/php-src/main/streams/transports.c?r1=1.16.2.1.2.2r2=1.16.2.1.2.3diff_format=u
Index: php-src/main/streams/transports.c
diff -u php-src/main/streams/transports.c:1.16.2.1.2.2 
php-src/main/streams/transports.c:1.16.2.1.2.3
--- php-src/main/streams/transports.c:1.16.2.1.2.2  Mon Jan  1 09:36:12 2007
+++ php-src/main/streams/transports.c   Mon Jan 15 17:07:07 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: transports.c,v 1.16.2.1.2.2 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: transports.c,v 1.16.2.1.2.3 2007/01/15 17:07:07 tony2001 Exp $ */
 
 #include php.h
 #include php_streams_int.h
@@ -31,12 +31,12 @@
 
 PHPAPI int php_stream_xport_register(char *protocol, 
php_stream_transport_factory factory TSRMLS_DC)
 {
-   return zend_hash_update(xport_hash, protocol, strlen(protocol), 
factory, sizeof(factory), NULL);
+   return zend_hash_update(xport_hash, protocol, strlen(protocol) + 1, 
factory, sizeof(factory), NULL);
 }
 
 PHPAPI int php_stream_xport_unregister(char *protocol TSRMLS_DC)
 {
-   return zend_hash_del(xport_hash, protocol, strlen(protocol));
+   return zend_hash_del(xport_hash, protocol, strlen(protocol) + 1);
 }
 
 #define ERR_REPORT(out_err, fmt, arg) \
@@ -106,7 +106,8 @@
}
 
if (protocol) {
-   if (FAILURE == zend_hash_find(xport_hash, (char*)protocol, n, 
(void**)factory)) {
+   char *tmp = estrndup(protocol, n);
+   if (FAILURE == zend_hash_find(xport_hash, (char*)tmp, n + 1, 
(void**)factory)) {
char wrapper_name[32];
 
if (n = sizeof(wrapper_name))
@@ -116,8 +117,10 @@
ERR_REPORT(error_string, Unable to find the socket 
transport \%s\ - did you forget to enable it when you configured PHP?,
wrapper_name);
 
+   efree(tmp);
return NULL;
}
+   efree(tmp);
}
 
if (factory == NULL) {
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.9r2=1.82.2.6.2.10diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.82.2.6.2.9 
php-src/main/streams/streams.c:1.82.2.6.2.10
--- php-src/main/streams/streams.c:1.82.2.6.2.9 Mon Jan  1 09:36:12 2007
+++ php-src/main/streams/streams.c  Mon Jan 15 17:07:07 2007
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.82.2.6.2.9 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: streams.c,v 1.82.2.6.2.10 2007/01/15 17:07:07 tony2001 Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -1449,12 +1449,12 @@
return FAILURE;
}
 
-   return zend_hash_add(url_stream_wrappers_hash, protocol, protocol_len, 
wrapper, sizeof(wrapper), NULL);
+   return 

[PHP-CVS] cvs: php-src /main php_streams.h /main/streams cast.c streams.c

2007-01-15 Thread Marcus Boerger
helly   Mon Jan 15 22:19:33 2007 UTC

  Modified files:  
/php-src/main   php_streams.h 
/php-src/main/streams   cast.c streams.c 
  Log:
  - Help streams debugging
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_streams.h?r1=1.121r2=1.122diff_format=u
Index: php-src/main/php_streams.h
diff -u php-src/main/php_streams.h:1.121 php-src/main/php_streams.h:1.122
--- php-src/main/php_streams.h:1.121Wed Jan 10 22:43:17 2007
+++ php-src/main/php_streams.h  Mon Jan 15 22:19:33 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.121 2007/01/10 22:43:17 pollita Exp $ */
+/* $Id: php_streams.h,v 1.122 2007/01/15 22:19:33 helly Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -225,7 +225,12 @@
 
int eof;
 
+#if ZEND_DEBUG
+   char *open_filename;
+   uint open_lineno;
+#endif
 }; /* php_stream */
+
 /* state definitions when closing down; these are private to streams.c */
 #define PHP_STREAM_FCLOSE_NONE 0
 #define PHP_STREAM_FCLOSE_FDOPEN   1
http://cvs.php.net/viewvc.cgi/php-src/main/streams/cast.c?r1=1.16r2=1.17diff_format=u
Index: php-src/main/streams/cast.c
diff -u php-src/main/streams/cast.c:1.16 php-src/main/streams/cast.c:1.17
--- php-src/main/streams/cast.c:1.16Mon Jan  1 09:29:35 2007
+++ php-src/main/streams/cast.c Mon Jan 15 22:19:33 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: cast.c,v 1.16 2007/01/01 09:29:35 sebastian Exp $ */
+/* $Id: cast.c,v 1.17 2007/01/15 22:19:33 helly Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -327,6 +327,11 @@
if (*newstream == NULL)
return PHP_STREAM_FAILED;
 
+#if ZEND_DEBUG
+   (*newstream)-open_filename = origstream-open_filename;
+   (*newstream)-open_lineno = origstream-open_lineno;
+#endif
+
if (php_stream_copy_to_stream(origstream, *newstream, 
PHP_STREAM_COPY_ALL) == 0) {
php_stream_close(*newstream);
*newstream = NULL;
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.144r2=1.145diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.144 
php-src/main/streams/streams.c:1.145
--- php-src/main/streams/streams.c:1.144Mon Jan 15 17:06:52 2007
+++ php-src/main/streams/streams.c  Mon Jan 15 22:19:33 2007
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.144 2007/01/15 17:06:52 tony2001 Exp $ */
+/* $Id: streams.c,v 1.145 2007/01/15 22:19:33 helly Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -241,6 +241,11 @@
ret-chunk_size = FG(def_chunk_size);
ret-readbuf_type = IS_STRING;
 
+#if ZEND_DEBUG
+   ret-open_filename = __zend_orig_filename ? __zend_orig_filename : 
__zend_filename;
+   ret-open_lineno = __zend_orig_lineno ? __zend_orig_lineno : 
__zend_lineno;
+#endif
+
if (FG(auto_detect_line_endings)) {
ret-flags |= PHP_STREAM_FLAG_DETECT_EOL;
}
@@ -384,7 +389,7 @@
 * as leaked; it will log a warning, but lets help it 
out and display what kind
 * of stream it was. */
char *leakinfo;
-   spprintf(leakinfo, 0, __FILE__ (%d) : Stream of type 
'%s' %p (path:%s) was not closed\n, __LINE__, stream-ops-label, stream, 
stream-orig_path);
+   spprintf(leakinfo, 0, __FILE__ (%d) : Stream of type 
'%s' %p (path:%s) was not closed (opened in %s on line %d)\n, __LINE__, 
stream-ops-label, stream, stream-orig_path, stream-open_filename, 
stream-open_lineno);
 
if (stream-orig_path) {
pefree(stream-orig_path, 
stream-is_persistent);
@@ -2376,6 +2381,10 @@
}
copy_of_path = pestrdup(path, persistent);
stream-orig_path = copy_of_path;
+#if ZEND_DEBUG
+   stream-open_filename = __zend_orig_filename ? 
__zend_orig_filename : __zend_filename;
+   stream-open_lineno = __zend_orig_lineno ? __zend_orig_lineno : 
__zend_lineno;
+#endif
}
 
if (stream != NULL  (options  STREAM_MUST_SEEK)) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2007-01-15 Thread Derick Rethans
derick  Mon Jan 15 23:02:00 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give Greg phpdoc access to that he can add the phar docs.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1233r2=1.1234diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1233 CVSROOT/avail:1.1234
--- CVSROOT/avail:1.1233Fri Jan 12 21:22:29 2007
+++ CVSROOT/avail   Mon Jan 15 23:02:00 2007
@@ -316,7 +316,7 @@
 avail|fa|peardoc,pear/Net_DNS,pear/Net_IPv4,pear/PEAR_Info
 avail|silvano,msaraujo|peardoc,pear/Validate,pear/MDB2_Schema
 avail|freq|peardoc,Services_Pingback
-avail|cellog|pecl/phar
+avail|cellog|pecl/phar,phpdoc
 avail|ritzmo|pear/Text_Wiki
 avail|cconstantine|peardoc,pear/System_Command
 avail|ohill|pecl/stem

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_4) /win32 sendmail.c

2007-01-15 Thread Ilia Alshanetsky
iliaa   Tue Jan 16 00:11:53 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/win32  sendmail.c 
  Log:
  
  Added buffer length checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/win32/sendmail.c?r1=1.47.2.10.2.3r2=1.47.2.10.2.4diff_format=u
Index: php-src/win32/sendmail.c
diff -u php-src/win32/sendmail.c:1.47.2.10.2.3 
php-src/win32/sendmail.c:1.47.2.10.2.4
--- php-src/win32/sendmail.c:1.47.2.10.2.3  Fri Jan  6 01:10:21 2006
+++ php-src/win32/sendmail.cTue Jan 16 00:11:53 2007
@@ -17,7 +17,7 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.47.2.10.2.3 2006/01/06 01:10:21 sniper Exp $ */
+/* $Id: sendmail.c,v 1.47.2.10.2.4 2007/01/16 00:11:53 iliaa Exp $ */
 
 #include php.h   /*php specific */
 #include stdio.h
@@ -486,7 +486,7 @@
while(token != NULL)
{
SMTP_SKIP_SPACE(token);
-   sprintf(Buffer, RCPT TO:%s\r\n, token);
+   snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, 
token);
if ((res = Post(Buffer)) != SUCCESS)
return (res);
if ((res = Ack(server_response)) != SUCCESS) {
@@ -542,7 +542,7 @@
while(token != NULL)
{
SMTP_SKIP_SPACE(token);
-   sprintf(Buffer, RCPT TO:%s\r\n, token);
+   snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT 
TO:%s\r\n, token);
if ((res = Post(Buffer)) != SUCCESS) {
return (res);
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php