[PHP-CVS] cvs: php-src /ext/standard pack.c /main php.h

2004-11-28 Thread Stefan Esser
sesser  Sun Nov 28 07:44:28 2004 EDT

  Modified files:  
/php-src/ext/standard   pack.c 
/php-src/main   php.h 
  Log:
  Fixed: removed possible integer over-/underflows
  
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/pack.c?r1=1.53&r2=1.54&ty=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.53 php-src/ext/standard/pack.c:1.54
--- php-src/ext/standard/pack.c:1.53Sat Sep 25 11:36:47 2004
+++ php-src/ext/standard/pack.c Sun Nov 28 07:44:28 2004
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: pack.c,v 1.53 2004/09/25 15:36:47 hyanantha Exp $ */
+/* $Id: pack.c,v 1.54 2004/11/28 12:44:28 sesser Exp $ */
 
 #include "php.h"
 
@@ -60,6 +60,13 @@
 #include 
 #endif
 
+#define INC_OUTPUTPOS(a,b) \
+   if ((a) < 0 || ((INT_MAX - outputpos)/(b)) < (a)) { \
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: integer 
overflow in format string", code); \
+   RETURN_FALSE; \
+   } \
+   outputpos += (a)*(b);
+
 /* Whether machine is little endian */
 char machine_little_endian;
 
@@ -243,7 +250,7 @@
switch ((int) code) {
case 'h': 
case 'H': 
-   outputpos += (arg + 1) / 2; /* 4 
bit per arg */
+   INC_OUTPUTPOS((arg + 1) / 2,1)  /* 4 bit per 
arg */
break;
 
case 'a': 
@@ -251,34 +258,34 @@
case 'c': 
case 'C':
case 'x':
-   outputpos += arg;   /* 8 bit per 
arg */
+   INC_OUTPUTPOS(arg,1)/* 8 bit per 
arg */
break;
 
case 's': 
case 'S': 
case 'n': 
case 'v':
-   outputpos += arg * 2;   /* 16 bit per arg */
+   INC_OUTPUTPOS(arg,2)/* 16 bit per 
arg */
break;
 
case 'i': 
case 'I':
-   outputpos += arg * sizeof(int);
+   INC_OUTPUTPOS(arg,sizeof(int))
break;
 
case 'l': 
case 'L': 
case 'N': 
case 'V':
-   outputpos += arg * 4;   /* 32 bit per arg */
+   INC_OUTPUTPOS(arg,4)/* 32 bit per 
arg */
break;
 
case 'f':
-   outputpos += arg * sizeof(float);
+   INC_OUTPUTPOS(arg,sizeof(float))
break;
 
case 'd':
-   outputpos += arg * sizeof(double);
+   INC_OUTPUTPOS(arg,sizeof(double))
break;
 
case 'X':
@@ -647,6 +654,11 @@
sprintf(n, "%.*s", namelen, name);
}
 
+   if (size != 0 && size != -1 && INT_MAX - size + 1 < 
inputpos) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Type %c: integer overflow", type);
+   inputpos = 0;
+   }
+
if ((inputpos + size) <= inputlen) {
switch ((int) type) {
case 'a': 
@@ -817,6 +829,10 @@
}
 
inputpos += size;
+   if (inputpos < 0) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Type %c: outside of string", type);
+   inputpos = 0;
+   }
} else if (arg < 0) {
/* Reached end of input for '*' repeater */
break;
http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.208&r2=1.209&ty=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.208 php-src/main/php.h:1.209
--- php-src/main/php.h:1.208Mon Nov 15 16:04:08 2004
+++ php-src/main/php.h  Sun Nov 28 07:44:28 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.208 2004/11/15 21:04:08 fmk Exp $ */
+/* $Id: php.h,v 1.209 2004/11/28 12:44:28 sesser Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -222,6 +222,14 @@
 #define LONG_MIN (- LONG_MAX - 1)
 #endif
 
+#ifndef

[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard pack.c /main php.h

2004-11-28 Thread Stefan Esser
sesser  Sun Nov 28 07:44:42 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   pack.c 
/php-src/main   php.h 
  Log:
  MFH
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/pack.c?r1=1.52&r2=1.52.2.1&ty=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.52 php-src/ext/standard/pack.c:1.52.2.1
--- php-src/ext/standard/pack.c:1.52Tue Feb 24 16:49:28 2004
+++ php-src/ext/standard/pack.c Sun Nov 28 07:44:42 2004
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: pack.c,v 1.52 2004/02/24 21:49:28 gschlossnagle Exp $ */
+/* $Id: pack.c,v 1.52.2.1 2004/11/28 12:44:42 sesser Exp $ */
 
 #include "php.h"
 
@@ -61,6 +61,13 @@
 #include 
 #endif
 
+#define INC_OUTPUTPOS(a,b) \
+   if ((a) < 0 || ((INT_MAX - outputpos)/(b)) < (a)) { \
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: integer 
overflow in format string", code); \
+   RETURN_FALSE; \
+   } \
+   outputpos += (a)*(b);
+
 /* Whether machine is little endian */
 char machine_little_endian;
 
@@ -244,7 +251,7 @@
switch ((int) code) {
case 'h': 
case 'H': 
-   outputpos += (arg + 1) / 2; /* 4 
bit per arg */
+   INC_OUTPUTPOS((arg + 1) / 2,1)  /* 4 bit per 
arg */
break;
 
case 'a': 
@@ -252,34 +259,34 @@
case 'c': 
case 'C':
case 'x':
-   outputpos += arg;   /* 8 bit per 
arg */
+   INC_OUTPUTPOS(arg,1)/* 8 bit per 
arg */
break;
 
case 's': 
case 'S': 
case 'n': 
case 'v':
-   outputpos += arg * 2;   /* 16 bit per arg */
+   INC_OUTPUTPOS(arg,2)/* 16 bit per 
arg */
break;
 
case 'i': 
case 'I':
-   outputpos += arg * sizeof(int);
+   INC_OUTPUTPOS(arg,sizeof(int))
break;
 
case 'l': 
case 'L': 
case 'N': 
case 'V':
-   outputpos += arg * 4;   /* 32 bit per arg */
+   INC_OUTPUTPOS(arg,4)/* 32 bit per 
arg */
break;
 
case 'f':
-   outputpos += arg * sizeof(float);
+   INC_OUTPUTPOS(arg,sizeof(float))
break;
 
case 'd':
-   outputpos += arg * sizeof(double);
+   INC_OUTPUTPOS(arg,sizeof(double))
break;
 
case 'X':
@@ -648,6 +655,11 @@
sprintf(n, "%.*s", namelen, name);
}
 
+   if (size != 0 && size != -1 && INT_MAX - size + 1 < 
inputpos) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Type %c: integer overflow", type);
+   inputpos = 0;
+   }
+
if ((inputpos + size) <= inputlen) {
switch ((int) type) {
case 'a': 
@@ -818,6 +830,10 @@
}
 
inputpos += size;
+   if (inputpos < 0) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Type %c: outside of string", type);
+   inputpos = 0;
+   }
} else if (arg < 0) {
/* Reached end of input for '*' repeater */
break;
http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.203.2.3&r2=1.203.2.4&ty=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.203.2.3 php-src/main/php.h:1.203.2.4
--- php-src/main/php.h:1.203.2.3Mon Nov 15 18:14:39 2004
+++ php-src/main/php.h  Sun Nov 28 07:44:42 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.203.2.3 2004/11/15 23:14:39 fmk Exp $ */
+/* $Id: php.h,v 1.203.2.4 2004/11/28 12:44:42 sesser Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -230,6 +230,14 @@
 #define LONG_MIN (- LONG_MAX - 1)
 

[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard pack.c /main php.h

2004-11-28 Thread Stefan Esser
sesser  Sun Nov 28 07:44:56 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   pack.c 
/php-src/main   php.h 
  Log:
  MFH
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/pack.c?r1=1.40.2.5&r2=1.40.2.6&ty=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.40.2.5 
php-src/ext/standard/pack.c:1.40.2.6
--- php-src/ext/standard/pack.c:1.40.2.5Wed Feb 25 07:36:24 2004
+++ php-src/ext/standard/pack.c Sun Nov 28 07:44:56 2004
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: pack.c,v 1.40.2.5 2004/02/25 12:36:24 sniper Exp $ */
+/* $Id: pack.c,v 1.40.2.6 2004/11/28 12:44:56 sesser Exp $ */
 
 #include "php.h"
 
@@ -63,6 +63,13 @@
 #include 
 #endif
 
+#define INC_OUTPUTPOS(a,b) \
+   if ((a) < 0 || ((INT_MAX - outputpos)/(b)) < (a)) { \
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: integer 
overflow in format string", code); \
+   RETURN_FALSE; \
+   } \
+   outputpos += (a)*(b);
+
 /* Whether machine is little endian */
 char machine_little_endian;
 
@@ -246,7 +253,7 @@
switch ((int) code) {
case 'h': 
case 'H': 
-   outputpos += (arg + 1) / 2; /* 4 
bit per arg */
+   INC_OUTPUTPOS((arg + 1) / 2,1)  /* 4 bit per 
arg */
break;
 
case 'a': 
@@ -254,34 +261,34 @@
case 'c': 
case 'C':
case 'x':
-   outputpos += arg;   /* 8 bit per 
arg */
+   INC_OUTPUTPOS(arg,1)/* 8 bit per 
arg */
break;
 
case 's': 
case 'S': 
case 'n': 
case 'v':
-   outputpos += arg * 2;   /* 16 bit per arg */
+   INC_OUTPUTPOS(arg,2)/* 16 bit per 
arg */
break;
 
case 'i': 
case 'I':
-   outputpos += arg * sizeof(int);
+   INC_OUTPUTPOS(arg,sizeof(int))
break;
 
case 'l': 
case 'L': 
case 'N': 
case 'V':
-   outputpos += arg * 4;   /* 32 bit per arg */
+   INC_OUTPUTPOS(arg,4)/* 32 bit per 
arg */
break;
 
case 'f':
-   outputpos += arg * sizeof(float);
+   INC_OUTPUTPOS(arg,sizeof(float))
break;
 
case 'd':
-   outputpos += arg * sizeof(double);
+   INC_OUTPUTPOS(arg,sizeof(double))
break;
 
case 'X':
@@ -650,6 +657,11 @@
sprintf(n, "%.*s", namelen, name);
}
 
+   if (size != 0 && size != -1 && INT_MAX - size + 1 < 
inputpos) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Type %c: integer overflow", type);
+   inputpos = 0;
+   }
+
if ((inputpos + size) <= inputlen) {
switch ((int) type) {
case 'a': 
@@ -820,6 +832,10 @@
}
 
inputpos += size;
+   if (inputpos < 0) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Type %c: outside of string", type);
+   inputpos = 0;
+   }
} else if (arg < 0) {
/* Reached end of input for '*' repeater */
break;
http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.178.2.9&r2=1.178.2.10&ty=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.178.2.9 php-src/main/php.h:1.178.2.10
--- php-src/main/php.h:1.178.2.9Mon Nov 15 08:40:31 2004
+++ php-src/main/php.h  Sun Nov 28 07:44:56 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.178.2.9 2004/11/15 13:40:31 derick Exp $ */
+/* $Id: php.h,v 1.178.2.10 2004/11/28 12:44:56 sesser Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -224,6 +224,14 @@
 #define LONG_MI

[PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended

2004-11-28 Thread Antony Dovgal
tony2001Sun Nov 28 08:21:09 2004 EDT

  Modified files:  
/php-srcphp.ini-dist php.ini-recommended 
  Log:
  fix #30314
  
  
http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.220&r2=1.221&ty=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.220 php-src/php.ini-dist:1.221
--- php-src/php.ini-dist:1.220  Mon Nov 15 18:27:48 2004
+++ php-src/php.ini-distSun Nov 28 08:21:09 2004
@@ -248,7 +248,7 @@
 
 ; error_reporting is a bit-field.  Or each number up to get desired error
 ; reporting level
-; E_ALL - All errors and warnings
+; E_ALL - All errors and warnings (doesn't include E_STRICT)
 ; E_ERROR   - fatal run-time errors
 ; E_WARNING - run-time warnings (non-fatal errors)
 ; E_PARSE   - compile-time parse errors
http://cvs.php.net/diff.php/php-src/php.ini-recommended?r1=1.164&r2=1.165&ty=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.164 php-src/php.ini-recommended:1.165
--- php-src/php.ini-recommended:1.164   Mon Nov 15 18:27:48 2004
+++ php-src/php.ini-recommended Sun Nov 28 08:21:09 2004
@@ -306,7 +306,7 @@
 
 ; error_reporting is a bit-field.  Or each number up to get desired error
 ; reporting level
-; E_ALL - All errors and warnings
+; E_ALL - All errors and warnings (doesn't include E_STRICT)
 ; E_ERROR   - fatal run-time errors
 ; E_WARNING - run-time warnings (non-fatal errors)
 ; E_PARSE   - compile-time parse errors

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



[PHP-CVS] cvs: php-src(PHP_5_0) / php.ini-dist php.ini-recommended

2004-11-28 Thread Antony Dovgal
tony2001Sun Nov 28 08:22:11 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcphp.ini-dist php.ini-recommended 
  Log:
  MFH: fix #30314
  
  
http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.215.2.5&r2=1.215.2.6&ty=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.215.2.5 php-src/php.ini-dist:1.215.2.6
--- php-src/php.ini-dist:1.215.2.5  Mon Nov 15 18:29:42 2004
+++ php-src/php.ini-distSun Nov 28 08:22:11 2004
@@ -248,7 +248,7 @@
 
 ; error_reporting is a bit-field.  Or each number up to get desired error
 ; reporting level
-; E_ALL - All errors and warnings
+; E_ALL - All errors and warnings (doesn't include E_STRICT)
 ; E_ERROR   - fatal run-time errors
 ; E_WARNING - run-time warnings (non-fatal errors)
 ; E_PARSE   - compile-time parse errors
http://cvs.php.net/diff.php/php-src/php.ini-recommended?r1=1.159.2.5&r2=1.159.2.6&ty=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.159.2.5 
php-src/php.ini-recommended:1.159.2.6
--- php-src/php.ini-recommended:1.159.2.5   Mon Nov 15 18:29:42 2004
+++ php-src/php.ini-recommended Sun Nov 28 08:22:11 2004
@@ -306,7 +306,7 @@
 
 ; error_reporting is a bit-field.  Or each number up to get desired error
 ; reporting level
-; E_ALL - All errors and warnings
+; E_ALL - All errors and warnings (doesn't include E_STRICT)
 ; E_ERROR   - fatal run-time errors
 ; E_WARNING - run-time warnings (non-fatal errors)
 ; E_PARSE   - compile-time parse errors

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



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

2004-11-28 Thread Stefan Esser
sesser  Sun Nov 28 08:32:29 2004 EDT

  Modified files:  
/php-src/main   SAPI.c 
  Log:
  Fixed: Correctly Initialize fields
  
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.191&r2=1.192&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.191 php-src/main/SAPI.c:1.192
--- php-src/main/SAPI.c:1.191   Mon Oct  4 20:42:25 2004
+++ php-src/main/SAPI.c Sun Nov 28 08:32:29 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.191 2004/10/05 00:42:25 andi Exp $ */
+/* $Id: SAPI.c,v 1.192 2004/11/28 13:32:29 sesser Exp $ */
 
 #include 
 #include 
@@ -290,10 +290,14 @@
 
/* SG(sapi_headers).http_response_code = 200; */ 
SG(sapi_headers).http_status_line = NULL;
+   SG(read_post_bytes) = 0;
+   SG(request_info).post_data = NULL;
+   SG(request_info).raw_post_data = NULL;
SG(request_info).current_user = NULL;
SG(request_info).current_user_length = 0;
SG(request_info).no_headers = 0;
SG(request_info).post_entry = NULL;
+   SG(global_request_time) = 0;
 
/*
 * It's possible to override this general case in the activate() 
callback, 
@@ -332,6 +336,7 @@
SG(request_info).current_user = NULL;
SG(request_info).current_user_length = 0;
SG(request_info).no_headers = 0;
+   SG(request_info).post_entry = NULL;
SG(global_request_time) = 0;
 
/* It's possible to override this general case in the activate() 
callback, if

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



[PHP-CVS] cvs: php-src(PHP_5_0) /main SAPI.c

2004-11-28 Thread Stefan Esser
sesser  Sun Nov 28 08:34:01 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/main   SAPI.c 
  Log:
  MFH
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.187.2.1&r2=1.187.2.2&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.187.2.1 php-src/main/SAPI.c:1.187.2.2
--- php-src/main/SAPI.c:1.187.2.1   Thu Aug 19 16:34:04 2004
+++ php-src/main/SAPI.c Sun Nov 28 08:34:01 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.187.2.1 2004/08/19 20:34:04 bfrance Exp $ */
+/* $Id: SAPI.c,v 1.187.2.2 2004/11/28 13:34:01 sesser Exp $ */
 
 #include 
 #include 
@@ -290,9 +290,13 @@
 
/* SG(sapi_headers).http_response_code = 200; */ 
SG(sapi_headers).http_status_line = NULL;
+   SG(read_post_bytes) = 0;
+   SG(request_info).post_data = NULL;
+   SG(request_info).raw_post_data = NULL;
SG(request_info).current_user = NULL;
SG(request_info).current_user_length = 0;
SG(request_info).no_headers = 0;
+   SG(request_info).post_entry = NULL;
 
/*
 * It's possible to override this general case in the activate() 
callback, 

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



[PHP-CVS] cvs: php-src /ext/standard array.c

2004-11-28 Thread Antony Dovgal
tony2001Sun Nov 28 12:03:46 2004 EDT

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  fix #29954 (array_reduce segfaults when initial value is array)
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.283&r2=1.284&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.283 php-src/ext/standard/array.c:1.284
--- php-src/ext/standard/array.c:1.283  Fri Nov 19 11:55:37 2004
+++ php-src/ext/standard/array.cSun Nov 28 12:03:45 2004
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.283 2004/11/19 16:55:37 tony2001 Exp $ */
+/* $Id: array.c,v 1.284 2004/11/28 17:03:45 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -3943,6 +3943,7 @@
efree(callback_name);
 
if (ZEND_NUM_ARGS() > 2) {
+   convert_to_long_ex(initial);
result = *initial;
} else {
MAKE_STD_ZVAL(result);

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard array.c

2004-11-28 Thread Antony Dovgal
tony2001Sun Nov 28 12:04:18 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   array.c 
  Log:
  MFH: fix #29954 (array_reduce segfaults when initial value is array)
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266.2.6&r2=1.266.2.7&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.266.2.6 
php-src/ext/standard/array.c:1.266.2.7
--- php-src/ext/standard/array.c:1.266.2.6  Fri Nov 19 11:57:06 2004
+++ php-src/ext/standard/array.cSun Nov 28 12:04:18 2004
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.266.2.6 2004/11/19 16:57:06 tony2001 Exp $ */
+/* $Id: array.c,v 1.266.2.7 2004/11/28 17:04:18 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -3836,6 +3836,7 @@
efree(callback_name);
 
if (ZEND_NUM_ARGS() > 2) {
+   convert_to_long_ex(initial);
result = *initial;
} else {
MAKE_STD_ZVAL(result);

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard array.c

2004-11-28 Thread Antony Dovgal
tony2001Sun Nov 28 12:12:59 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   array.c 
  Log:
  MFH: fix #29954 (array_reduce segfaults when initial value is array)
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.199.2.38&r2=1.199.2.39&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.199.2.38 
php-src/ext/standard/array.c:1.199.2.39
--- php-src/ext/standard/array.c:1.199.2.38 Fri Nov 19 11:58:38 2004
+++ php-src/ext/standard/array.cSun Nov 28 12:12:59 2004
@@ -22,7 +22,7 @@
 */
 
 
-/* $Id: array.c,v 1.199.2.38 2004/11/19 16:58:38 tony2001 Exp $ */
+/* $Id: array.c,v 1.199.2.39 2004/11/28 17:12:59 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -3228,6 +3228,7 @@
efree(callback_name);
 
if (ZEND_NUM_ARGS() > 2) {
+   convert_to_long_ex(initial);
result = *initial;
} else {
MAKE_STD_ZVAL(result);

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



[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS

2004-11-28 Thread Antony Dovgal
tony2001Sun Nov 28 12:13:50 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
  Log:
  BFN
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.132&r2=1.1760.2.133&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.132 php-src/NEWS:1.1760.2.133
--- php-src/NEWS:1.1760.2.132   Sat Nov 27 05:14:20 2004
+++ php-src/NEWSSun Nov 28 12:13:49 2004
@@ -58,6 +58,7 @@
 - Fixed bug #30042 (strtotime does not use second param). (Derick)
 - Fixed bug #30027 (Possible crash inside ftp_get()).
   (cfield at affinitysolutions dot com)
+- Fixed bug #29954 (array_reduce segfaults when initial value is array). (Tony)
 - Fixed bug #29801 (Set limit on the size of mmapable data). (Ilia)
 - Fixed bug #29557 (strtotime error). (Derick)
 - Fixed bug #29418 (double free when openssl_csr_new fails).

-- 
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

2004-11-28 Thread Antony Dovgal
tony2001Sun Nov 28 12:15:32 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  BFN + change my mail to my name
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.758&r2=1.1247.2.759&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.758 php-src/NEWS:1.1247.2.759
--- php-src/NEWS:1.1247.2.758   Tue Nov 23 09:08:19 2004
+++ php-src/NEWSSun Nov 28 12:15:30 2004
@@ -60,6 +60,7 @@
 - Fixed funny forking effect in FastCGI when PHP_FCGI_CHILDREN was not set.
 - Fixed bug #30050 (Possible crash inside php_shutdown_config()). 
   (Ilia, nw at softwarekombinat dot de)
+- Fixed bug #29954 (array_reduce segfaults when initial value is array). (Tony)
 - Fixed bug #29882 (isset crashes on arrays). (Marcus)
 - Fixed bug #29753 (mcal_fetch_event() allows 2nd argument to be optional).
   (Ilia, Vrana)
@@ -82,7 +83,7 @@
 - Fixed bug #29226 (ctype_* functions missing validation of numeric string
   representations). (Ilia)
 - Fixed bug #29209 (imap_fetchbody() doesn't check message index).
-  (Ilia, tony2001 at phpclub dot net)
+  (Ilia, Tony)
 - Fixed bug #29116 (Zend constant warning uses memory after free).
   (Marcus, jdolecek at NetBSD dot org)
 - Fixed bug #29114 (Potential double free in php_stat). (Sara)

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



[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c

2004-11-28 Thread Sergey Kartashoff
gluke   Sun Nov 28 15:03:05 2004 EDT

  Modified files:  
/php-src/ext/mnogosearchphp_mnogo.c 
  Log:
  - MnoGoSearch extension updated to fix compilation issues with 
mnogosearch-3.2.25+
  
http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.94&r2=1.95&ty=u
Index: php-src/ext/mnogosearch/php_mnogo.c
diff -u php-src/ext/mnogosearch/php_mnogo.c:1.94 
php-src/ext/mnogosearch/php_mnogo.c:1.95
--- php-src/ext/mnogosearch/php_mnogo.c:1.94Mon Nov 15 14:03:19 2004
+++ php-src/ext/mnogosearch/php_mnogo.c Sun Nov 28 15:03:04 2004
@@ -1,5 +1,5 @@
 /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */
-/* $Id: php_mnogo.c,v 1.94 2004/11/15 19:03:19 gluke Exp $ */
+/* $Id: php_mnogo.c,v 1.95 2004/11/28 20:03:04 gluke Exp $ */
 
 /*
+--+
@@ -1214,43 +1214,48 @@
 #endif
 
case UDM_ISPELL_TYPE_AFFIX: 
-#if UDM_VERSION_ID < 30200 
+#if UDM_VERSION_ID < 30200
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_DB;
-
 #if UDM_VERSION_ID > 30111
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_SERVER;
 #endif
-   
if (UdmImportAffixes(Agent->Conf,val1,val2,NULL,0)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load affix file %s",val2);
RETURN_FALSE;
}
-#else
+#elif UDM_VERSION_ID < 30225
if (UdmImportAffixes(Agent->Conf,val1,charset,val2)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load affix file %s",val2);
RETURN_FALSE;
}
-
+#else
+   
if(UdmAffixListListAdd(&Agent->Conf->Affixes,val1,charset,val2)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load affix file %s",val2);
+   RETURN_FALSE;
+   }
 #endif
break;

case UDM_ISPELL_TYPE_SPELL: 
 #if UDM_VERSION_ID < 30200 
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_DB;
-   
 #if UDM_VERSION_ID > 30111
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_SERVER;
 #endif
-   
if (UdmImportDictionary(Agent->Conf,val1,val2,1,"")) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load spell file %s",val2);
RETURN_FALSE;
}
-#else
+#elif UDM_VERSION_ID < 30225
if 
(UdmImportDictionary(Agent->Conf,val1,charset,val2,0,"")) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load spell file %s",val2);
RETURN_FALSE;
}
+#else
+   
if(UdmSpellListListAdd(&Agent->Conf->Spells,val1,charset,val2)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load spell file %s",val2);
+   RETURN_FALSE;
+   }
 #endif
break;
 
@@ -1262,6 +1267,7 @@
}

if (flag) {
+#if UDM_VERSION_ID < 30225
 #if UDM_VERSION_ID >= 30204
if(Agent->Conf->Spells.nspell) {
UdmSortDictionary(&Agent->Conf->Spells);
@@ -1273,6 +1279,7 @@
UdmSortAffixes(Agent->Conf);
}
 #endif
+#endif
}

RETURN_TRUE;
@@ -1297,8 +1304,11 @@
break;
}
ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, 
"mnoGoSearch-Agent", le_link);
-
-#if UDM_VERSION_ID >= 30204
+   
+#if UDM_VERSION_ID >= 30225
+   UdmSpellListListFree(&Agent->Conf->Spells); 
+   UdmAffixListListFree(&Agent->Conf->Affixes);
+#elif UDM_VERSION_ID >= 30204
UdmSpellListFree(&Agent->Conf->Spells);
UdmAffixListFree(&Agent->Conf->Affixes);
 #elif UDM_VERSION_ID > 30111

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c php_mnogo.h

2004-11-28 Thread Sergey Kartashoff
gluke   Sun Nov 28 15:03:29 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mnogosearchphp_mnogo.c php_mnogo.h 
  Log:
  - MnoGoSearch extension updated to fix compilation issues with 
mnogosearch-3.2.25+
  http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.66.2.12&r2=1.66.2.13&ty=u
Index: php-src/ext/mnogosearch/php_mnogo.c
diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.12 
php-src/ext/mnogosearch/php_mnogo.c:1.66.2.13
--- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.12   Mon Feb 16 11:40:15 2004
+++ php-src/ext/mnogosearch/php_mnogo.c Sun Nov 28 15:03:28 2004
@@ -1,5 +1,5 @@
 /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */
-/* $Id: php_mnogo.c,v 1.66.2.12 2004/02/16 16:40:15 gluke Exp $ */
+/* $Id: php_mnogo.c,v 1.66.2.13 2004/11/28 20:03:28 gluke Exp $ */
 
 /*
+--+
@@ -77,7 +77,7 @@
 #define UDM_PARAM_HLBEG19
 #define UDM_PARAM_HLEND20
 #define UDM_PARAM_SYNONYM  21
-#define UDM_PARAM_SEARCHD  22
+#define UDM_PARAM_SEARCHD  22  /* unused */
 #define UDM_PARAM_QSTRING  23
 #define UDM_PARAM_REMOTE_ADDR  24
 #define UDM_PARAM_QUERY25
@@ -156,11 +156,6 @@
 
 #if UDM_VERSION_ID >= 30200
PHP_FE(udm_check_charset,   NULL)
-#if UDM_VERSION_ID == 30203
-   PHP_FE(udm_open_stored, NULL)
-   PHP_FE(udm_check_stored,NULL)
-   PHP_FE(udm_close_stored,NULL)
-#endif
 #if UDM_VERSION_ID >= 30203
PHP_FE(udm_crc32,   NULL)
 #endif
@@ -168,12 +163,16 @@
PHP_FE(udm_parse_query_string,  NULL)
PHP_FE(udm_make_excerpt,NULL)
PHP_FE(udm_set_agent_param_ex,  NULL)
+   PHP_FE(udm_get_agent_param_ex,  NULL)
PHP_FE(udm_get_res_field_ex,NULL)
 #endif
 #if UDM_VERSION_ID >= 30211
PHP_FE(udm_hash32,  NULL)
PHP_FE(udm_alloc_agent_array,   NULL)
 #endif
+#if UDM_VERSION_ID >= 30216
+   PHP_FE(udm_store_doc_cgi,   NULL)
+#endif
 #endif
 
PHP_FE(udm_alloc_agent, NULL)
@@ -317,7 +316,6 @@
REGISTER_LONG_CONSTANT("UDM_PARAM_HLEND",   
UDM_PARAM_HLEND,CONST_CS | CONST_PERSISTENT);   

REGISTER_LONG_CONSTANT("UDM_PARAM_SYNONYM", 
UDM_PARAM_SYNONYM,CONST_CS | CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT("UDM_PARAM_SEARCHD", 
UDM_PARAM_SEARCHD,CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("UDM_PARAM_STORED",  
UDM_PARAM_STORED,CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("UDM_PARAM_GROUPBYSITE", 
UDM_PARAM_GROUPBYSITE,CONST_CS | CONST_PERSISTENT);

@@ -431,21 +429,38 @@
 }
 
 static char* MyRemoveHiLightDup(const char *s){
-   size_t  len=strlen(s)+1;
-   char*res=malloc(len);
-   char*d;
-   
-   for(d=res;s[0];s++){
-   switch(s[0]){
-   case '\2':
-   case '\3':
-   break;
-   default:
-   *d++=*s;
-   }
-   }
-   *d='\0';
-   return res;
+  size_t len=strlen(s)+1;
+  char  *d, *res = (char*)emalloc(len);
+  
+  for(d=res; s[0]; s++)
+  {
+switch(s[0])
+{
+  case '\2':
+  case '\3':
+break;
+  case '&':
+if (s[1] == '#')
+{
+  char *e;
+  int code= 0;
+  
+  for (e= (char *)s+2; (*e >= '0') && (*e <= '9'); code= code*10 + 
e[0]-'0', e++);
+  if (*e == ';')
+  {
+*d++= (code < 128) ? code : '?';
+s= e;
+break;
+  }
+}
+/* pass through */
+
+  default:
+*d++=*s;
+}
+  }
+  *d='\0';
+  return res;
 }
 
 /* {{{ proto int udm_alloc_agent(string dbaddr [, string dbmode])
@@ -908,18 +923,6 @@
 #endif 
break;

-   case UDM_PARAM_SEARCHD:
-#if UDM_VERSION_ID <= 30203
-   UdmSDCLientListAdd(&(Agent->Conf->sdcl),val);
-   {
-   size_t i;
-   for(i=0;iConf->sdcl.nclients;i++){
-   
UdmSDCLientListAdd(&Agent->sdcl,Agent->Conf->sdcl.Clients[i].addr);
-   }
-   }
-#endif 
-   break;
-
case UDM_PARAM_QSTRING:
 #if UDM_VERSION_ID >= 30204

UdmVarListReplaceStr(&Agent->Conf->Vars,"QUERY_STRING",val);
@@ -1211,43 +1214,48 @@
 #endif
 
case UDM_ISPELL_TYPE_AFFIX: 
-#if UDM_VERSION_ID < 30200 
+#if UDM_VERSION_ID < 30200
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_DB;
-
 #if UDM_VERSION_ID > 30111

[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mnogosearch php_mnogo.c

2004-11-28 Thread Sergey Kartashoff
gluke   Sun Nov 28 15:04:00 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/mnogosearchphp_mnogo.c 
  Log:
  - MnoGoSearch extension updated to fix compilation issues with 
mnogosearch-3.2.25+
  
http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.90.2.4&r2=1.90.2.5&ty=u
Index: php-src/ext/mnogosearch/php_mnogo.c
diff -u php-src/ext/mnogosearch/php_mnogo.c:1.90.2.4 
php-src/ext/mnogosearch/php_mnogo.c:1.90.2.5
--- php-src/ext/mnogosearch/php_mnogo.c:1.90.2.4Mon Nov 15 14:02:38 2004
+++ php-src/ext/mnogosearch/php_mnogo.c Sun Nov 28 15:03:59 2004
@@ -1,5 +1,5 @@
 /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */
-/* $Id: php_mnogo.c,v 1.90.2.4 2004/11/15 19:02:38 gluke Exp $ */
+/* $Id: php_mnogo.c,v 1.90.2.5 2004/11/28 20:03:59 gluke Exp $ */
 
 /*
+--+
@@ -1214,43 +1214,48 @@
 #endif
 
case UDM_ISPELL_TYPE_AFFIX: 
-#if UDM_VERSION_ID < 30200 
+#if UDM_VERSION_ID < 30200
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_DB;
-
 #if UDM_VERSION_ID > 30111
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_SERVER;
 #endif
-   
if (UdmImportAffixes(Agent->Conf,val1,val2,NULL,0)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load affix file %s",val2);
RETURN_FALSE;
}
-#else
+#elif UDM_VERSION_ID < 30225
if (UdmImportAffixes(Agent->Conf,val1,charset,val2)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load affix file %s",val2);
RETURN_FALSE;
}
-
+#else
+   
if(UdmAffixListListAdd(&Agent->Conf->Affixes,val1,charset,val2)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load affix file %s",val2);
+   RETURN_FALSE;
+   }
 #endif
break;

case UDM_ISPELL_TYPE_SPELL: 
 #if UDM_VERSION_ID < 30200 
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_DB;
-   
 #if UDM_VERSION_ID > 30111
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_SERVER;
 #endif
-   
if (UdmImportDictionary(Agent->Conf,val1,val2,1,"")) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load spell file %s",val2);
RETURN_FALSE;
}
-#else
+#elif UDM_VERSION_ID < 30225
if 
(UdmImportDictionary(Agent->Conf,val1,charset,val2,0,"")) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load spell file %s",val2);
RETURN_FALSE;
}
+#else
+   
if(UdmSpellListListAdd(&Agent->Conf->Spells,val1,charset,val2)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Cannot load spell file %s",val2);
+   RETURN_FALSE;
+   }
 #endif
break;
 
@@ -1262,6 +1267,7 @@
}

if (flag) {
+#if UDM_VERSION_ID < 30225
 #if UDM_VERSION_ID >= 30204
if(Agent->Conf->Spells.nspell) {
UdmSortDictionary(&Agent->Conf->Spells);
@@ -1273,6 +1279,7 @@
UdmSortAffixes(Agent->Conf);
}
 #endif
+#endif
}

RETURN_TRUE;
@@ -1297,8 +1304,11 @@
break;
}
ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, 
"mnoGoSearch-Agent", le_link);
-
-#if UDM_VERSION_ID >= 30204
+   
+#if UDM_VERSION_ID >= 30225
+   UdmSpellListListFree(&Agent->Conf->Spells); 
+   UdmAffixListListFree(&Agent->Conf->Affixes);
+#elif UDM_VERSION_ID >= 30204
UdmSpellListFree(&Agent->Conf->Spells);
UdmAffixListFree(&Agent->Conf->Affixes);
 #elif UDM_VERSION_ID > 30111

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



Re: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c php_mnogo.h

2004-11-28 Thread Ilia Alshanetsky
Why such a major patch which adds features is applied to the stable 
build during the final stages of a release cycle? Please revert the 
patch. If there are fixes need to allow compilation with 
mnogosearch-3.2.25+ those can go in, but no new features please.

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


[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c

2004-11-28 Thread Sergey Kartashoff
gluke   Sun Nov 28 15:30:09 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mnogosearchphp_mnogo.c 
  Log:
  - MnoGoSearch extension latest patch reverted
  http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.66.2.13&r2=1.66.2.14&ty=u
Index: php-src/ext/mnogosearch/php_mnogo.c
diff -u php-src/ext/mnogosearch/php_mnogo.c:1.66.2.13 
php-src/ext/mnogosearch/php_mnogo.c:1.66.2.14
--- php-src/ext/mnogosearch/php_mnogo.c:1.66.2.13   Sun Nov 28 15:03:28 2004
+++ php-src/ext/mnogosearch/php_mnogo.c Sun Nov 28 15:30:08 2004
@@ -1,5 +1,5 @@
 /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */
-/* $Id: php_mnogo.c,v 1.66.2.13 2004/11/28 20:03:28 gluke Exp $ */
+/* $Id: php_mnogo.c,v 1.66.2.14 2004/11/28 20:30:08 gluke Exp $ */
 
 /*
+--+
@@ -77,7 +77,7 @@
 #define UDM_PARAM_HLBEG19
 #define UDM_PARAM_HLEND20
 #define UDM_PARAM_SYNONYM  21
-#define UDM_PARAM_SEARCHD  22  /* unused */
+#define UDM_PARAM_SEARCHD  22
 #define UDM_PARAM_QSTRING  23
 #define UDM_PARAM_REMOTE_ADDR  24
 #define UDM_PARAM_QUERY25
@@ -156,6 +156,11 @@
 
 #if UDM_VERSION_ID >= 30200
PHP_FE(udm_check_charset,   NULL)
+#if UDM_VERSION_ID == 30203
+   PHP_FE(udm_open_stored, NULL)
+   PHP_FE(udm_check_stored,NULL)
+   PHP_FE(udm_close_stored,NULL)
+#endif
 #if UDM_VERSION_ID >= 30203
PHP_FE(udm_crc32,   NULL)
 #endif
@@ -163,16 +168,12 @@
PHP_FE(udm_parse_query_string,  NULL)
PHP_FE(udm_make_excerpt,NULL)
PHP_FE(udm_set_agent_param_ex,  NULL)
-   PHP_FE(udm_get_agent_param_ex,  NULL)
PHP_FE(udm_get_res_field_ex,NULL)
 #endif
 #if UDM_VERSION_ID >= 30211
PHP_FE(udm_hash32,  NULL)
PHP_FE(udm_alloc_agent_array,   NULL)
 #endif
-#if UDM_VERSION_ID >= 30216
-   PHP_FE(udm_store_doc_cgi,   NULL)
-#endif
 #endif
 
PHP_FE(udm_alloc_agent, NULL)
@@ -316,6 +317,7 @@
REGISTER_LONG_CONSTANT("UDM_PARAM_HLEND",   
UDM_PARAM_HLEND,CONST_CS | CONST_PERSISTENT);   

REGISTER_LONG_CONSTANT("UDM_PARAM_SYNONYM", 
UDM_PARAM_SYNONYM,CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("UDM_PARAM_SEARCHD", 
UDM_PARAM_SEARCHD,CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("UDM_PARAM_STORED",  
UDM_PARAM_STORED,CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("UDM_PARAM_GROUPBYSITE", 
UDM_PARAM_GROUPBYSITE,CONST_CS | CONST_PERSISTENT);

@@ -429,38 +431,21 @@
 }
 
 static char* MyRemoveHiLightDup(const char *s){
-  size_t len=strlen(s)+1;
-  char  *d, *res = (char*)emalloc(len);
-  
-  for(d=res; s[0]; s++)
-  {
-switch(s[0])
-{
-  case '\2':
-  case '\3':
-break;
-  case '&':
-if (s[1] == '#')
-{
-  char *e;
-  int code= 0;
-  
-  for (e= (char *)s+2; (*e >= '0') && (*e <= '9'); code= code*10 + 
e[0]-'0', e++);
-  if (*e == ';')
-  {
-*d++= (code < 128) ? code : '?';
-s= e;
-break;
-  }
-}
-/* pass through */
-
-  default:
-*d++=*s;
-}
-  }
-  *d='\0';
-  return res;
+   size_t  len=strlen(s)+1;
+   char*res=malloc(len);
+   char*d;
+   
+   for(d=res;s[0];s++){
+   switch(s[0]){
+   case '\2':
+   case '\3':
+   break;
+   default:
+   *d++=*s;
+   }
+   }
+   *d='\0';
+   return res;
 }
 
 /* {{{ proto int udm_alloc_agent(string dbaddr [, string dbmode])
@@ -923,6 +908,18 @@
 #endif 
break;

+   case UDM_PARAM_SEARCHD:
+#if UDM_VERSION_ID <= 30203
+   UdmSDCLientListAdd(&(Agent->Conf->sdcl),val);
+   {
+   size_t i;
+   for(i=0;iConf->sdcl.nclients;i++){
+   
UdmSDCLientListAdd(&Agent->sdcl,Agent->Conf->sdcl.Clients[i].addr);
+   }
+   }
+#endif 
+   break;
+
case UDM_PARAM_QSTRING:
 #if UDM_VERSION_ID >= 30204

UdmVarListReplaceStr(&Agent->Conf->Vars,"QUERY_STRING",val);
@@ -1214,45 +1211,40 @@
 #endif
 
case UDM_ISPELL_TYPE_AFFIX: 
-#if UDM_VERSION_ID < 30200
+#if UDM_VERSION_ID < 30200 
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_DB;
+
 #if UDM_VERSION_ID > 30111
Agent->Conf->ispell_mode &= ~UDM_ISPELL_MODE_S

[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.h

2004-11-28 Thread Sergey Kartashoff
gluke   Sun Nov 28 15:31:37 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mnogosearchphp_mnogo.h 
  Log:
  - MnoGoSearch extension latest patch reverted (part2)
  
http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.h?r1=1.19.4.4&r2=1.19.4.5&ty=u
Index: php-src/ext/mnogosearch/php_mnogo.h
diff -u php-src/ext/mnogosearch/php_mnogo.h:1.19.4.4 
php-src/ext/mnogosearch/php_mnogo.h:1.19.4.5
--- php-src/ext/mnogosearch/php_mnogo.h:1.19.4.4Sun Nov 28 15:03:29 2004
+++ php-src/ext/mnogosearch/php_mnogo.h Sun Nov 28 15:31:36 2004
@@ -1,11 +1,11 @@
 /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */
-/* $Id: php_mnogo.h,v 1.19.4.4 2004/11/28 20:03:29 gluke Exp $ */
+/* $Id: php_mnogo.h,v 1.19.4.5 2004/11/28 20:31:36 gluke Exp $ */
 
-/* 
+/*
+--+
-   | PHP Version 5|
+   | PHP Version 4|
+--+
-   | Copyright (c) 1997-2004 The PHP Group|
+   | Copyright (c) 1997-2003 The PHP Group|
+--+
| This source file is subject to version 3.0 of the PHP license,   |
| that is bundled with this package in the file LICENSE, and is|
@@ -15,12 +15,12 @@
| obtain it through the world-wide-web, please send a note to  |
| [EMAIL PROTECTED] so we can mail you a copy immediately.   |
+--+
-   | Authors:  
|
+   | Authors: |
|  Initial version by  Alex Barkov <[EMAIL PROTECTED]> |
|  and Ramil Kalimullin <[EMAIL PROTECTED]>|
|  Further development by  Sergey Kartashoff <[EMAIL PROTECTED]>   |
+--+
-*/
+ */
 
 #ifndef _PHP_MNOGO_H
 #define _PHP_MNOGO_H

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.h

2004-11-28 Thread Sergey Kartashoff
gluke   Sun Nov 28 15:33:09 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mnogosearchphp_mnogo.h 
  Log:
  # - MnoGoSearch extension latest patch reverted (part3)
  
http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.h?r1=1.19.4.5&r2=1.19.4.6&ty=u
Index: php-src/ext/mnogosearch/php_mnogo.h
diff -u php-src/ext/mnogosearch/php_mnogo.h:1.19.4.5 
php-src/ext/mnogosearch/php_mnogo.h:1.19.4.6
--- php-src/ext/mnogosearch/php_mnogo.h:1.19.4.5Sun Nov 28 15:31:36 2004
+++ php-src/ext/mnogosearch/php_mnogo.h Sun Nov 28 15:33:09 2004
@@ -1,21 +1,21 @@
 /* $Source: /repository/php-src/ext/mnogosearch/php_mnogo.h,v $ */
-/* $Id: php_mnogo.h,v 1.19.4.5 2004/11/28 20:31:36 gluke Exp $ */
+/* $Id: php_mnogo.h,v 1.19.4.6 2004/11/28 20:33:09 gluke Exp $ */
 
-/*
+/* 
+--+
| PHP Version 4|
+--+
| Copyright (c) 1997-2003 The PHP Group|
+--+
-   | This source file is subject to version 3.0 of the PHP license,   |
+   | This source file is subject to version 2.02 of the PHP license,  |
| that is bundled with this package in the file LICENSE, and is|
-   | available through the world-wide-web at the following url:   |
-   | http://www.php.net/license/3_0.txt.  |
+   | available at through the world-wide-web at   |
+   | http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to   |
| obtain it through the world-wide-web, please send a note to  |
| [EMAIL PROTECTED] so we can mail you a copy immediately.   |
+--+
-   | Authors: |
+   | Authors:  
|
|  Initial version by  Alex Barkov <[EMAIL PROTECTED]> |
|  and Ramil Kalimullin <[EMAIL PROTECTED]>|
|  Further development by  Sergey Kartashoff <[EMAIL PROTECTED]>   |
@@ -57,6 +57,11 @@
 DLEXPORT PHP_FUNCTION(udm_api_version);
 #if UDM_VERSION_ID >= 30200
 DLEXPORT PHP_FUNCTION(udm_check_charset);
+#if UDM_VERSION_ID == 30203
+DLEXPORT PHP_FUNCTION(udm_open_stored);
+DLEXPORT PHP_FUNCTION(udm_check_stored);
+DLEXPORT PHP_FUNCTION(udm_close_stored);
+#endif
 #if UDM_VERSION_ID >= 30203
 DLEXPORT PHP_FUNCTION(udm_crc32);
 #endif
@@ -64,16 +69,12 @@
 DLEXPORT PHP_FUNCTION(udm_parse_query_string);
 DLEXPORT PHP_FUNCTION(udm_make_excerpt);
 DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex);
-DLEXPORT PHP_FUNCTION(udm_get_agent_param_ex);
 DLEXPORT PHP_FUNCTION(udm_get_res_field_ex);
 #endif
 #if UDM_VERSION_ID >= 30211
 DLEXPORT PHP_FUNCTION(udm_hash32);
 DLEXPORT PHP_FUNCTION(udm_alloc_agent_array);
 #endif
-#if UDM_VERSION_ID >= 30216
-DLEXPORT PHP_FUNCTION(udm_store_doc_cgi);
-#endif
 #endif
 
 DLEXPORT PHP_FUNCTION(udm_alloc_agent);

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



Re: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/mnogosearch php_mnogo.c php_mnogo.h

2004-11-28 Thread Ilia Alshanetsky
Sergey Kartashoff wrote:
ok, i am reverted the patch, sorry.
Thanks.
Ilia
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src / run-tests.php

2004-11-28 Thread Ilia Alshanetsky
iliaa   Sun Nov 28 15:40:16 2004 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  Save test result file inside the build directory.
  
  
  
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.197&r2=1.198&ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.197 php-src/run-tests.php:1.198
--- php-src/run-tests.php:1.197 Mon Sep 27 13:30:46 2004
+++ php-src/run-tests.php   Sun Nov 28 15:40:16 2004
@@ -70,6 +70,9 @@
 exit;
 }
 
+// store current directory
+$CUR_DIR = getcwd();
+
 // change into the PHP source directory.
 
 if (getenv('TEST_PHP_SRCDIR')) {
@@ -508,7 +511,7 @@
$compression = 0;

if ($just_save_results || !mail_qa_team($failed_tests_data, 
$compression, $status)) {
-   $output_file = 'php_test_results_' . date('Ymd_Hi') . ( 
$compression ? '.txt.gz' : '.txt' );
+   $output_file = $CUR_DIR . '/php_test_results_' . 
date('Ymd_Hi') . ( $compression ? '.txt.gz' : '.txt' );
$fp = fopen($output_file, "w");
fwrite($fp, $failed_tests_data);
fclose($fp);

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