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

2003-08-14 Thread Zeev Suraski
zeevTue Aug  5 04:31:56 2003 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  Display the currently running test
  
  
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.168 php-src/run-tests.php:1.169
--- php-src/run-tests.php:1.168 Fri Jul 25 01:51:57 2003
+++ php-src/run-tests.php   Tue Aug  5 04:31:56 2003
@@ -676,6 +676,9 @@
$shortname = str_replace($cwd.'/', '', $file);
$tested = trim($section_text['TEST'])." [$shortname]";
 
+   echo "TEST $tested\r";
+   flush();
+
$tmp = realpath(dirname($file));
$tmp_skipif = $tmp . uniqid('/phpt.');
$tmp_file   = ereg_replace('\.phpt$','.php',$file);



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



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

2003-08-14 Thread Jani Taskinen
sniper  Tue Aug  5 07:54:01 2003 EDT

  Modified files:  
/php-src/ext/ldap   ldap.c 
  Log:
  The last 4 args are by ref..
  
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.143 php-src/ext/ldap/ldap.c:1.144
--- php-src/ext/ldap/ldap.c:1.143   Sun Aug  3 13:44:36 2003
+++ php-src/ext/ldap/ldap.c Tue Aug  5 07:54:01 2003
@@ -22,7 +22,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.143 2003/08/03 17:44:36 zeev Exp $ */
+/* $Id: ldap.c,v 1.144 2003/08/05 11:54:01 sniper Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -83,7 +83,7 @@
ZEND_BEGIN_ARG_INFO(arg3to6of6_force_ref, 0)
ZEND_ARG_PASS_INFO(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)
@@ -299,7 +299,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled");
-   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.143 2003/08/03 
17:44:36 zeev Exp $");
+   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.144 2003/08/05 
11:54:01 sniper Exp $");
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));



-- 
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 versioning.c

2003-08-14 Thread Jani Taskinen
sniper  Tue Aug  5 08:34:49 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   versioning.c 
  Log:
  MFH: - Fixed bug #21611 (version_compare() does not support "p" suffix)
  
Index: php-src/ext/standard/versioning.c
diff -u php-src/ext/standard/versioning.c:1.12.4.1 
php-src/ext/standard/versioning.c:1.12.4.2
--- php-src/ext/standard/versioning.c:1.12.4.1  Tue Dec 31 11:35:35 2002
+++ php-src/ext/standard/versioning.c   Tue Aug  5 08:34:49 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: versioning.c,v 1.12.4.1 2002/12/31 16:35:35 sebastian Exp $ */
+/* $Id: versioning.c,v 1.12.4.2 2003/08/05 12:34:49 sniper Exp $ */
 
 #include 
 #include 
@@ -90,7 +90,7 @@
 compare_special_version_forms(char *form1, char *form2)
 {
int found1 = -1, found2 = -1;
-   special_forms_t special_forms[9] = {
+   special_forms_t special_forms[10] = {
{"dev", 0},
{"alpha", 1},
{"a", 1},
@@ -99,6 +99,7 @@
{"RC", 3},
{"#", 4},
{"pl", 5},
+   {"p", 5},
{NULL, 0},
};
special_forms_t *pp;



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



[PHP-CVS] cvs: php-src /ext/sybase php_sybase_db.c

2003-08-14 Thread Jani Taskinen
sniper  Tue Aug  5 12:02:12 2003 EDT

  Modified files:  
/php-src/ext/sybase php_sybase_db.c 
  Log:
  Fix some more typos
  
Index: php-src/ext/sybase/php_sybase_db.c
diff -u php-src/ext/sybase/php_sybase_db.c:1.51 php-src/ext/sybase/php_sybase_db.c:1.52
--- php-src/ext/sybase/php_sybase_db.c:1.51 Mon Aug  4 10:34:53 2003
+++ php-src/ext/sybase/php_sybase_db.c  Tue Aug  5 12:02:11 2003
@@ -20,7 +20,7 @@
+--+
  */
  
-/* $Id: php_sybase_db.c,v 1.51 2003/08/04 14:34:53 sniper Exp $ */
+/* $Id: php_sybase_db.c,v 1.52 2003/08/05 16:02:11 sniper Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -621,7 +621,7 @@
Select Sybase database */
 PHP_FUNCTION(sybase_select_db)
 {
-   zval *db, **sybase_link_index;
+   zval **db, **sybase_link_index;
int id,type;
sybase_link  *sybase_ptr;

@@ -960,7 +960,7 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING,"%d is not a Sybase result 
index",Z_LVAL_PP(sybase_result_index));
RETURN_FALSE;
}
-   zend_list_delete(Z_LVAL_P(sybase_result_index));
+   zend_list_delete(Z_LVAL_PP(sybase_result_index));
RETURN_TRUE;
 }
 /* }}} */



-- 
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/ftp php_ftp.c

2003-08-14 Thread Zeev Suraski
zeevThu Aug  7 12:03:05 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/ftpphp_ftp.c 
  Log:
  Another broken prototype
  
  
Index: php-src/ext/ftp/php_ftp.c
diff -u php-src/ext/ftp/php_ftp.c:1.74.2.10 php-src/ext/ftp/php_ftp.c:1.74.2.11
--- php-src/ext/ftp/php_ftp.c:1.74.2.10 Thu Aug  7 12:02:04 2003
+++ php-src/ext/ftp/php_ftp.c   Thu Aug  7 12:03:05 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_ftp.c,v 1.74.2.10 2003/08/07 16:02:04 zeev Exp $ */
+/* $Id: php_ftp.c,v 1.74.2.11 2003/08/07 16:03:05 zeev Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -176,7 +176,7 @@
 /* }}} */
 
 #ifdef HAVE_OPENSSL_EXT
-/* {{{ proto resource ftp_ssl_connect(string host [, int port [, int timeout)]])
+/* {{{ proto resource ftp_ssl_connect(string host [, int port [, int timeout]])
Opens a FTP-SSL stream */
 PHP_FUNCTION(ftp_ssl_connect)
 {



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



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

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug  6 09:28:59 2003 EDT

  Modified files:  
/php-srcphp.ini-dist php.ini-recommended 
  Log:
  php_xslt.dll -> php_xsl.dll, removed non-existing php_domxml.dll (bug #24960)
  
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.197 php-src/php.ini-dist:1.198
--- php-src/php.ini-dist:1.197  Wed Jul  9 18:38:46 2003
+++ php-src/php.ini-distWed Aug  6 09:28:59 2003
@@ -538,7 +538,6 @@
 ;extension=php_dba.dll
 ;extension=php_dbase.dll
 ;extension=php_dbx.dll
-;extension=php_domxml.dll
 ;extension=php_exif.dll
 ;extension=php_fdf.dll
 ;extension=php_filepro.dll
@@ -572,7 +571,7 @@
 ;extension=php_sybase_ct.dll
 ;extension=php_w32api.dll
 ;extension=php_xmlrpc.dll
-;extension=php_xslt.dll
+;extension=php_xsl.dll
 ;extension=php_yaz.dll
 ;extension=php_zip.dll
 
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.142 php-src/php.ini-recommended:1.143
--- php-src/php.ini-recommended:1.142   Wed Jul  9 18:38:46 2003
+++ php-src/php.ini-recommended Wed Aug  6 09:28:59 2003
@@ -553,7 +553,6 @@
 ;extension=php_dba.dll
 ;extension=php_dbase.dll
 ;extension=php_dbx.dll
-;extension=php_domxml.dll
 ;extension=php_exif.dll
 ;extension=php_fdf.dll
 ;extension=php_filepro.dll
@@ -587,7 +586,7 @@
 ;extension=php_sybase_ct.dll
 ;extension=php_w32api.dll
 ;extension=php_xmlrpc.dll
-;extension=php_xslt.dll
+;extension=php_xsl.dll
 ;extension=php_yaz.dll
 ;extension=php_zip.dll
 



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



[PHP-CVS] cvs: php-src /ext/standard/tests/time 002.phpt

2003-08-14 Thread Moriyoshi Koizumi
moriyoshi   Thu Aug  7 13:46:18 2003 EDT

  Modified files:  
/php-src/ext/standard/tests/time002.phpt 
  Log:
  Tru64 requires TZ values be POSIX styled.
  # See 
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN3/0247.HTM 
for detail.
  
  
Index: php-src/ext/standard/tests/time/002.phpt
diff -u php-src/ext/standard/tests/time/002.phpt:1.9 
php-src/ext/standard/tests/time/002.phpt:1.10
--- php-src/ext/standard/tests/time/002.phpt:1.9Thu Mar 27 09:23:48 2003
+++ php-src/ext/standard/tests/time/002.phptThu Aug  7 13:46:18 2003
@@ -33,7 +33,12 @@
echo date ("Y-m-d H:i:s\n", strtotime ($date));
}
 
-   putenv ("TZ=US/Eastern");
+   if (PHP_OS === "OSF1") {
+   // POSIX style
+   putenv ("TZ=EST5EDT4,M4.1.0,M10.5.0");
+   } else {
+   putenv ("TZ=US/Eastern");
+   }
foreach ($dates as $date) {
echo date ("Y-m-d H:i:s\n", strtotime ($date));
}



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

2003-08-14 Thread Ilia Alshanetsky
iliaa   Sat Aug  9 12:49:09 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  BFN
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.334 php-src/NEWS:1.1247.2.335
--- php-src/NEWS:1.1247.2.334   Sat Aug  9 11:41:09 2003
+++ php-src/NEWSSat Aug  9 12:49:08 2003
@@ -2,10 +2,14 @@
 |||
 ?? Aug 2003, Version 4.3.3RC4
 - Fixed bug #24989 (external libexpat conflicts with bundled libexpat). (Jani)
+- Fixed bug #24980 (array_reduce() uses first element as default running
+  total). (Ilia)
 - Fixed bug #24977 (Revert mysql_select_db optimization). (Ilia)
 - Fixed bug #24909 (Bad random numbers with ZTS builds on Solaris). (Ilia)
+- Fixed bug #24951 (ob_flush() needlessly destroys output handler). (Ilia)
 - Fixed bug #24792 (--enable-zend-multibyte causes random segfaults with ZTS).
   (fujimoto)
+- Fixed bug #24142 (workaround for a gcc bug affecting round()). (Marcus, Ilia)
 - Fixed bug #24063 (serialize() missing 0 after the . on scientific notation).
   (Marcus, Ilia)
 



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



[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-14 Thread Ard Biesheuvel
abies   Wed Aug  6 21:00:25 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c php_interbase.h 
  Log:
  Fixed crash in _php_ibase_error() after request shutdown
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.119 php-src/ext/interbase/interbase.c:1.120
--- php-src/ext/interbase/interbase.c:1.119 Wed Aug  6 20:00:19 2003
+++ php-src/ext/interbase/interbase.c   Wed Aug  6 21:00:22 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.119 2003/08/07 00:00:19 abies Exp $ */
+/* $Id: interbase.c,v 1.120 2003/08/07 01:00:22 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -34,6 +34,8 @@
  emalloc() with do_alloca()
- Changes to ibase_query() to enable the use of CREATE 
DATABASE ...
- Added ibase_drop_db()
+   - Added ibase_commit_ret() and ibase_rollback_ret()
+   - Added ibase_name_result()
2001-05-31: Jeremy Bettis <[EMAIL PROTECTED]>
- If a blob handle was expected and something else was
  received create a blob and add the value to it.
@@ -575,7 +577,6 @@
ibase_globals->timestampformat = NULL;
ibase_globals->dateformat = NULL;
ibase_globals->timeformat = NULL;
-   ibase_globals->errmsg = NULL;
ibase_globals->num_persistent = 0;
 }
 
@@ -632,10 +633,7 @@
}
IBG(timeformat) = DL_STRDUP(IBG(cfg_timeformat));
 
-   if (IBG(errmsg)) {
-   DL_FREE(IBG(errmsg));
-   }
-   IBG(errmsg) = DL_MALLOC(sizeof(char)*MAX_ERRMSG+1);
+   RESET_ERRMSG;
 
return SUCCESS;
 }
@@ -663,11 +661,6 @@
}
IBG(timeformat) = NULL;
 
-   if (IBG(errmsg)) {
-   DL_FREE(IBG(errmsg));
-   }
-   IBG(errmsg) = NULL;
-
return SUCCESS;
 } 
  
@@ -677,7 +670,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.119 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.120 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.38 
php-src/ext/interbase/php_interbase.h:1.39
--- php-src/ext/interbase/php_interbase.h:1.38  Wed Aug  6 13:51:46 2003
+++ php-src/ext/interbase/php_interbase.h   Wed Aug  6 21:00:22 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_interbase.h,v 1.38 2003/08/06 17:51:46 abies Exp $ */
+/* $Id: php_interbase.h,v 1.39 2003/08/07 01:00:22 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -102,7 +102,7 @@
char *cfg_dateformat;
char *timeformat;
char *cfg_timeformat;
-   char *errmsg;
+   char errmsg[MAX_ERRMSG];
 ZEND_END_MODULE_GLOBALS(ibase)
 
 typedef struct {



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



[PHP-CVS] cvs: spl / spl_array.c spl_engine.c spl_engine.h spl_foreach.c

2003-08-14 Thread Marcus Boerger
helly   Thu Aug  7 18:43:01 2003 EDT

  Modified files:  
/splspl_array.c spl_engine.c spl_engine.h spl_foreach.c 
  Log:
  - Reduce number of c-functions/macros involved in function invocation
  - Unify names of remaining c-function/macro names
  
  
Index: spl/spl_array.c
diff -u spl/spl_array.c:1.16 spl/spl_array.c:1.17
--- spl/spl_array.c:1.16Thu Aug  7 18:19:50 2003
+++ spl/spl_array.c Thu Aug  7 18:43:01 2003
@@ -66,7 +66,7 @@
zval *dim = spl_get_zval_ptr(op2, Ts, &EG(free_op2) TSRMLS_CC);
zval *exists;
 
-   spl_begin_method_call_arg_ex1(obj, obj_ce, NULL, "exists", 
sizeof("exists")-1, &exists, dim);
+   spl_call_method_1(obj, obj_ce, NULL, "exists", sizeof("exists")-1, 
&exists, dim);
if (!i_zend_is_true(exists)) {
if (type == BP_VAR_R || type == BP_VAR_RW) {
SEPARATE_ZVAL(&dim);
@@ -85,7 +85,7 @@
}
DELETE_RET_ZVAL(exists);
if (type == BP_VAR_R || type == BP_VAR_IS) {
-   spl_begin_method_call_arg_ex1(obj, obj_ce, NULL, "get", 
sizeof("get")-1, retval, dim);
+   spl_call_method_1(obj, obj_ce, NULL, "get", sizeof("get")-1, 
retval, dim);
}
FREE_OP(Ts, op2, EG(free_op2));
return 0;
@@ -210,7 +210,7 @@
value->refcount = 0;
}
 
-   spl_begin_method_call_arg_ex2(obj, obj_ce, NULL, "set", 
sizeof("set")-1, &retval, index, value);
+   spl_call_method_2(obj, obj_ce, NULL, "set", sizeof("set")-1, &retval, 
index, value);
 
if (index == &tmp) {
zval_dtor(index);
@@ -284,7 +284,7 @@
break;
}
 
-   spl_begin_method_call_arg_ex1(obj, obj_ce, NULL, "del", 
sizeof("del")-1, &retval, index);
+   spl_call_method_1(obj, obj_ce, NULL, "del", sizeof("del")-1, &retval, 
index);
 
if (index == &tmp) {
zval_dtor(index);
Index: spl/spl_engine.c
diff -u spl/spl_engine.c:1.12 spl/spl_engine.c:1.13
--- spl/spl_engine.c:1.12   Thu Aug  7 18:19:50 2003
+++ spl/spl_engine.cThu Aug  7 18:43:01 2003
@@ -176,6 +176,7 @@
int result;
zend_fcall_info fci;
zval z_fname;
+   zval *retval;
 
zval **params[2];
 
@@ -186,7 +187,7 @@
/*fci.function_table = NULL; will be read form zend_class_entry of object if 
needed */
fci.object_pp = object_pp;
fci.function_name = &z_fname;
-   fci.retval_ptr_ptr = retval_ptr;
+   fci.retval_ptr_ptr = retval_ptr ? retval_ptr : &retval;
fci.param_count = param_count;
fci.params = params;
fci.no_separation = 1;
@@ -215,6 +216,10 @@
fcic.object_pp = object_pp;
result = zend_call_function(&fci, &fcic TSRMLS_CC);
}
+   }
+   if (!retval_ptr && fci.retval_ptr_ptr) {
+   zval_dtor(*fci.retval_ptr_ptr);
+   FREE_ZVAL(*fci.retval_ptr_ptr);
}
return result;
 }
Index: spl/spl_engine.h
diff -u spl/spl_engine.h:1.9 spl/spl_engine.h:1.10
--- spl/spl_engine.h:1.9Thu Aug  7 18:19:50 2003
+++ spl/spl_engine.hThu Aug  7 18:43:01 2003
@@ -49,40 +49,13 @@
 }
 /* }}} */
 
-/* {{{ spl_begin_method_call_arg */
-static inline int spl_begin_method_call_arg(zval **obj, zend_class_entry *obj_ce, 
zend_function **fn_proxy, char *function_name, int fname_len, zval *retval, zval *arg1 
TSRMLS_DC)
-{
-   zval *local_retval;
-   int ret = spl_call_method(obj, obj_ce, fn_proxy, function_name, fname_len, 
&local_retval, 1, arg1, NULL TSRMLS_CC);
-   if (local_retval) {
-   COPY_PZVAL_TO_ZVAL(*retval, local_retval);
-   } else {
-   INIT_ZVAL(*retval);
-   }
-   return ret;
-}
-/* }}} */
-
-/* {{{ spl_begin_method_call_no_retval */
-static inline int spl_begin_method_call_no_retval(zval **obj, zend_class_entry 
*obj_ce, zend_function **fn_proxy, char *function_name, int fname_len TSRMLS_DC)
-{
-   zval *retval;
-   int ret = spl_call_method(obj, obj_ce, fn_proxy, function_name, fname_len, 
&retval, 0, NULL, NULL TSRMLS_CC);
-   if (retval) {
-   zval_dtor(retval);
-   FREE_ZVAL(retval);
-   }
-   return ret;
-}
-/* }}} */
-
-#define spl_begin_method_call_ex(obj, obj_ce, fn_proxy, function_name, fname_len, 
retval) \
+#define spl_call_method_0(obj, obj_ce, fn_proxy, function_name, fname_len, retval) \
spl_call_method(obj, obj_ce, fn_proxy, function_name, fname_len, retval, 0, 
NULL, NULL TSRMLS_CC)
 
-#define spl_begin_method_call_arg_ex1(obj, obj_ce, fn_proxy, function_name, 
fname_len, retval, arg1) \
+#define spl_call_method_1(obj, obj_ce, fn_proxy, function_name, fname_len, retval, 
arg1) \
spl_

[PHP-CVS] cvs: php-src(PHP_4_3) /main output.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Fri Aug  8 19:44:05 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/main   output.c 
  Log:
  MFH: Fixed bug #24951 (ob_flush() needlessly destroys output handler).
  
  
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.142.2.14 php-src/main/output.c:1.142.2.15
--- php-src/main/output.c:1.142.2.14Thu Jul 31 15:48:05 2003
+++ php-src/main/output.c   Fri Aug  8 19:44:04 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.142.2.14 2003/07/31 19:48:05 iliaa Exp $ */
+/* $Id: output.c,v 1.142.2.15 2003/08/08 23:44:04 iliaa Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -247,7 +247,9 @@
}
}
OG(ob_lock) = 0;
-   zval_ptr_dtor(&OG(active_ob_buffer).output_handler);
+   if (!just_flush) {
+   zval_ptr_dtor(&OG(active_ob_buffer).output_handler);
+   }
orig_buffer->refcount -=2;
if (orig_buffer->refcount <= 0) { /* free the zval */
zval_dtor(orig_buffer);



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



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

2003-08-14 Thread Marcus Boerger
helly   Fri Aug  8 15:47:30 2003 EDT

  Modified files:  
/php-src/main   snprintf.c 
  Log:
  Bugfix #24063 (marcus/ilia)
  
Index: php-src/main/snprintf.c
diff -u php-src/main/snprintf.c:1.25 php-src/main/snprintf.c:1.26
--- php-src/main/snprintf.c:1.25Thu Jul 17 17:26:25 2003
+++ php-src/main/snprintf.c Fri Aug  8 15:47:30 2003
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: snprintf.c,v 1.25 2003/07/17 21:26:25 helly Exp $ */
+/* $Id: snprintf.c,v 1.26 2003/08/08 19:47:30 helly Exp $ */
 
 /* 
  * Copyright (c) 1995-1998 The Apache Group.  All rights reserved.
@@ -344,9 +344,17 @@
buf[0] = '\0';
return (buf);
}
-   while (p <= p1 && p < &buf[NDIG]) {
+   if (p <= p1 && p < &buf[NDIG]) {
arg = modf(arg * 10, &fj);
-   *p++ = (int) fj + '0';
+   if ((int)fj==10) {
+   *p++ = '1';
+   fj = 0;
+   *decpt = ++r2;
+   }
+   while (p <= p1 && p < &buf[NDIG]) {
+   *p++ = (int) fj + '0';
+   arg = modf(arg * 10, &fj);
+   }
}
if (p1 >= &buf[NDIG]) {
buf[NDIG - 1] = '\0';



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



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

2003-08-14 Thread Moriyoshi Koizumi
I don't think using 0 as the initial value by default is a good idea.
because array_reduce() can take any kind of element other than integer.



[Before this patch]
string(3) "abc"

[After this patch]
string(4) "0abc"

Those results imply a significant BC break. I don't know what *is* the 
correct behaviour though.

Moriyoshi

"Ilia Alshanetsky" <[EMAIL PROTECTED]> wrote:

> iliaa Fri Aug  8 19:50:36 2003 EDT
> 
>   Modified files:  
> /php-src/ext/standard array.c 
>   Log:
>   Fixed bug #24980 (array_reduce() uses first element as default running
>   total).
>   Fixed memory leak that can be replicated using the function example on 
>   http://www.php.net/array_reduce
>   
>   
> Index: php-src/ext/standard/array.c
> diff -u php-src/ext/standard/array.c:1.238 php-src/ext/standard/array.c:1.239
> --- php-src/ext/standard/array.c:1.238Tue Aug  5 06:29:03 2003
> +++ php-src/ext/standard/array.c  Fri Aug  8 19:50:36 2003
> @@ -21,7 +21,7 @@
> +--+
>  */
>  
> -/* $Id: array.c,v 1.238 2003/08/05 10:29:03 zeev Exp $ */
> +/* $Id: array.c,v 1.239 2003/08/08 23:50:36 iliaa Exp $ */
>  
>  #include "php.h"
>  #include "php_ini.h"
> @@ -3374,7 +3374,9 @@
>  
>   if (ZEND_NUM_ARGS() > 2) {
>   result = *initial;
> - zval_add_ref(&result);
> + } else {
> + MAKE_STD_ZVAL(result);
> + ZVAL_LONG(result, 0);
>   }
>  
>   /* (zval **)input points to an element of argument stack
> 
> 
> 
> -- 
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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



[PHP-CVS] cvs: php-src(PHP_4_3) /main php_compat.h

2003-08-14 Thread Jani Taskinen
sniper  Sat Aug  9 10:26:40 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/main   php_compat.h 
  Log:
  - Fix possible crashes if PHP is linked with external libexpat and also
the bundled one is compiled in.
  
  
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.11.4.4 php-src/main/php_compat.h:1.11.4.5
--- php-src/main/php_compat.h:1.11.4.4  Fri Jul 25 07:27:39 2003
+++ php-src/main/php_compat.h   Sat Aug  9 10:26:40 2003
@@ -49,7 +49,9 @@
 #define XmlGetUtf8InternalEncodingNS php_XmlGetUtf8InternalEncodingNS
 #define XmlGetUtf8InternalEncoding php_XmlGetUtf8InternalEncoding
 #define XmlInitEncoding php_XmlInitEncoding
+#define XmlInitEncodingNS php_XmlInitEncodingNS
 #define XmlInitUnknownEncoding php_XmlInitUnknownEncoding
+#define XmlInitUnknownEncodingNS php_XmlInitUnknownEncodingNS
 #define XML_ParseBuffer php_XML_ParseBuffer
 #define XML_Parse php_XML_Parse
 #define XML_ParserCreate_MM php_XML_ParserCreate_MM
@@ -57,6 +59,7 @@
 #define XML_ParserCreate php_XML_ParserCreate
 #define XML_ParserFree php_XML_ParserFree
 #define XmlParseXmlDecl php_XmlParseXmlDecl
+#define XmlParseXmlDeclNS php_XmlParseXmlDeclNS
 #define XmlPrologStateInitExternalEntity php_XmlPrologStateInitExternalEntity
 #define XmlPrologStateInit php_XmlPrologStateInit
 #define XML_SetAttlistDeclHandler php_XML_SetAttlistDeclHandler
@@ -95,6 +98,13 @@
 #define XML_UseParserAsHandlerArg php_XML_UseParserAsHandlerArg
 #define XmlUtf16Encode php_XmlUtf16Encode
 #define XmlUtf8Encode php_XmlUtf8Encode
+#define XML_FreeContentModel php_XML_FreeContentModel
+#define XML_MemMalloc php_XML_MemMalloc
+#define XML_MemRealloc php_XML_MemRealloc
+#define XML_MemFree php_XML_MemFree
+#define XML_UseForeignDTD php_XML_UseForeignDTD
+#define XML_GetFeatureList php_XML_GetFeatureList
+#define XML_ParserReset php_XML_ParserReset
 #endif
 
 #ifdef PHP_EXPORTS



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



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

2003-08-14 Thread Ilia Alshanetsky
I'll make it set the defaut value to NULL, that addresses the problem you've 
described and maintains acceptable behaviour for the original problem.

Ilia

On August 9, 2003 02:09 am, Moriyoshi Koizumi wrote:
> I don't think using 0 as the initial value by default is a good idea.
> because array_reduce() can take any kind of element other than integer.
>
>  $a = array("a", "b", "c");
> $lambda = create_function('$a, $b', 'return $a . $b;');
> var_dump(array_reduce($a, $lambda));
> ?>
>
> [Before this patch]
> string(3) "abc"
>
> [After this patch]
> string(4) "0abc"
>
> Those results imply a significant BC break. I don't know what *is* the
> correct behaviour though.
>
> Moriyoshi
>
> "Ilia Alshanetsky" <[EMAIL PROTECTED]> wrote:
> > iliaa   Fri Aug  8 19:50:36 2003 EDT
> >
> >   Modified files:
> > /php-src/ext/standard   array.c
> >   Log:
> >   Fixed bug #24980 (array_reduce() uses first element as default running
> >   total).
> >   Fixed memory leak that can be replicated using the function example on
> >   http://www.php.net/array_reduce
> >
> >
> > Index: php-src/ext/standard/array.c
> > diff -u php-src/ext/standard/array.c:1.238
> > php-src/ext/standard/array.c:1.239 ---
> > php-src/ext/standard/array.c:1.238  Tue Aug  5 06:29:03 2003
> > +++ php-src/ext/standard/array.cFri Aug  8 19:50:36 2003
> > @@ -21,7 +21,7 @@
> >
> > +--+
> > */
> >
> > -/* $Id: array.c,v 1.238 2003/08/05 10:29:03 zeev Exp $ */
> > +/* $Id: array.c,v 1.239 2003/08/08 23:50:36 iliaa Exp $ */
> >
> >  #include "php.h"
> >  #include "php_ini.h"
> > @@ -3374,7 +3374,9 @@
> >
> > if (ZEND_NUM_ARGS() > 2) {
> > result = *initial;
> > -   zval_add_ref(&result);
> > +   } else {
> > +   MAKE_STD_ZVAL(result);
> > +   ZVAL_LONG(result, 0);
> > }
> >
> > /* (zval **)input points to an element of argument stack
> >
> >
> >
> > --
> > PHP CVS Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php


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



[PHP-CVS] cvs: php-src /tests/classes private_members.phpt

2003-08-14 Thread Ilia Alshanetsky
iliaa   Sat Aug  9 16:13:44 2003 EDT

  Modified files:  
/php-src/tests/classes  private_members.phpt 
  Log:
   
 --FILE--
-http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2003-08-14 Thread Jani Taskinen
sniper  Sun Aug 10 21:57:11 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/zlib   zlib.c 
  Log:
  MFH: nuked unused variable
  
Index: php-src/ext/zlib/zlib.c
diff -u php-src/ext/zlib/zlib.c:1.153.2.12 php-src/ext/zlib/zlib.c:1.153.2.13
--- php-src/ext/zlib/zlib.c:1.153.2.12  Sat Aug  9 07:22:40 2003
+++ php-src/ext/zlib/zlib.c Sun Aug 10 21:57:10 2003
@@ -18,7 +18,7 @@
|  Jade Nicoletti <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: zlib.c,v 1.153.2.12 2003/08/09 11:22:40 derick Exp $ */
+/* $Id: zlib.c,v 1.153.2.13 2003/08/11 01:57:10 sniper Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -330,7 +330,6 @@
 {
pval **arg1, **arg2, **arg3;
php_stream *stream;
-   char *p;
int use_include_path = 0;

switch(ZEND_NUM_ARGS()) {



-- 
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 /win32 sendmail.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 11 12:38:09 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/win32  sendmail.c 
/php-srcNEWS 
  Log:
  MFH: Fixed bug #25037 (Possible infinite loop inside SendText())
  
  
Index: php-src/win32/sendmail.c
diff -u php-src/win32/sendmail.c:1.47.2.5 php-src/win32/sendmail.c:1.47.2.6
--- php-src/win32/sendmail.c:1.47.2.5   Wed Jul 23 12:03:27 2003
+++ php-src/win32/sendmail.cMon Aug 11 12:38:08 2003
@@ -17,7 +17,7 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.47.2.5 2003/07/23 16:03:27 iliaa Exp $ */
+/* $Id: sendmail.c,v 1.47.2.6 2003/08/11 16:38:08 iliaa Exp $ */
 
 #include "php.h"   /*php specific */
 #include 
@@ -623,6 +623,7 @@
i = data_cln_len - (parts * 1024);
strlcpy(Buffer, p, i);
Buffer[i] = '\0';
+   parts++;
goto send_chunk;
}
}
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.338 php-src/NEWS:1.1247.2.339
--- php-src/NEWS:1.1247.2.338   Mon Aug 11 00:57:55 2003
+++ php-src/NEWSMon Aug 11 12:38:08 2003
@@ -1,6 +1,7 @@
 PHP 4  NEWS
 |||
 ?? Aug 2003, Version 4.3.3RC4
+- Fixed bug #25037 (Possible infinite loop inside SendText()). (Ilia)
 - Fixed bug #25007 (rand() & mt_rand() seed RNG every call). (Jani)
 - Fixed bug #24989 (external libexpat conflicts with bundled libexpat). (Jani)
 - Fixed bug #24980 (array_reduce() uses first element as default running



-- 
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/odbc php_odbc.c

2003-08-14 Thread Jani Taskinen
sniper  Sun Aug 10 22:08:32 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/odbc   php_odbc.c 
  Log:
  MFH: fix compile warning
  
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.143.2.13 php-src/ext/odbc/php_odbc.c:1.143.2.14
--- php-src/ext/odbc/php_odbc.c:1.143.2.13  Mon Jul 14 12:13:30 2003
+++ php-src/ext/odbc/php_odbc.c Sun Aug 10 22:08:32 2003
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.143.2.13 2003/07/14 16:13:30 sniper Exp $ */
+/* $Id: php_odbc.c,v 1.143.2.14 2003/08/11 02:08:32 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1232,7 +1232,7 @@
 
 }
 /* }}} */
-#endif /* HAVE_SQLDATASOURCES *
+#endif /* HAVE_SQLDATASOURCES */
 
 /* {{{ proto resource odbc_exec(resource connection_id, string query [, int flags])
Prepare and execute an SQL statement */



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



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

2003-08-14 Thread Jani Taskinen
sniper  Mon Aug 11 22:11:42 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  fix build
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.128 php-src/ext/interbase/interbase.c:1.129
--- php-src/ext/interbase/interbase.c:1.128 Mon Aug 11 20:55:57 2003
+++ php-src/ext/interbase/interbase.c   Mon Aug 11 22:11:41 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.128 2003/08/12 00:55:57 iliaa Exp $ */
+/* $Id: interbase.c,v 1.129 2003/08/12 02:11:41 sniper Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -687,7 +687,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.128 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.129 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -799,7 +799,7 @@
WRONG_PARAM_COUNT;
}

-   args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS());
+   args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0);
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
RETURN_FALSE;



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



Re: [PHP-CVS] cvs: php-src /ext/standard/tests/array bug21918.phptZendEngine2 zend_hash.c zend_hash.h

2003-08-14 Thread Moriyoshi Koizumi
"Marcus Boerger" <[EMAIL PROTECTED]> wrote:

>   ulong idx;

> - idx = strtol(key, NULL, 10);

Why not use "long" instead of ulong as it seems more appropriate?

Moriyoshi


-- 
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) /main SAPI.c

2003-08-14 Thread Marcus Boerger
helly   Mon Aug 11 15:40:52 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/main   SAPI.c 
  Log:
  MFH: Bugfix #25044
  
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.155.2.11 php-src/main/SAPI.c:1.155.2.12
--- php-src/main/SAPI.c:1.155.2.11  Wed Jun 18 17:58:07 2003
+++ php-src/main/SAPI.c Mon Aug 11 15:40:52 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.155.2.11 2003/06/18 21:58:07 sniper Exp $ */
+/* $Id: SAPI.c,v 1.155.2.12 2003/08/11 19:40:52 helly Exp $ */
 
 #include 
 #include 
@@ -575,8 +575,9 @@
efree(mimetype);
SG(sapi_headers).send_default_content_type = 0;
} else if (!STRCASECMP(header_line, "Location")) {
-   if (SG(sapi_headers).http_response_code < 300 ||
-   SG(sapi_headers).http_response_code > 307) {
+   if ((SG(sapi_headers).http_response_code < 300 ||
+   SG(sapi_headers).http_response_code > 307) &&
+   SG(sapi_headers).http_response_code != 201) {
/* Return a Found Redirect if one is not 
already specified */
sapi_update_response_code(302 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_4_3) / NEWS /win32 sendmail.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 11 14:08:35 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/win32  sendmail.c 
  Log:
  MFH: Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
  situations). (Ilia)
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.339 php-src/NEWS:1.1247.2.340
--- php-src/NEWS:1.1247.2.339   Mon Aug 11 12:38:08 2003
+++ php-src/NEWSMon Aug 11 14:08:34 2003
@@ -16,6 +16,8 @@
 - Fixed bug #24142 (workaround for a gcc bug affecting round()). (Marcus, Ilia)
 - Fixed bug #24063 (serialize() missing 0 after the . on scientific notation).
   (Marcus, Ilia)
+- Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
+  situations). (Ilia)
 - Fixed bug #21957 (serialize() mangles objects with __sleep). (Ilia)
 
 07 Aug 2003, Version 4.3.3RC3
Index: php-src/win32/sendmail.c
diff -u php-src/win32/sendmail.c:1.47.2.6 php-src/win32/sendmail.c:1.47.2.7
--- php-src/win32/sendmail.c:1.47.2.6   Mon Aug 11 12:38:08 2003
+++ php-src/win32/sendmail.cMon Aug 11 14:08:35 2003
@@ -17,7 +17,7 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.47.2.6 2003/08/11 16:38:08 iliaa Exp $ */
+/* $Id: sendmail.c,v 1.47.2.7 2003/08/11 18:08:35 iliaa Exp $ */
 
 #include "php.h"   /*php specific */
 #include 
@@ -856,11 +856,11 @@
/* Check for newline */
Index += rlen;

-   if ((buf[Received - 4] == ' ' && buf[Received - 3] == '-') ||
-   (buf[Received - 2] != '\r') || (buf[Received - 1] != '\n'))
-   /* err_msg  fprintf(stderr,"Incomplete server message. 
Awaiting CRLF\n"); */
-   goto again; /* Incomplete data. Line must 
be terminated by CRLF
-  And not contain a space followed by a '-' */
+   /* SMPT RFC says \r\n is the only valid line ending, who are we to argue ;)
+* The response code must contain at least 5 characters ex. 220\r\n */
+   if (Received < 5 || buf[Received - 1] != '\n' || buf[Received - 2] != '\r') {
+   goto again;
+   }
 
if (buf[0] > '3') {
/* If we've a valid pointer, return the SMTP server response so the 
error message contains more information */



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



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

2003-08-14 Thread Jani Taskinen
sniper  Sun Aug 10 21:54:44 2003 EDT

  Modified files:  
/php-src/ext/ming   ming.c 
  Log:
  Fix the compile warnings properly
  
Index: php-src/ext/ming/ming.c
diff -u php-src/ext/ming/ming.c:1.53 php-src/ext/ming/ming.c:1.54
--- php-src/ext/ming/ming.c:1.53Sun Aug 10 16:39:18 2003
+++ php-src/ext/ming/ming.c Sun Aug 10 21:54:44 2003
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: ming.c,v 1.53 2003/08/10 20:39:18 helly Exp $ */
+/* $Id: ming.c,v 1.54 2003/08/11 01:54:44 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1441,8 +1441,10 @@
 PHP_FUNCTION(swfmovie_output)
 {
SWFMovie movie = getMovie(getThis() TSRMLS_CC);
-
 #ifdef HAVE_MING_ZLIB
+   zval **zlimit = NULL;
+   int limit = -1;
+
if (zend_get_parameters_ex(1, &zlimit) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1476,6 +1478,10 @@
 PHP_FUNCTION(swfmovie_saveToFile)
 {
zval **x;
+#ifdef HAVE_MING_ZLIB
+   zval **zlimit = NULL;
+   int limit = -1;
+#endif
SWFMovie movie = getMovie(getThis() TSRMLS_CC);
php_stream *what;
 
@@ -1514,6 +1520,10 @@
 PHP_FUNCTION(swfmovie_save)
 {
zval **x;
+#ifdef HAVE_MING_ZLIB
+   zval **zlimit = NULL;
+   int limit = -1;
+#endif
long retval;
php_stream *stream;
 



-- 
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 basic_functions.c crypt.c

2003-08-14 Thread Jani Taskinen
sniper  Sun Aug 10 20:53:26 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   basic_functions.c crypt.c 
  Log:
  MFH: moved RINIT(crypt) stuff to crypt() itself.
  
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.543.2.20 
php-src/ext/standard/basic_functions.c:1.543.2.21
--- php-src/ext/standard/basic_functions.c:1.543.2.20   Thu Jul 24 04:04:20 2003
+++ php-src/ext/standard/basic_functions.c  Sun Aug 10 20:53:26 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.543.2.20 2003/07/24 08:04:20 zeev Exp $ */
+/* $Id: basic_functions.c,v 1.543.2.21 2003/08/11 00:53:26 sniper Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1123,10 +1123,6 @@
}
 #endif
BG(user_shutdown_function_names) = NULL;
-
-#if HAVE_CRYPT
-   PHP_RINIT(crypt) (INIT_FUNC_ARGS_PASSTHRU);
-#endif
 
PHP_RINIT(lcg) (INIT_FUNC_ARGS_PASSTHRU);
 
Index: php-src/ext/standard/crypt.c
diff -u php-src/ext/standard/crypt.c:1.55.8.1 php-src/ext/standard/crypt.c:1.55.8.2
--- php-src/ext/standard/crypt.c:1.55.8.1   Tue Dec 31 11:35:25 2002
+++ php-src/ext/standard/crypt.cSun Aug 10 20:53:26 2003
@@ -17,7 +17,7 @@
|  Rasmus Lerdorf <[EMAIL PROTECTED]> |
+--+
  */
-/* $Id: crypt.c,v 1.55.8.1 2002/12/31 16:35:25 sebastian Exp $ */
+/* $Id: crypt.c,v 1.55.8.2 2003/08/11 00:53:26 sniper Exp $ */
 #include 
 
 #include "php.h"
@@ -89,8 +89,6 @@
 
 #define PHP_CRYPT_RAND php_rand(TSRMLS_C)
 
-static int php_crypt_rand_seeded=0;
-
 PHP_MINIT_FUNCTION(crypt)
 {
REGISTER_LONG_CONSTANT("CRYPT_SALT_LENGTH", PHP_MAX_SALT_LEN, CONST_CS | 
CONST_PERSISTENT);
@@ -103,16 +101,6 @@
 }
 
 
-PHP_RINIT_FUNCTION(crypt)
-{
-   if(!php_crypt_rand_seeded) {
-   php_srand(time(0) * getpid() * (unsigned long) 
(php_combined_lcg(TSRMLS_C) * 1.0) TSRMLS_CC);
-   php_crypt_rand_seeded=1;
-   } 
-   return SUCCESS;
-}
-
-
 static unsigned char itoa64[] = 
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
 static void php_to64(char *s, long v, int n)
@@ -130,6 +118,10 @@
char salt[PHP_MAX_SALT_LEN+1];
char *str, *salt_in = NULL;
int str_len, salt_in_len;
+
+   if (!BG(rand_is_seeded)) {
+   php_srand(GENERATE_SEED() TSRMLS_CC);
+   } 
 
salt[0]=salt[PHP_MAX_SALT_LEN]='\0';
/* This will produce suitable results if people depend on DES-encryption



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



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

2003-08-14 Thread Ard Biesheuvel
abies   Tue Aug 12 07:35:26 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Added comment in code :-)
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.132 php-src/ext/interbase/interbase.c:1.133
--- php-src/ext/interbase/interbase.c:1.132 Tue Aug 12 07:27:03 2003
+++ php-src/ext/interbase/interbase.c   Tue Aug 12 07:35:26 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.132 2003/08/12 11:27:03 abies Exp $ */
+/* $Id: interbase.c,v 1.133 2003/08/12 11:35:26 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -687,7 +687,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.132 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.133 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -2201,6 +2201,20 @@
Returns the number of rows in a result */
 PHP_FUNCTION(ibase_num_rows) 
 {
+   /**
+* This function relies on the InterBase API function isc_dsql_sql_info()
+* which has a couple of limitations (which I hope will be fixed in
+* future releases of Firebird):
+* - row count is always zero before the first fetch;
+* - row count for SELECT ... FOR UPDATE is broken -> never returns a
+*   higher number than the number of records fetched so far;
+* - row count for other statements is merely a lower bound on the number
+*   of records => calling ibase_num_rows() again after a couple of fetches
+*   will most likely return a new (higher) figure for large result sets.
+*
+* 12-aug-2003 Ard Biesheuvel
+*/
+   
zval **result_arg;
ibase_result *ib_result;
char info_count[] = {isc_info_sql_records}, result[64];



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



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

2003-08-14 Thread Ilia Alshanetsky
iliaa   Tue Aug 12 00:19:07 2003 EDT

  Modified files:  
/php-src/ext/iconv  iconv.c 
  Log:
  Fix compiler warnings.
  
  
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.94 php-src/ext/iconv/iconv.c:1.95
--- php-src/ext/iconv/iconv.c:1.94  Wed Jul 30 17:56:45 2003
+++ php-src/ext/iconv/iconv.c   Tue Aug 12 00:19:06 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.94 2003/07/30 21:56:45 sniper Exp $ */
+/* $Id: iconv.c,v 1.95 2003/08/12 04:19:06 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -243,7 +243,7 @@
 
out_p = (d)->c + (d)->len;
 
-   if (iconv(cd, &in_p, &in_left, (char **) &out_p, &out_left) == 
(size_t)-1) {
+   if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, 
&out_left) == (size_t)-1) {
 #if ICONV_SUPPORTS_ERRNO
switch (errno) { 
case EINVAL:
@@ -403,7 +403,7 @@
out_p = out_buf;
 
while (in_left > 0) {
-   result = iconv(cd, (const char **) &in_p, &in_left, (char **) &out_p, 
&out_left);
+   result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, 
&out_left);
out_size = bsz - out_left;
if (result == (size_t)(-1)) {
if (errno == E2BIG && in_left > 0) {
@@ -517,7 +517,7 @@
 
prev_in_left = in_left;
 
-   if (iconv(cd, &in_p, &in_left, (char **) &out_p, &out_left) == 
(size_t)-1) {
+   if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) 
== (size_t)-1) {
if (prev_in_left == in_left) {
break;
}
@@ -617,7 +617,7 @@
 
prev_in_left = in_left;
 
-   if (iconv(cd1, &in_p, &in_left, (char **) &out_p, &out_left) == 
(size_t)-1) {
+   if (iconv(cd1, (char **)&in_p, &in_left, (char **) &out_p, &out_left) 
== (size_t)-1) {
if (prev_in_left == in_left) {
break;
}
@@ -748,7 +748,7 @@
 
prev_in_left = in_left;
 
-   if (iconv(cd, &in_p, &in_left, (char **) &out_p, &out_left) == 
(size_t)-1) {
+   if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) 
== (size_t)-1) {
if (prev_in_left == in_left) {
 #if ICONV_SUPPORTS_ERRNO
switch (errno) {
@@ -982,7 +982,7 @@
 
out_left = out_size - out_reserved;
 
-   if (iconv(cd, &in_p, &in_left, (char **) 
&out_p, &out_left) == (size_t)-1) {
+   if (iconv(cd, (char **)&in_p, &in_left, (char 
**) &out_p, &out_left) == (size_t)-1) {
 #if ICONV_SUPPORTS_ERRNO
switch (errno) {
case EINVAL:
@@ -1070,7 +1070,7 @@
out_p = buf;
out_left = out_size = 1;
 
-   if (iconv(cd, &in_p, &in_left, (char **) 
&out_p, &out_left) == (size_t)-1) {
+   if (iconv(cd, (char **)&in_p, &in_left, (char 
**) &out_p, &out_left) == (size_t)-1) {
 #if ICONV_SUPPORTS_ERRNO
switch (errno) {
case EINVAL:



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



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

2003-08-14 Thread Andrey Hristov
andrey  Tue Aug 12 07:37:40 2003 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  proto fixes(Mehdi Achour)
  
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.214 php-src/ext/oci8/oci8.c:1.215
--- php-src/ext/oci8/oci8.c:1.214   Mon Aug 11 20:55:57 2003
+++ php-src/ext/oci8/oci8.c Tue Aug 12 07:37:40 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.214 2003/08/12 00:55:57 iliaa Exp $ */
+/* $Id: oci8.c,v 1.215 2003/08/12 11:37:40 andrey Exp $ */
 
 /* TODO list:
  *
@@ -644,7 +644,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.214 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.215 $");
 #ifndef PHP_WIN32
php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION );
php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
@@ -3985,7 +3985,7 @@
 /* }}} */
 
 /* {{{ proto bool ocicancel(resource stmt)
-   Prepare a new row of data for reading */
+   Cancel reading from a cursor */
 
 PHP_FUNCTION(ocicancel)
 {
@@ -4096,9 +4096,8 @@
 
 /* }}} */
 
-/* {{{ proto int ocifetchstatement(resource stmt, array &output[, int skip][, int 
maxrows][, int flags])
+/* {{{ proto int ocifetchstatement(resource stmt, array &output[, int skip[, int 
maxrows[, int flags]]])
Fetch all rows of result data into an array */
-
 PHP_FUNCTION(ocifetchstatement)
 {
zval **stmt, **array, *element, **zskip, **zmaxrows, **zflags, *tmp;
@@ -4537,9 +4536,8 @@
 
 /* }}} */
 
-/* {{{ proto int ocinewcursor(resource conn)
+/* {{{ proto resource ocinewcursor(resource conn)
Return a new cursor (Statement-Handle) - use this to bind ref-cursors! */
-
 PHP_FUNCTION(ocinewcursor)
 {
zval **conn;



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



[PHP-CVS] cvs: php-src /main network.c /win32 select.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 11 20:58:53 2003 EDT

  Modified files:  
/php-src/main   network.c 
/php-src/win32  select.c 
  Log:
  emalloc -> safe_emalloc
  
  
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.102 php-src/main/network.c:1.103
--- php-src/main/network.c:1.102Sun Aug 10 17:30:36 2003
+++ php-src/main/network.c  Mon Aug 11 20:58:52 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.102 2003/08/10 21:30:36 helly Exp $ */
+/* $Id: network.c,v 1.103 2003/08/12 00:58:52 iliaa Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -240,7 +240,7 @@
in = *((struct in_addr *) host_info->h_addr);
}
 
-   *sal = emalloc(2 * sizeof(*sal));
+   *sal = safe_emalloc(2, sizeof(*sal), 0);
sap = *sal;
*sap = emalloc(sizeof(struct sockaddr_in));
(*sap)->sa_family = AF_INET;
Index: php-src/win32/select.c
diff -u php-src/win32/select.c:1.4 php-src/win32/select.c:1.5
--- php-src/win32/select.c:1.4  Tue Jun 10 16:03:46 2003
+++ php-src/win32/select.c  Mon Aug 11 20:58:52 2003
@@ -19,7 +19,7 @@
 #include "php.h"
 #include "php_network.h"
 
-/* $Id: select.c,v 1.4 2003/06/10 20:03:46 imajes Exp $ */
+/* $Id: select.c,v 1.5 2003/08/12 00:58:52 iliaa Exp $ */
 
 /* Win32 select() will only work with sockets, so we roll our own implementation that 
will
  * get the OS file handle from regular fd's and sockets and then use 
WaitForMultipleObjects().
@@ -50,7 +50,7 @@
return 0;
}
 
-   handles = (HANDLE*)emalloc((fd_count + sock_count) * sizeof(HANDLE));
+   handles = (HANDLE*)safe_emalloc((fd_count + sock_count), sizeof(HANDLE), 0);
 
/* populate the events and handles arrays */
f = 0;



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



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

2003-08-14 Thread Ard Biesheuvel
abies   Tue Aug 12 07:27:04 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Revert ugly workaround for erroneous results of ibase_num_rows() (see comment in 
code)
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.131 php-src/ext/interbase/interbase.c:1.132
--- php-src/ext/interbase/interbase.c:1.131 Tue Aug 12 06:02:25 2003
+++ php-src/ext/interbase/interbase.c   Tue Aug 12 07:27:03 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.131 2003/08/12 10:02:25 abies Exp $ */
+/* $Id: interbase.c,v 1.132 2003/08/12 11:27:03 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -687,7 +687,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.131 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.132 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -1901,23 +1901,6 @@
 }
 /* }}} */
 
-/* {{{ _php_ibase_do_fetch() */
-
-static void _php_ibase_do_fetch(ibase_result *ib_result TSRMLS_DC)
-{
-   if (ib_result->has_more_rows) {
-   if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, 
ib_result->out_sqlda)) {
-
-   ib_result->has_more_rows = 0;
-   if (IB_STATUS[0] && IB_STATUS[1]) { /* error in fetch */
-   _php_ibase_error(TSRMLS_C);
-   }
-   }
-   }
-}  
-   
-/* }}} */
-
 /* {{{ proto resource ibase_query([resource link_identifier [, resource 
link_identifier ] ,] string query [, int bind_args])
Execute a query */
 PHP_FUNCTION(ibase_query)
@@ -2161,7 +2144,6 @@
ib_query->stmt = NULL; /* keep stmt when free query */
_php_ibase_free_query(ib_query TSRMLS_CC);
ib_result->has_more_rows = 1;
-   _php_ibase_do_fetch(ib_result TSRMLS_CC);
ZEND_REGISTER_RESOURCE(return_value, ib_result, le_result);
} else {
_php_ibase_free_query(ib_query TSRMLS_CC);
@@ -2468,6 +2450,8 @@
ibase_result *ib_result;
XSQLVAR *var;

+   RESET_ERRMSG;
+   
switch (ZEND_NUM_ARGS()) {
case 1:
if (ZEND_NUM_ARGS() == 1 && zend_get_parameters_ex(1, 
&result_arg) == FAILURE) {
@@ -2490,10 +2474,17 @@
 
if (ib_result->out_sqlda == NULL || !ib_result->has_more_rows) {
RETURN_FALSE;
-   } /* might have been because of an error */
+   }
+
+   if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, ib_result->out_sqlda)) {
+
+   ib_result->has_more_rows = 0;
+   if (IB_STATUS[0] && IB_STATUS[1]) { /* error in fetch */
+   _php_ibase_error(TSRMLS_C);
+   }
+   RETURN_FALSE;
+   }
 
-   RESET_ERRMSG;
-   
array_init(return_value);

arr_cnt = 0;
@@ -2530,13 +2521,13 @@

if (isc_open_blob(IB_STATUS, 
&ib_result->link, &ib_result->trans, &bl_handle, (ISC_QUAD ISC_FAR *) var->sqldata)) {
_php_ibase_error(TSRMLS_C);
-   goto 
_php_ibase_fetch_hash_error;
+   RETURN_FALSE;
}

bl_items[0] = 
isc_info_blob_total_length;
if (isc_blob_info(IB_STATUS, 
&bl_handle, sizeof(bl_items), bl_items, sizeof(bl_info), bl_info)) {
_php_ibase_error(TSRMLS_C);
-   goto 
_php_ibase_fetch_hash_error;
+   RETURN_FALSE;
}

/* find total length of blob's data */
@@ -2562,14 +2553,14 @@
if (cur_len > max_len) { /* 
never! */
efree(bl_data);

_php_ibase_module_error("PHP module internal error");
-   goto 
_php_ibase_fetch_hash_error;
+   RETURN_FALSE;
}

[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-14 Thread Ard Biesheuvel
abies   Tue Aug 12 14:02:00 2003 EDT

  Modified files:  
/php-src/ext/interbase  php_interbase.h interbase.c 
  Log:
  Re-commit of failed patch 
  
  Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.44 
php-src/ext/interbase/php_interbase.h:1.45
--- php-src/ext/interbase/php_interbase.h:1.44  Tue Aug 12 13:41:37 2003
+++ php-src/ext/interbase/php_interbase.h   Tue Aug 12 14:01:59 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_interbase.h,v 1.44 2003/08/12 17:41:37 sniper Exp $ */
+/* $Id: php_interbase.h,v 1.45 2003/08/12 18:01:59 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -153,6 +153,9 @@
int in_array_cnt, out_array_cnt;
unsigned short dialect;
int cursor_open;
+   char statement_type;
+   char *query;
+   int trans_res_id;
 } ibase_query;
 
 typedef struct {
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.136 php-src/ext/interbase/interbase.c:1.137
--- php-src/ext/interbase/interbase.c:1.136 Tue Aug 12 13:41:37 2003
+++ php-src/ext/interbase/interbase.c   Tue Aug 12 14:01:59 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.136 2003/08/12 17:41:37 sniper Exp $ */
+/* $Id: interbase.c,v 1.137 2003/08/12 18:01:59 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -421,9 +421,9 @@
ibase_db_link *link = (ibase_db_link *) rsrc->ptr;
 
_php_ibase_commit_link(link TSRMLS_CC);
-   if (link->link != NULL) {
+   if (link->handle != NULL) {
IBDEBUG("Closing normal link...");
-   isc_detach_database(IB_STATUS, &link->link);
+   isc_detach_database(IB_STATUS, &link->handle);
}
IBG(num_links)--;
efree(link);
@@ -438,8 +438,8 @@
 
_php_ibase_commit_link(link TSRMLS_CC);
IBDEBUG("Closing permanent link...");
-   if (link->link != NULL) {
-   isc_detach_database(IB_STATUS, &link->link);
+   if (link->handle != NULL) {
+   isc_detach_database(IB_STATUS, &link->handle);
}
IBG(num_persistent)--;
IBG(num_links)--;
@@ -502,6 +502,9 @@
if (ib_query->out_array) {
efree(ib_query->out_array);
}
+   if (ib_query->query) {
+   efree(ib_query->query);
+   }
efree(ib_query);
}
 }
@@ -530,6 +533,9 @@
if (ib_query->out_array) {
efree(ib_query->out_array);
}
+   if (ib_query->query) {
+   efree(ib_query->query);
+   }
efree(ib_query);
}
 }
@@ -692,7 +698,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.136 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.137 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -865,7 +871,7 @@
}
/* Check if connection has timed out */
ib_link = (ibase_db_link *) le->ptr;
-   if (!isc_database_info(IB_STATUS, &ib_link->link, 
sizeof(tmp_1), tmp_1, sizeof(tmp_2), tmp_2)) {
+   if (!isc_database_info(IB_STATUS, &ib_link->handle, 
sizeof(tmp_1), tmp_1, sizeof(tmp_2), tmp_2)) {
open_new_connection = 0;
}
}
@@ -895,7 +901,7 @@
}
 
ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link));
-   ib_link->link = db_handle;
+   ib_link->handle = db_handle;
ib_link->dialect = (ib_dialect ? (unsigned short) 
strtoul(ib_dialect, NULL, 10) : SQL_DIALECT_CURRENT);
ib_link->tr_list = NULL;
 
@@ -955,7 +961,7 @@
}
 
ib_link = (ibase_db_link *) emalloc(sizeof(ibase_db_link));
-   ib_link->link = db_handle;
+   ib_link->handle = db_handle;
ib_link->dialect = (ib_dialect ? (unsigned short) strtoul(ib_dialect, 
NULL, 10) : SQL_DIALECT_CURRENT);
ib_link->tr_list = NULL;

@@ -1054,7 +1060,7 @@
}

ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, link_arg, link_id, "InterBase 
link", le_link, le_plink);
-   if (isc_drop_database(IB_STATUS, &ib_link->link)) {
+   if (isc_drop_database(IB_STATUS, &ib_link->handle)) {
_php_ibase_error(TSRMLS_C);
RETURN_FALSE;
}
@@ -1162,9 +1168,10 @@
 
 /* {{{ _php_ibase_alloc_query() */
 /* 

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

2003-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 11 15:21:22 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/sessionsession.c 
/php-srcNEWS 
  Log:
  MFH: Fixed bug #22245 (References inside $_SESSION not being handled).
  
  
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.20 
php-src/ext/session/session.c:1.336.2.21
--- php-src/ext/session/session.c:1.336.2.20Mon Jul 21 21:10:30 2003
+++ php-src/ext/session/session.c   Mon Aug 11 15:21:22 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.336.2.20 2003/07/22 01:10:30 sas Exp $ */
+/* $Id: session.c,v 1.336.2.21 2003/08/11 19:21:22 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -323,7 +323,7 @@
zend_set_hash_symbol(state_val, name, namelen, 1, 2, 
Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
}
} else IF_SESSION_VARS() {
-   zend_set_hash_symbol(state_val, name, namelen, 0, 1, 
Z_ARRVAL_P(PS(http_session_vars)));
+   zend_set_hash_symbol(state_val, name, namelen, 
PZVAL_IS_REF(state_val), 1, Z_ARRVAL_P(PS(http_session_vars)));
}
 }
 
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.340 php-src/NEWS:1.1247.2.341
--- php-src/NEWS:1.1247.2.340   Mon Aug 11 14:08:34 2003
+++ php-src/NEWSMon Aug 11 15:21:22 2003
@@ -18,6 +18,7 @@
   (Marcus, Ilia)
 - Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
   situations). (Ilia)
+- Fixed bug #22245 (References inside $_SESSION not being handled). (Ilia)
 - Fixed bug #21957 (serialize() mangles objects with __sleep). (Ilia)
 
 07 Aug 2003, Version 4.3.3RC3



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



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

2003-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 11 15:20:44 2003 EDT

  Modified files:  
/php-src/ext/sessionsession.c 
  Log:
  Fixed bug #22245 (References inside $_SESSION not being handled).
  
  
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.368 php-src/ext/session/session.c:1.369
--- php-src/ext/session/session.c:1.368 Mon Jul 21 21:11:07 2003
+++ php-src/ext/session/session.c   Mon Aug 11 15:20:44 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.368 2003/07/22 01:11:07 sas Exp $ */
+/* $Id: session.c,v 1.369 2003/08/11 19:20:44 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -326,7 +326,7 @@
zend_set_hash_symbol(state_val, name, namelen, 1, 2, 
Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
}
} else IF_SESSION_VARS() {
-   zend_set_hash_symbol(state_val, name, namelen, 0, 1, 
Z_ARRVAL_P(PS(http_session_vars)));
+   zend_set_hash_symbol(state_val, name, namelen, 
PZVAL_IS_REF(state_val), 1, Z_ARRVAL_P(PS(http_session_vars)));
}
 }
 



-- 
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/interbase interbase.c

2003-08-14 Thread Ard Biesheuvel
abies   Tue Aug 12 21:28:33 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/interbase  interbase.c 
  Log:
  Fixed bug #23936 (fail to select and fetch) MFH
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.91.2.13 
php-src/ext/interbase/interbase.c:1.91.2.14
--- php-src/ext/interbase/interbase.c:1.91.2.13 Thu Jul 24 05:15:05 2003
+++ php-src/ext/interbase/interbase.c   Tue Aug 12 21:28:32 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.91.2.13 2003/07/24 09:15:05 sniper Exp $ */
+/* $Id: interbase.c,v 1.91.2.14 2003/08/13 01:28:32 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -53,6 +53,11 @@
 
 #if HAVE_IBASE
 #include 
+
+#ifndef SQLDA_CURRENT_VERSION
+#define SQLDA_CURRENT_VERSION SQLDA_VERSION1
+#endif
+
 #include 
 #include "ext/standard/fsock.h"
 #include "ext/standard/info.h"
@@ -628,7 +633,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.13 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.14 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "yes");
 #endif
@@ -1080,9 +1085,9 @@
goto _php_ibase_alloc_query_error;
}
 
-   IB_QUERY->out_sqlda = (XSQLDA *) emalloc(XSQLDA_LENGTH(0));
-   IB_QUERY->out_sqlda->sqln = 0;
-   IB_QUERY->out_sqlda->version = SQLDA_VERSION1;
+   IB_QUERY->out_sqlda = (XSQLDA *) emalloc(XSQLDA_LENGTH(1));
+   IB_QUERY->out_sqlda->sqln = 1;
+   IB_QUERY->out_sqlda->version = SQLDA_CURRENT_VERSION;
 
if (isc_dsql_prepare(IB_STATUS, &IB_QUERY->trans, &IB_QUERY->stmt, 0, query, 
dialect, IB_QUERY->out_sqlda)) {
_php_ibase_error(TSRMLS_C);
@@ -1093,18 +1098,18 @@
if (IB_QUERY->out_sqlda->sqld > IB_QUERY->out_sqlda->sqln) {
IB_QUERY->out_sqlda = erealloc(IB_QUERY->out_sqlda, 
XSQLDA_LENGTH(IB_QUERY->out_sqlda->sqld));
IB_QUERY->out_sqlda->sqln = IB_QUERY->out_sqlda->sqld;
-   IB_QUERY->out_sqlda->version = SQLDA_VERSION1;
-   if (isc_dsql_describe(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, 
IB_QUERY->out_sqlda)) {
+   IB_QUERY->out_sqlda->version = SQLDA_CURRENT_VERSION;
+   if (isc_dsql_describe(IB_STATUS, &IB_QUERY->stmt, 
SQLDA_CURRENT_VERSION, IB_QUERY->out_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}
}
 
/* maybe have input placeholders? */
-   IB_QUERY->in_sqlda = emalloc(XSQLDA_LENGTH(0));
-   IB_QUERY->in_sqlda->sqln = 0;
-   IB_QUERY->in_sqlda->version = SQLDA_VERSION1;
-   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, 
IB_QUERY->in_sqlda)) {
+   IB_QUERY->in_sqlda = emalloc(XSQLDA_LENGTH(1));
+   IB_QUERY->in_sqlda->sqln = 1;
+   IB_QUERY->in_sqlda->version = SQLDA_CURRENT_VERSION;
+   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_CURRENT_VERSION, 
IB_QUERY->in_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}
@@ -1113,8 +1118,8 @@
if (IB_QUERY->in_sqlda->sqln < IB_QUERY->in_sqlda->sqld) {
IB_QUERY->in_sqlda = erealloc(IB_QUERY->in_sqlda, 
XSQLDA_LENGTH(IB_QUERY->in_sqlda->sqld));
IB_QUERY->in_sqlda->sqln = IB_QUERY->in_sqlda->sqld;
-   IB_QUERY->in_sqlda->version = SQLDA_VERSION1;
-   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, 
IB_QUERY->in_sqlda)) {
+   IB_QUERY->in_sqlda->version = SQLDA_CURRENT_VERSION;
+   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, 
SQLDA_CURRENT_VERSION, IB_QUERY->in_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}



-- 
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) / EXTENSIONS

2003-08-14 Thread Marcus Boerger
helly   Mon Aug 11 14:54:57 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcEXTENSIONS 
  Log:
  Add Ard as interbase maintainer
  
Index: php-src/EXTENSIONS
diff -u php-src/EXTENSIONS:1.51.2.3 php-src/EXTENSIONS:1.51.2.4
--- php-src/EXTENSIONS:1.51.2.3 Tue Jul  8 05:12:00 2003
+++ php-src/EXTENSIONS  Mon Aug 11 14:54:57 2003
@@ -136,7 +136,7 @@
 SINCE:   4.0.2
 ---
 EXTENSION:   interbase
-PRIMARY MAINTAINER:  Jouni Ahto <[EMAIL PROTECTED]>
+PRIMARY MAINTAINER:  Jouni Ahto <[EMAIL PROTECTED]>, Ard Biesheuvel <[EMAIL 
PROTECTED]>
 MAINTENANCE: Odd Fixes
 STATUS:  Working
 ---



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

2003-08-14 Thread Jani Taskinen
sniper  Tue Aug 12 21:24:48 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   array.c 
  Log:
  MFH
  
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.199.2.24 php-src/ext/standard/array.c:1.199.2.25
--- php-src/ext/standard/array.c:1.199.2.24 Sat Aug  9 16:50:25 2003
+++ php-src/ext/standard/array.cTue Aug 12 21:24:48 2003
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.199.2.24 2003/08/09 20:50:25 iliaa Exp $ */
+/* $Id: array.c,v 1.199.2.25 2003/08/13 01:24:48 sniper Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -39,6 +39,7 @@
 #include "win32/unistd.h"
 #endif
 #include "zend_globals.h"
+#include "zend_variables.h"
 #include "php_globals.h"
 #include "php_array.h"
 #include "basic_functions.h"



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



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

2003-08-14 Thread Ard Biesheuvel
abies   Thu Aug 14 20:16:59 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Moved TRMLS_FETCH to correct scope
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.141 php-src/ext/interbase/interbase.c:1.142
--- php-src/ext/interbase/interbase.c:1.141 Thu Aug 14 20:06:07 2003
+++ php-src/ext/interbase/interbase.c   Thu Aug 14 20:16:58 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.141 2003/08/15 00:06:07 abies Exp $ */
+/* $Id: interbase.c,v 1.142 2003/08/15 00:16:58 abies Exp $ */
 
 /*
Changes:
@@ -725,7 +725,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.141 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.142 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -3935,6 +3935,9 @@
 /* {{{ _php_ibase_callback() */
 static isc_callback _php_ibase_callback(ibase_event *event, unsigned short 
buffer_size, char *result_buf)
 {
+   /* this function is called asynchronously by the Interbase client library. */
+   TSRMLS_FETCH_FROM_CTX(event->thread_ctx);
+   
/**
 * The callback function is called when the event is first registered and when 
the event
 * is cancelled. I consider this is a bug. By clearing event->callback, we 
make sure 
@@ -3946,9 +3949,6 @@
ISC_STATUS occurred_event[15];
zval event_name, link_id, return_value, *args[2] = { &event_name, 
&link_id };
 
-   /* this function is called asynchronously by the Interbase client 
library. */
-   TSRMLS_FETCH_FROM_CTX(event->thread_ctx);
-   
/* copy the updated results into the result buffer */
memcpy(event->result_buffer, result_buf, buffer_size);

@@ -4086,6 +4086,7 @@
efree(args);
 
ZEND_REGISTER_RESOURCE(return_value, event, le_event);
+   zend_list_addref(Z_LVAL_P(return_value));
 }

 /* }}} */



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



[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-14 Thread Ard Biesheuvel
abies   Thu Aug 14 20:06:07 2003 EDT

  Modified files:  
/php-src/ext/interbase  php_interbase.h interbase.c 
  Log:
  Added ibase_set_event_handler()
  
  Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.48 
php-src/ext/interbase/php_interbase.h:1.49
--- php-src/ext/interbase/php_interbase.h:1.48  Thu Aug 14 06:55:02 2003
+++ php-src/ext/interbase/php_interbase.h   Thu Aug 14 20:06:07 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_interbase.h,v 1.48 2003/08/14 10:55:02 abies Exp $ */
+/* $Id: php_interbase.h,v 1.49 2003/08/15 00:06:07 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -91,6 +91,7 @@
 PHP_FUNCTION(ibase_errcode);
 
 PHP_FUNCTION(ibase_wait_event);
+PHP_FUNCTION(ibase_set_event_handler);
 
 #define IBASE_MSGSIZE 256
 #define MAX_ERRMSG (IBASE_MSGSIZE*2)
@@ -170,6 +171,17 @@
unsigned char has_more_rows;
char statement_type;
 } ibase_result;
+
+typedef struct {
+   int link_res_id;
+   ibase_db_link *link;
+   ISC_LONG event_id;
+   unsigned short event_count;
+   char **events;
+   char *event_buffer, *result_buffer;
+   zval *callback;
+   void **thread_ctx;
+} ibase_event;
 
 typedef struct _php_ibase_varchar {
short var_len;
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.140 php-src/ext/interbase/interbase.c:1.141
--- php-src/ext/interbase/interbase.c:1.140 Thu Aug 14 06:55:02 2003
+++ php-src/ext/interbase/interbase.c   Thu Aug 14 20:06:07 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.140 2003/08/14 10:55:02 abies Exp $ */
+/* $Id: interbase.c,v 1.141 2003/08/15 00:06:07 abies Exp $ */
 
 /*
Changes:
@@ -136,6 +136,7 @@
PHP_FE(ibase_delete_user, NULL)
 #endif
PHP_FE(ibase_wait_event, NULL)
+   PHP_FE(ibase_set_event_handler, NULL)
{NULL, NULL, NULL}
 };
 
@@ -164,7 +165,7 @@
 #endif
 
 /* True globals, no need for thread safety */
-static int le_blob, le_link, le_plink, le_result, le_query, le_trans;
+static int le_blob, le_link, le_plink, le_result, le_query, le_trans, le_event;
 
 ZEND_DECLARE_MODULE_GLOBALS(ibase)
 
@@ -584,6 +585,34 @@
 }
 /* }}} */
 
+/* {{{ _php_ibase_event_free() */
+static void _php_ibase_event_free(char *event_buf, char *result_buf)
+{
+   isc_free(event_buf);
+   isc_free(result_buf);
+}
+/* }}} */
+
+/* {{{ _php_ibase_free_event */
+static void _php_ibase_free_event(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+{
+   ibase_event *event = (ibase_event *) rsrc->ptr;
+   
+   IBDEBUG("Cleaning up event resource");
+
+   zval_dtor(event->callback);
+   event->callback = NULL;
+   
+   if (event->link->handle != NULL) {
+   if (isc_cancel_events(IB_STATUS, &event->link->handle, 
&event->event_id)) {
+   _php_ibase_error(TSRMLS_C);
+   }
+   }
+   _php_ibase_event_free(event->event_buffer,event->result_buffer);
+}
+   
+/* }}} */
+
 /* {{{ startup, shutdown and info functions */
 PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("ibase.allow_persistent", "1", PHP_INI_SYSTEM, 
OnUpdateLong, allow_persistent, zend_ibase_globals, ibase_globals)
@@ -617,6 +646,7 @@
le_link = zend_register_list_destructors_ex(_php_ibase_close_link, NULL, 
"interbase link", module_number);
le_plink = zend_register_list_destructors_ex(php_ibase_commit_link_rsrc, 
_php_ibase_close_plink, "interbase link persistent", module_number);
le_trans = zend_register_list_destructors_ex(_php_ibase_free_trans, NULL, 
"interbase transaction", module_number);
+   le_event = zend_register_list_destructors_ex(_php_ibase_free_event, NULL, 
"interbase event", module_number);
 
REGISTER_LONG_CONSTANT("IBASE_DEFAULT", PHP_IBASE_DEFAULT, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IBASE_TEXT", PHP_IBASE_TEXT, CONST_PERSISTENT);
@@ -695,7 +725,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.140 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.141 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -1910,7 +1940,7 @@
 {
ibase_trans *trans = NULL;
int res_id = 0;
-   ISC_STATUS result;
+   ISC_STATUS result = 0;
 
RESET_ERRMSG;
 
@@ -3829,14 +3859,6 @@
 }
 /* }}} */
 
-/* {{{ _php_ibase_event_free() */
-static void _php_ibase_event_free(char *event_buf, char *result_buf)
-{
-   isc_free(event_buf);
-   isc_free(result_buf);
-}
-/* }}} */
-
 /* {{{ proto string ibase_wait_event([resource link,] string event [, string event [, 
...]])
Waits for any one of the passed 

Re: [PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-14 Thread Jani Taskinen

I have reverted to previous version, you fucked up the commit
with some dos line endings or something.

Reapply the patch. 

--Jani


On Tue, 12 Aug 2003, Ard Biesheuvel wrote:

>abies  Tue Aug 12 13:33:54 2003 EDT
>
>  Modified files:  
>/php-src/ext/interbase interbase.c php_interbase.h 
>  Log:
>  Allow prepared execution of any non-query statement except CREATE DB
>  (fixes bug #7014)
>  
>  

 


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



[PHP-CVS] cvs: php-src /ext/dbx/tests 003.phpt dbx_test.p

2003-08-14 Thread Marc Boeren
mboeren Wed Aug 13 03:54:31 2003 EDT

  Modified files:  
/php-src/ext/dbx/tests  003.phpt dbx_test.p 
  Log:
  Remove special-case from test for SQLite persistent connections.
  
  
Index: php-src/ext/dbx/tests/003.phpt
diff -u php-src/ext/dbx/tests/003.phpt:1.6 php-src/ext/dbx/tests/003.phpt:1.7
--- php-src/ext/dbx/tests/003.phpt:1.6  Wed Jul  9 12:31:40 2003
+++ php-src/ext/dbx/tests/003.phpt  Wed Aug 13 03:54:31 2003
@@ -49,18 +49,14 @@
 }
 }
 
-if ($module != DBX_SQLITE) { // skip persistent tests for sqlite until that bug is 
solved
-
 $dlo = dbx_connect($module_name, $host, $database, $username, $password, 
DBX_PERSISTENT);
 if ($dlo!=0) {
print('persistent connect using string ok'."\n");
-var_dump($dlo->handle);
dbx_close($dlo);
}
 $dlo = dbx_connect($module, $host, $database, $username, $password, DBX_PERSISTENT);
 if ($dlo!=0) {
print('persistent connect using constant ok'."\n");
-var_dump($dlo->handle);
dbx_close($dlo);
}
 // sqlite is a special case as it will just create a db if it isn't found
@@ -77,22 +73,20 @@
 dbx_close($dlo);
 }
 }
-$dlo = @dbx_connect($module, $host, $database, $nonexisting_username, 
$nonexisting_password, DBX_PERSISTENT);
-if ($dlo==0) {
-   print('persistent connect with false username/password combi failed, so it\'s 
ok'."\n");
-   }
-else {
-print_r($dlo);
-   dbx_close($dlo);
+// sqlite is a special case as it doesn't use user/password restrictions
+if ($module == DBX_SQLITE) {
+print('persistent connect with false username/password combi failed, so it\'s 
ok'."\n");
 }
-
-}  // skip persistent tests for sqlite until that bug is solved
 else {
-   print('persistent connect using string ok'."\n");
-   print('persistent connect using constant ok'."\n");
-print('persistent connect to non-existing database failed, so it\'s ok'."\n");
-   print('persistent connect with false username/password combi failed, so it\'s 
ok'."\n");
-}
+$dlo = @dbx_connect($module, $host, $database, $nonexisting_username, 
$nonexisting_password, DBX_PERSISTENT);
+if ($dlo==0) {
+print('persistent connect with false username/password combi failed, so it\'s 
ok'."\n");
+}
+else {
+print_r($dlo);
+dbx_close($dlo);
+}
+}
 
 $dlo = @dbx_connect($module, $host, $database, $username, $password, DBX_PERSISTENT, 
"12many");
 if ($dlo==0) {
Index: php-src/ext/dbx/tests/dbx_test.p
diff -u php-src/ext/dbx/tests/dbx_test.p:1.10 php-src/ext/dbx/tests/dbx_test.p:1.11
--- php-src/ext/dbx/tests/dbx_test.p:1.10   Wed Jul  9 12:31:40 2003
+++ php-src/ext/dbx/tests/dbx_test.pWed Aug 13 03:54:31 2003
@@ -63,7 +63,7 @@
 case DBX_SQLITE:
 $module=DBX_SQLITE;
 $host="";
-$database="ext\\dbx\\tests\\dbx_test.sqlite.db";
+$database="dbx_test.sqlite.db";
 $username="";
 $password="";
 $module_name="sqlite";



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

2003-08-14 Thread Ilia Alshanetsky
iliaa   Wed Aug 13 12:14:08 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  BFN
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.344 php-src/NEWS:1.1247.2.345
--- php-src/NEWS:1.1247.2.344   Tue Aug 12 21:30:38 2003
+++ php-src/NEWSWed Aug 13 12:14:08 2003
@@ -17,12 +17,14 @@
 - Fixed bug #24142 (workaround for a gcc bug affecting round()). (Marcus, Ilia)
 - Fixed bug #24063 (serialize() missing 0 after the . on scientific notation).
   (Marcus, Ilia)
+- Fixed bug #23936 (fail to select and fetch). (Ard)
 - Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
   situations). (Ilia)
 - Fixed bug #22245 (References inside $_SESSION not being handled). (Ilia)
 - Fixed bug #21957 (serialize() mangles objects with __sleep). (Ilia)
 - Fixed bug #21918 (strange behaviour of mixed type in array-keys). (Marcus)
 - Fixed bug #20896 (-s -w modes with php-cli cause php to hang). (Ilia)
+- Fixed bug #7014 (crash in _php_ibase_error() after request shutdown). (Ard)
 
 07 Aug 2003, Version 4.3.3RC3
 - Fixed bug #24958 (Incorrect handling of 404s). (Ilia, Justin)



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



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

2003-08-14 Thread Ard Biesheuvel
abies   Tue Aug 12 09:19:36 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Fixed bug #23936 (fail to select and fetch)
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.133 php-src/ext/interbase/interbase.c:1.134
--- php-src/ext/interbase/interbase.c:1.133 Tue Aug 12 07:35:26 2003
+++ php-src/ext/interbase/interbase.c   Tue Aug 12 09:19:36 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.133 2003/08/12 11:35:26 abies Exp $ */
+/* $Id: interbase.c,v 1.134 2003/08/12 13:19:36 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -64,6 +64,11 @@
 
 #if HAVE_IBASE
 #include 
+
+#ifndef SQLDA_CURRENT_VERSION
+#define SQLDA_CURRENT_VERSION SQLDA_VERSION1
+#endif
+
 #include 
 #include "ext/standard/fsock.h"
 #include "ext/standard/info.h"
@@ -687,7 +692,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.133 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.134 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -1180,7 +1185,7 @@
 
IB_QUERY->out_sqlda = (XSQLDA *) emalloc(XSQLDA_LENGTH(1));
IB_QUERY->out_sqlda->sqln = 1;
-   IB_QUERY->out_sqlda->version = SQLDA_VERSION1;
+   IB_QUERY->out_sqlda->version = SQLDA_CURRENT_VERSION;
 
if (isc_dsql_prepare(IB_STATUS, &IB_QUERY->trans, &IB_QUERY->stmt, 0, query, 
dialect, IB_QUERY->out_sqlda)) {
_php_ibase_error(TSRMLS_C);
@@ -1191,8 +1196,8 @@
if (IB_QUERY->out_sqlda->sqld > IB_QUERY->out_sqlda->sqln) {
IB_QUERY->out_sqlda = erealloc(IB_QUERY->out_sqlda, 
XSQLDA_LENGTH(IB_QUERY->out_sqlda->sqld));
IB_QUERY->out_sqlda->sqln = IB_QUERY->out_sqlda->sqld;
-   IB_QUERY->out_sqlda->version = SQLDA_VERSION1;
-   if (isc_dsql_describe(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, 
IB_QUERY->out_sqlda)) {
+   IB_QUERY->out_sqlda->version = SQLDA_CURRENT_VERSION;
+   if (isc_dsql_describe(IB_STATUS, &IB_QUERY->stmt, 
SQLDA_CURRENT_VERSION, IB_QUERY->out_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}
@@ -1201,8 +1206,8 @@
/* maybe have input placeholders? */
IB_QUERY->in_sqlda = emalloc(XSQLDA_LENGTH(1));
IB_QUERY->in_sqlda->sqln = 1;
-   IB_QUERY->in_sqlda->version = SQLDA_VERSION1;
-   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, 
IB_QUERY->in_sqlda)) {
+   IB_QUERY->in_sqlda->version = SQLDA_CURRENT_VERSION;
+   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_CURRENT_VERSION, 
IB_QUERY->in_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}
@@ -1211,8 +1216,8 @@
if (IB_QUERY->in_sqlda->sqln < IB_QUERY->in_sqlda->sqld) {
IB_QUERY->in_sqlda = erealloc(IB_QUERY->in_sqlda, 
XSQLDA_LENGTH(IB_QUERY->in_sqlda->sqld));
IB_QUERY->in_sqlda->sqln = IB_QUERY->in_sqlda->sqld;
-   IB_QUERY->in_sqlda->version = SQLDA_VERSION1;
-   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, SQLDA_VERSION1, 
IB_QUERY->in_sqlda)) {
+   IB_QUERY->in_sqlda->version = SQLDA_CURRENT_VERSION;
+   if (isc_dsql_describe_bind(IB_STATUS, &IB_QUERY->stmt, 
SQLDA_CURRENT_VERSION, IB_QUERY->in_sqlda)) {
_php_ibase_error(TSRMLS_C);
goto _php_ibase_alloc_query_error;
}



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



Re: [PHP-CVS] cvs: php-src /ext/iconv iconv.c

2003-08-14 Thread Jani Taskinen

That's pretty useless, PHP_ICONV_H_PATH is always set.
And it's still wrong..

--Jani

  
On Wed, 13 Aug 2003, Moriyoshi Koizumi wrote:

>moriyoshi  Wed Aug 13 14:21:07 2003 EDT
>
>  Modified files:  
>/php-src/ext/iconv iconv.c 
>  Log:
>  Slight improvement. Hope this will make some difference.
>  
>  
>Index: php-src/ext/iconv/iconv.c
>diff -u php-src/ext/iconv/iconv.c:1.95 php-src/ext/iconv/iconv.c:1.96
>--- php-src/ext/iconv/iconv.c:1.95 Tue Aug 12 00:19:06 2003
>+++ php-src/ext/iconv/iconv.c  Wed Aug 13 14:21:06 2003
>@@ -18,7 +18,7 @@
>+--+
>  */
> 
>-/* $Id: iconv.c,v 1.95 2003/08/12 04:19:06 iliaa Exp $ */
>+/* $Id: iconv.c,v 1.96 2003/08/13 18:21:06 moriyoshi Exp $ */
> 
> #ifdef HAVE_CONFIG_H
> #include "config.h"
>@@ -41,11 +41,11 @@
> 
> #ifdef HAVE_ICONV
> 
>-#ifndef PHP_ICONV_H_PATH
>-#define PHP_ICONV_H_PATH 
>-#endif
>-
>+#ifdef PHP_ICONV_H_PATH
> #include PHP_ICONV_H_PATH
>+#else
>+#include 
>+#endif
> 
> #ifdef HAVE_GLIBC_ICONV
> #include 
>
>
>
>

-- 
https://www.paypal.com/xclick/[EMAIL PROTECTED]&no_note=1&tax=0¤cy_code=EUR
 


-- 
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/pspell pspell.dsp

2003-08-14 Thread Edin Kadribasic
edink   Wed Aug 13 19:02:58 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/pspell pspell.dsp 
  Log:
  Added standard location for the headers
  
Index: php-src/ext/pspell/pspell.dsp
diff -u php-src/ext/pspell/pspell.dsp:1.1.2.1 php-src/ext/pspell/pspell.dsp:1.1.2.2
--- php-src/ext/pspell/pspell.dsp:1.1.2.1   Wed Aug 13 16:59:44 2003
+++ php-src/ext/pspell/pspell.dsp   Wed Aug 13 19:02:57 2003
@@ -44,7 +44,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I 
"..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D 
ZEND_DEBUG=1 /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /D ZEND_DEBUG=1 /D "_DEBUG" /D ZTS=1 /D HAVE_PSPELL=1 
/D "COMPILE_DL_PSPELL" /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /I "..\..\..\php_build\include\pspell." /D 
ZEND_DEBUG=1 /D "_DEBUG" /D ZTS=1 /D HAVE_PSPELL=1 /D "COMPILE_DL_PSPELL" /D "WIN32" 
/D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D 
"PSPELL_EXPORTS" /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -70,7 +70,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I 
"..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /D ZEND_DEBUG=0 /D "NDEBUG" /D ZTS=1 /D HAVE_PSPELL=1 
/D "COMPILE_DL_PSPELL" /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I 
"..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /I "..\..\..\php_build\include\pspell" /D 
ZEND_DEBUG=0 /D "NDEBUG" /D ZTS=1 /D HAVE_PSPELL=1 /D "COMPILE_DL_PSPELL" /D "WIN32" 
/D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D 
"PSPELL_EXPORTS" /YX /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"



-- 
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) / acinclude.m4

2003-08-14 Thread Brian France
bfrance Wed Aug 13 20:24:25 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcacinclude.m4 
  Log:
  
Reverted part of the last patch.  It changed -prefer-pic to -prefer-non-pic.
Now back to -prefer-pic
  
  
  
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.218.2.23 php-src/acinclude.m4:1.218.2.24
--- php-src/acinclude.m4:1.218.2.23 Wed Aug 13 18:50:34 2003
+++ php-src/acinclude.m4Wed Aug 13 20:24:25 2003
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.218.2.23 2003/08/13 22:50:34 bfrance Exp $
+dnl $Id: acinclude.m4,v 1.218.2.24 2003/08/14 00:24:25 bfrance Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -1222,7 +1222,7 @@
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
 
 $3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
-   \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) 
\$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-non-pic 
-module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) 
\$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
+   \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) 
\$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic 
-module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) 
\$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
 
 EOF
 ])



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



[PHP-CVS] cvs: php-src /ext/pspell pspell.dsp

2003-08-14 Thread Edin Kadribasic
edink   Wed Aug 13 19:04:08 2003 EDT

  Modified files:  
/php-src/ext/pspell pspell.dsp 
  Log:
  MFB: standard location for the include files
  
Index: php-src/ext/pspell/pspell.dsp
diff -u php-src/ext/pspell/pspell.dsp:1.1 php-src/ext/pspell/pspell.dsp:1.2
--- php-src/ext/pspell/pspell.dsp:1.1   Wed Aug 13 14:57:19 2003
+++ php-src/ext/pspell/pspell.dsp   Wed Aug 13 19:04:08 2003
@@ -44,7 +44,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I 
"..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D 
ZEND_DEBUG=1 /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /D ZEND_DEBUG=1 /D "_DEBUG" /D ZTS=1 /D HAVE_PSPELL=1 
/D "COMPILE_DL_PSPELL" /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /I "..\..\..\php_build\include\pspell." /D 
ZEND_DEBUG=1 /D "_DEBUG" /D ZTS=1 /D HAVE_PSPELL=1 /D "COMPILE_DL_PSPELL" /D "WIN32" 
/D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D 
"PSPELL_EXPORTS" /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -70,7 +70,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I 
"..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /D ZEND_DEBUG=0 /D "NDEBUG" /D ZTS=1 /D HAVE_PSPELL=1 
/D "COMPILE_DL_PSPELL" /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I 
"..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /I "..\..\..\php_build\include\pspell" /D 
ZEND_DEBUG=0 /D "NDEBUG" /D ZTS=1 /D HAVE_PSPELL=1 /D "COMPILE_DL_PSPELL" /D "WIN32" 
/D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D 
"PSPELL_EXPORTS" /YX /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"



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



[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Tue Aug 12 22:01:46 2003 EDT

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Don't forget to flush() buffers for -w -s
  
  
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.238 php-src/sapi/cgi/cgi_main.c:1.239
--- php-src/sapi/cgi/cgi_main.c:1.238   Mon Aug  4 15:05:20 2003
+++ php-src/sapi/cgi/cgi_main.c Tue Aug 12 22:01:46 2003
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.238 2003/08/04 19:05:20 sas Exp $ */
+/* $Id: cgi_main.c,v 1.239 2003/08/13 02:01:46 iliaa Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1573,6 +1573,7 @@
if (open_file_for_scanning(&file_handle TSRMLS_CC) == 
SUCCESS) {
zend_strip(TSRMLS_C);
fclose(file_handle.handle.fp);
+   php_end_ob_buffers(1 TSRMLS_CC);
}
return SUCCESS;
break;
@@ -1584,6 +1585,7 @@

php_get_highlight_struct(&syntax_highlighter_ini);
zend_highlight(&syntax_highlighter_ini 
TSRMLS_CC);
fclose(file_handle.handle.fp);
+   php_end_ob_buffers(1 TSRMLS_CC);
}
return SUCCESS;
}



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



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

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 19:45:43 2003 EDT

  Modified files:  
/php-srcacinclude.m4 
  Log:
  MFB
  
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.255 php-src/acinclude.m4:1.256
--- php-src/acinclude.m4:1.255  Thu Jul  3 18:54:57 2003
+++ php-src/acinclude.m4Wed Aug 13 19:45:42 2003
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.255 2003/07/03 22:54:57 sas Exp $
+dnl $Id: acinclude.m4,v 1.256 2003/08/13 23:45:42 sniper Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -1154,8 +1154,8 @@
 \$(phplibdir)/$1.la: $3/$1.la
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
 
-$3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES)
-   \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) 
\$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version 
-prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) 
\$(translit($1,a-z-,A-Z_)_SHARED_LIBADD)
+$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
+   \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) 
\$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version 
-prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) 
\$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
 
 EOF
 ])



-- 
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/tests/array 001.phpt

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 06:40:57 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard/tests/array   001.phpt 
  Log:
  MFH
  
Index: php-src/ext/standard/tests/array/001.phpt
diff -u php-src/ext/standard/tests/array/001.phpt:1.5.2.1 
php-src/ext/standard/tests/array/001.phpt:1.5.2.2
--- php-src/ext/standard/tests/array/001.phpt:1.5.2.1   Sat Nov 16 12:30:10 2002
+++ php-src/ext/standard/tests/array/001.phpt   Wed Aug 13 06:40:56 2003
@@ -57,18 +57,18 @@
   int(27)
   [3]=>
   string(4) "test"
-  ["-1000"]=>
+  [4]=>
   array(2) {
 [0]=>
 string(6) "banana"
 [1]=>
 string(6) "orange"
   }
-  [4]=>
-  string(6) "monkey"
   [5]=>
-  float(-0.33)
+  string(6) "monkey"
   [6]=>
+  float(-0.33)
+  [7]=>
   array(1) {
 [0]=>
 array(1) {
@@ -79,7 +79,7 @@
   }
 }
   }
-  [7]=>
+  [8]=>
   array(1) {
 [0]=>
 array(1) {
@@ -90,7 +90,7 @@
   }
 }
   }
-  [8]=>
+  [9]=>
   array(1) {
 [0]=>
 array(1) {
@@ -113,18 +113,18 @@
 int(27)
 int(3)
 string(4) "test"
-string(5) "-1000"
+int(4)
 array(2) {
   [0]=>
   string(6) "banana"
   [1]=>
   string(6) "orange"
 }
-int(4)
-string(6) "monkey"
 int(5)
-float(-0.33)
+string(6) "monkey"
 int(6)
+float(-0.33)
+int(7)
 array(1) {
   [0]=>
   array(1) {
@@ -135,7 +135,7 @@
 }
   }
 }
-int(7)
+int(8)
 array(1) {
   [0]=>
   array(1) {
@@ -146,7 +146,7 @@
 }
   }
 }
-int(8)
+int(9)
 array(1) {
   [0]=>
   array(1) {



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



[PHP-CVS] cvs: php-src / NEWS

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 04:59:54 2003 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  more informix stuff
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1445 php-src/NEWS:1.1446
--- php-src/NEWS:1.1445 Sun Aug 10 21:22:37 2003
+++ php-src/NEWSWed Aug 13 04:59:53 2003
@@ -5,8 +5,8 @@
 ?? ??? 2003, PHP 5 Beta 2
 - Improved the Interbase extension: (Ard Biesheuvel)
   . Added support for multiple databases into ibase_trans()
-  . Added support for CREATE DATABASE and SET TRANSACTION statements 
-into ibase_query()
+  . Added support for CREATE DATABASE, SET TRANSACTION and EXECUTE PROCEDURE
+statements into ibase_query()
   . Added ibase_commit_ret()
   . Added ibase_rollback_ret()
   . Added ibase_drop_db() 



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



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

2003-08-14 Thread Wez Furlong
wez Wed Aug 13 18:31:23 2003 EDT

  Modified files:  
/php-src/ext/standard   browscap.c 
  Log:
  It's boolean, not long.
  # fixes a warning under vc7
  
  
Index: php-src/ext/standard/browscap.c
diff -u php-src/ext/standard/browscap.c:1.78 php-src/ext/standard/browscap.c:1.79
--- php-src/ext/standard/browscap.c:1.78Mon Jun 30 16:31:57 2003
+++ php-src/ext/standard/browscap.c Wed Aug 13 18:31:22 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: browscap.c,v 1.78 2003/06/30 20:31:57 shane Exp $ */
+/* $Id: browscap.c,v 1.79 2003/08/13 22:31:22 wez Exp $ */
 
 #include "php.h"
 #include "php_regex.h"
@@ -249,7 +249,7 @@
 
if (ZEND_NUM_ARGS() == 2) {
convert_to_boolean_ex(retarr);
-   return_array = Z_LVAL_PP(retarr);
+   return_array = Z_BVAL_PP(retarr);
}
 
if (zend_hash_find(&browser_hash, Z_STRVAL_PP(agent_name), 
Z_STRLEN_PP(agent_name)+1, (void **) &agent)==FAILURE) {



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



[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-14 Thread Ard Biesheuvel
abies   Thu Aug 14 06:55:02 2003 EDT

  Modified files:  
/php-src/ext/interbase  php_interbase.h interbase.c 
  Log:
  Added ibase_wait_event()
  
  
Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.47 
php-src/ext/interbase/php_interbase.h:1.48
--- php-src/ext/interbase/php_interbase.h:1.47  Tue Aug 12 22:19:14 2003
+++ php-src/ext/interbase/php_interbase.h   Thu Aug 14 06:55:02 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_interbase.h,v 1.47 2003/08/13 02:19:14 abies Exp $ */
+/* $Id: php_interbase.h,v 1.48 2003/08/14 10:55:02 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -89,6 +89,8 @@
 #endif
 PHP_FUNCTION(ibase_errmsg);
 PHP_FUNCTION(ibase_errcode);
+
+PHP_FUNCTION(ibase_wait_event);
 
 #define IBASE_MSGSIZE 256
 #define MAX_ERRMSG (IBASE_MSGSIZE*2)
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.139 php-src/ext/interbase/interbase.c:1.140
--- php-src/ext/interbase/interbase.c:1.139 Wed Aug 13 06:35:14 2003
+++ php-src/ext/interbase/interbase.c   Thu Aug 14 06:55:02 2003
@@ -17,11 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.139 2003/08/13 10:35:14 sniper Exp $ */
-
-
-/* TODO: Arrays, roles?
-A lot... */
+/* $Id: interbase.c,v 1.140 2003/08/14 10:55:02 abies Exp $ */
 
 /*
Changes:
@@ -139,6 +135,7 @@
PHP_FE(ibase_modify_user, NULL)
PHP_FE(ibase_delete_user, NULL)
 #endif
+   PHP_FE(ibase_wait_event, NULL)
{NULL, NULL, NULL}
 };
 
@@ -698,7 +695,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.139 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.140 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -3798,6 +3795,117 @@
 }
 /* }}} */
 #endif /* SQL_DIALECT_V6 */
+
+/* {{{ _php_ibase_event_block() */
+static void _php_ibase_event_block(ibase_db_link *ib_link, unsigned short count, char 
**events, 
+   unsigned short *l, char **event_buf, char **result_buf)
+{
+   ISC_STATUS dummy_result[20];
+
+   /**
+* Unfortunately, there's no clean and portable way in C to pass arguments to 
+* a variadic function if you don't know the number of arguments at compile 
time.
+* (And even if there were a way, the Interbase API doesn't provide a version 
of
+* this function that takes a va_list as an argument)
+*
+* In this case, the number of arguments is limited to 18 by the underlying 
API,
+* so we can work around it.
+*/
+
+   *l = (unsigned short) isc_event_block(event_buf, result_buf, count, events[0], 
+   events[1], events[2], events[3], events[4], events[5], events[6], 
events[7], 
+   events[8], events[9], events[10], events[11], events[12], events[13], 
events[14]);
+
+   /**
+* Currently, this is the only way to correctly initialize an event buffer.
+* This is clearly something that should be fixed, cause the semantics of
+* isc_wait_for_event() indicate that it blocks until an event occurs.
+* If the Firebird people ever fix this, these lines should be removed,
+* otherwise, events will have to fire twice before ibase_wait_event() returns.
+*/
+
+   isc_wait_for_event(dummy_result, &ib_link->handle, *l, *event_buf, 
*result_buf);
+   isc_event_counts(dummy_result, *l, *event_buf, *result_buf);
+}
+/* }}} */
+
+/* {{{ _php_ibase_event_free() */
+static void _php_ibase_event_free(char *event_buf, char *result_buf)
+{
+   isc_free(event_buf);
+   isc_free(result_buf);
+}
+/* }}} */
+
+/* {{{ proto string ibase_wait_event([resource link,] string event [, string event [, 
...]])
+   Waits for any one of the passed Interbase events to be posted by the database, and 
returns its name */
+PHP_FUNCTION(ibase_wait_event)
+{
+   zval ***args;
+   ibase_db_link *ib_link;
+   char *event_buffer, *result_buffer, *events[15];
+   unsigned short i = 0, event_count = 0, buffer_size;
+   ISC_STATUS occurred_event[15];
+   
+   RESET_ERRMSG;
+
+   /* no more than 15 events */
+   if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 16) {
+   WRONG_PARAM_COUNT;
+   }
+
+   args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0);
+   if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
+   efree(args);
+   RETURN_FALSE;
+   }
+
+   if (Z_TYPE_PP(args[0]) == IS_RESOURCE) {
+
+   ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, args[0], -1, "InterBase 
link", le_link, le_plink);
+   i = 1;
+
+   } else if 

[PHP-CVS] cvs: CVSROOT / avail

2003-08-14 Thread Sascha Schumann
sas Wed Aug 13 17:41:43 2003 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  phpdoc karma for ali,lpj,adhitama,engkongs
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.734 CVSROOT/avail:1.735
--- CVSROOT/avail:1.734 Wed Aug 13 16:28:21 2003
+++ CVSROOT/avail   Wed Aug 13 17:41:43 2003
@@ -26,7 +26,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,tony2001,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd|phpdoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-el,phpdoc-id
+avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,

Re: [PHP-CVS] cvs: php-src(PHP_4_3) / acinclude.m4

2003-08-14 Thread Brian J. France
I am trying to commit this to HEAD, but I am getting the following error:

cvs [server aborted]: "commit" requires write access to the repository

Any chance I can get access or can somebody can commit this change to HEAD?

Thanks,

Brian

On Wed, 13 Aug 2003 22:50:34 -, Brian France wrote:
> bfrance   Wed Aug 13 18:50:34 2003 EDT
> 
>   Modified files:  (Branch: PHP_4_3)
> /php-src  acinclude.m4 
>   Log:
>   
>   Fixed two translit so they don't remove underscores
>   
>   
>   
> Index: php-src/acinclude.m4
> diff -u php-src/acinclude.m4:1.218.2.22 php-src/acinclude.m4:1.218.2.23
> --- php-src/acinclude.m4:1.218.2.22   Thu Jul  3 18:54:07 2003
> +++ php-src/acinclude.m4  Wed Aug 13 18:50:34 2003
> @@ -1,4 +1,4 @@
> -dnl $Id: acinclude.m4,v 1.218.2.22 2003/07/03 22:54:07 sas Exp $
> +dnl $Id: acinclude.m4,v 1.218.2.23 2003/08/13 22:50:34 bfrance Exp $
>  dnl
>  dnl This file contains local autoconf functions.
>  
> @@ -1221,8 +1221,8 @@
>  \$(phplibdir)/$1.la: $3/$1.la
>   \$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
>  
> -$3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES)
> - \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) 
\$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version 
-prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) 
\$(translit($1,a-z-,A-Z_)_SHARED_LIBADD)
> +$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
> + \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) 
\$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version 
-prefer-non-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) 
\$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
>  
>  EOF
>  ])
> 
> 
> 
> -- 
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



Re: [PHP-CVS] cvs: spl /examples tree.php

2003-08-14 Thread Marcus Börger
Hello Marcus,

Thursday, August 14, 2003, 11:44:38 PM, you wrote:

MB> helly   Thu Aug 14 17:44:38 2003 EDT

MB>   Modified files:  
MB> /spl/examples   tree.php 
MB>   Log:
MB>   Upds
  
MB> Index: spl/examples/tree.php
MB> diff -u spl/examples/tree.php:1.3 spl/examples/tree.php:1.4
MB> --- spl/examples/tree.php:1.3   Thu Aug 14 17:14:04 2003
MB> +++ spl/examples/tree.php   Thu Aug 14 17:44:38 2003
MB> @@ -11,7 +11,7 @@
 
MB>  require_once("sub_dir.inc");
 
MB> -foreach(new sub_dir($argv[1], true, isset($argv[1]) ? $argv[1] : false) as $f) {
MB> +foreach(new sub_dir($argv[1], true, isset($argv[2]) ? $argv[2] : false) as $f) {
MB> echo "$f\n";
MB>  }
 
My thanks go to rob :-)





-- 
Best regards,
 Marcusmailto:[EMAIL PROTECTED]


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



[PHP-CVS] cvs: spl /examples tree.php

2003-08-14 Thread Marcus Boerger
helly   Thu Aug 14 17:44:38 2003 EDT

  Modified files:  
/spl/examples   tree.php 
  Log:
  Upds
  
Index: spl/examples/tree.php
diff -u spl/examples/tree.php:1.3 spl/examples/tree.php:1.4
--- spl/examples/tree.php:1.3   Thu Aug 14 17:14:04 2003
+++ spl/examples/tree.php   Thu Aug 14 17:44:38 2003
@@ -11,7 +11,7 @@
 
 require_once("sub_dir.inc");
 
-foreach(new sub_dir($argv[1], true, isset($argv[1]) ? $argv[1] : false) as $f) {
+foreach(new sub_dir($argv[1], true, isset($argv[2]) ? $argv[2] : false) as $f) {
echo "$f\n";
 }
 



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



[PHP-CVS] cvs: spl /examples sub_dir.inc tree.php

2003-08-14 Thread Marcus Boerger
helly   Thu Aug 14 17:14:04 2003 EDT

  Modified files:  
/spl/examples   sub_dir.inc tree.php 
  Log:
  Add 'graphical' tree mode
  
Index: spl/examples/sub_dir.inc
diff -u spl/examples/sub_dir.inc:1.2 spl/examples/sub_dir.inc:1.3
--- spl/examples/sub_dir.inc:1.2Wed Jul 16 17:51:09 2003
+++ spl/examples/sub_dir.incThu Aug 14 17:14:04 2003
@@ -12,8 +12,8 @@
 {
protected $adir = array();
protected $cnt  = 0;
-   protected $path = "";
-   protected $curr = "";
+   protected $path = '';
+   protected $curr = '';
protected $nodots = true;
 
/**
@@ -22,9 +22,11 @@
 * @param pathThe path to iterate.
 * @param nodots  Whether or not to display the entries '.' and '..'.
 */
-   function __construct($path, $nodots = true) {
+   function __construct($path, $nodots = true, $graph = false) {
$this->cnt = 0;
$this->path = $path;
+   $this->nodots = $nodots;
+   $this->graph = $graph;
}

/**
@@ -41,12 +43,12 @@
$this->adir[1] = $dir;
$this->cnt = 1;
if ($this->nodots) {
-   while ($this->has_more()) {
-   $ent = $this->current();
+   while ($dir->has_more()) {
+   $ent = $dir->current();
if ($ent != '.' && $ent != '..') {
break;
}
-   $this->next();
+   $dir->next();
}
}
}
@@ -67,13 +69,17 @@
$new->cnt = $this->cnt++;
$this->adir[$this->cnt] = $new;
if ($this->nodots) {
+   $dir->has_more = false;
while ($new->has_more()) {
$ent = $new->current();
if ($ent != '.' && $ent != '..') {
+   $dir->has_more = true;
break;
}
$new->next();
}
+   } else {
+   $dir->has_more = $dir->has_more();
}
}
$dir->next();
@@ -99,8 +105,20 @@
 */
function current() {
if ($this->cnt) {
-   $dir = $this->adir[$this->cnt];
-   return $dir->path . $dir->current();
+   if ($this->graph) {
+   $prefix = '';
+   for ($i = 1; $i < $this->cnt; $i++) {
+   $dir = $this->adir[$i];
+   $prefix .= $dir->has_more() ? '| ' : '  ';
+   }
+   $dir = $this->adir[$this->cnt];
+   $ent = $dir->current();
+   $prefix .= $dir->has_more() ? '+-' : '\-';
+   return $prefix . $ent;
+   } else {
+   $dir = $this->adir[$this->cnt];
+   return $dir->path . $dir->current();
+   }
}
throw new exception("No more elements available");
}
Index: spl/examples/tree.php
diff -u spl/examples/tree.php:1.2 spl/examples/tree.php:1.3
--- spl/examples/tree.php:1.2   Wed Jul 16 16:17:34 2003
+++ spl/examples/tree.php   Thu Aug 14 17:14:04 2003
@@ -11,7 +11,7 @@
 
 require_once("sub_dir.inc");
 
-foreach(new sub_dir($argv[1]) as $f) {
+foreach(new sub_dir($argv[1], true, isset($argv[1]) ? $argv[1] : false) as $f) {
echo "$f\n";
 }
 



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



[PHP-CVS] cvs: php-src /ext/odbc php_odbc.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Thu Aug 14 10:36:38 2003 EDT

  Modified files:  
/php-src/ext/odbc   php_odbc.c 
  Log:
  Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields).
  
  
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.170 php-src/ext/odbc/php_odbc.c:1.171
--- php-src/ext/odbc/php_odbc.c:1.170   Mon Aug 11 20:55:56 2003
+++ php-src/ext/odbc/php_odbc.c Thu Aug 14 10:36:38 2003
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.170 2003/08/12 00:55:56 iliaa Exp $ */
+/* $Id: php_odbc.c,v 1.171 2003/08/14 14:36:38 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1457,8 +1457,13 @@
if (result_type & ODBC_NUM) {
zend_hash_index_update(Z_ARRVAL_P(return_value), i, &tmp, 
sizeof(pval *), NULL);
} else {
-   zend_hash_update(Z_ARRVAL_P(return_value), 
result->values[i].name, 
+   if (!*(result->values[i].name)) {
+   zend_hash_update(Z_ARRVAL_P(return_value), 
Z_STRVAL_P(tmp),
+   Z_STRLEN_P(tmp)+1, &tmp, sizeof(pval *), NULL);
+   } else {
+   zend_hash_update(Z_ARRVAL_P(return_value), 
result->values[i].name, 
strlen(result->values[i].name)+1, &tmp, 
sizeof(pval *), NULL);
+   }
}
}
if (buf) efree(buf);



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



[PHP-CVS] cvs: php-src / EXTENSIONS

2003-08-14 Thread Wez Furlong
wez Thu Aug 14 16:57:49 2003 EDT

  Modified files:  
/php-srcEXTENSIONS 
  Log:
  update for com_dotnet
  
Index: php-src/EXTENSIONS
diff -u php-src/EXTENSIONS:1.59 php-src/EXTENSIONS:1.60
--- php-src/EXTENSIONS:1.59 Mon Aug 11 14:53:55 2003
+++ php-src/EXTENSIONS  Thu Aug 14 16:57:49 2003
@@ -275,10 +275,10 @@
 MAINTENANCE: Odd Fixes
 STATUS:  Working
 ---
-EXTENSION:   com
-PRIMARY MAINTAINER:  Harald Radi <[EMAIL PROTECTED]>
+EXTENSION:   com_dotnet
+PRIMARY MAINTAINER:  Wez Furlong <[EMAIL PROTECTED]>
 MAINTENANCE: Maintained
-STATUS:  Working
+STATUS:  Windows
 ---
 EXTENSION:   cpdf
 PRIMARY MAINTAINER:  Uwe Steinmann <[EMAIL PROTECTED]>



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



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

2003-08-14 Thread Wez Furlong
wez Thu Aug 14 13:06:44 2003 EDT

  Modified files:  
/php-src/main   internal_functions_win32.c 
  Log:
  fix this stuff
  
  
Index: php-src/main/internal_functions_win32.c
diff -u php-src/main/internal_functions_win32.c:1.79 
php-src/main/internal_functions_win32.c:1.80
--- php-src/main/internal_functions_win32.c:1.79Thu Aug 14 12:49:56 2003
+++ php-src/main/internal_functions_win32.c Thu Aug 14 13:06:43 2003
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: internal_functions_win32.c,v 1.79 2003/08/14 16:49:56 wez Exp $ */
+/* $Id: internal_functions_win32.c,v 1.80 2003/08/14 17:06:43 wez Exp $ */
 
 /* {{{ includes
  */
@@ -137,14 +137,14 @@
 #endif
 #if HAVE_LIBXML
 #if HAVE_DOM
-   phpext_dom_ptr
+   ,phpext_dom_ptr
 #endif
 #if HAVE_SIMPLEXML
-   phpext_simplexml_ptr
+   ,phpext_simplexml_ptr
 #endif
 #endif
 #if HAVE_XML
-   phpext_xml_ptr
+   ,phpext_xml_ptr
 #endif
 #if HAVE_XML && HAVE_WDDX
,phpext_wddx_ptr



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



[PHP-CVS] cvs: php-src /ext/com_dotnet CREDITS

2003-08-14 Thread Wez Furlong
wez Thu Aug 14 16:48:06 2003 EDT

  Added files: 
/php-src/ext/com_dotnet CREDITS 
  Log:
  add credits
  



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



[PHP-CVS] cvs: php-src / NEWS

2003-08-14 Thread Wez Furlong
wez Thu Aug 14 16:47:30 2003 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  add news about COM
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1446 php-src/NEWS:1.1447
--- php-src/NEWS:1.1446 Wed Aug 13 04:59:53 2003
+++ php-src/NEWSThu Aug 14 16:47:29 2003
@@ -3,6 +3,7 @@
 ?? ??? 200?, Version 5.0.0
 
 ?? ??? 2003, PHP 5 Beta 2
+- Added new COM extension with integrated .Net support. (Wez)
 - Improved the Interbase extension: (Ard Biesheuvel)
   . Added support for multiple databases into ibase_trans()
   . Added support for CREATE DATABASE, SET TRANSACTION and EXECUTE PROCEDURE



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



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

2003-08-14 Thread Wez Furlong
wez Thu Aug 14 16:31:38 2003 EDT

  Modified files:  
/php-src/ext/com_dotnet com_dotnet.c 
  Log:
  fix .net build
  
Index: php-src/ext/com_dotnet/com_dotnet.c
diff -u php-src/ext/com_dotnet/com_dotnet.c:1.1 php-src/ext/com_dotnet/com_dotnet.c:1.2
--- php-src/ext/com_dotnet/com_dotnet.c:1.1 Thu Aug 14 12:49:55 2003
+++ php-src/ext/com_dotnet/com_dotnet.c Thu Aug 14 16:31:38 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_dotnet.c,v 1.1 2003/08/14 16:49:55 wez Exp $ */
+/* $Id: com_dotnet.c,v 1.2 2003/08/14 20:31:38 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -109,7 +109,7 @@
 
if (COMG(dotnet_runtime_stuff) == NULL) {
if (FAILURE == dotnet_init(TSRMLS_C)) {
-   com_throw_exception("Failed to initialize .Net runtime" 
TSRMLS_CC);
+   php_com_throw_exception("Failed to initialize .Net runtime" 
TSRMLS_CC);
ZVAL_NULL(object);
return;
}
@@ -123,7 +123,7 @@
&assembly_name, &assembly_name_len,
&datatype_name, &datatype_name_len,
&obj->code_page)) {
-   com_throw_exception("Could not create .Net object - invalid 
arguments!" TSRMLS_CC);
+   php_com_throw_exception("Could not create .Net object - invalid 
arguments!" TSRMLS_CC);
ZVAL_NULL(object);
return;
}
@@ -171,7 +171,7 @@
VariantClear(&vargs[1]);
 
if (ret == FAILURE) {
-   com_throw_exception("Failed to instantiate .Net object" TSRMLS_CC);
+   php_com_throw_exception("Failed to instantiate .Net object" TSRMLS_CC);
ZVAL_NULL(object);
return;
}



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

2003-08-14 Thread Moriyoshi Koizumi
moriyoshi   Mon Aug 11 16:02:05 2003 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  Ensure CGI binary works like CLI.
  # This kind of mess should be removed if other better way is found.
  
  
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.176 php-src/run-tests.php:1.177
--- php-src/run-tests.php:1.176 Sun Aug 10 07:46:03 2003
+++ php-src/run-tests.php   Mon Aug 11 16:02:05 2003
@@ -731,8 +731,8 @@
if (trim($section_text['SKIPIF'])) {
save_text($tmp_skipif, $section_text['SKIPIF']);
$extra = substr(PHP_OS, 0, 3) !== "WIN" ?
-   "unset REQUEST_METHOD;": "";
-   $output = system_with_timeout("$extra $php $info_params 
$tmp_skipif");
+   "unset REQUEST_METHOD; unset QUERY_STRING; unset 
PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": "";
+   $output = system_with_timeout("$extra $php -q $info_params 
$tmp_skipif");
@unlink($tmp_skipif);
if (eregi("^skip", trim($output))) {
echo "SKIP $tested";



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



[PHP-CVS] cvs: php-src /tests/lang bug21669.phpt

2003-08-14 Thread Moriyoshi Koizumi
moriyoshi   Mon Aug 11 15:52:38 2003 EDT

  Modified files:  
/php-src/tests/lang bug21669.phpt 
  Log:
  (format fix) replace a tab with a single space
  
  
Index: php-src/tests/lang/bug21669.phpt
diff -u php-src/tests/lang/bug21669.phpt:1.1 php-src/tests/lang/bug21669.phpt:1.2
--- php-src/tests/lang/bug21669.phpt:1.1Mon Jun 16 08:26:07 2003
+++ php-src/tests/lang/bug21669.phptMon Aug 11 15:52:38 2003
@@ -1,5 +1,5 @@
 --TEST--
-Bug #21669 "$obj = new $this->var;" doesn't work
+Bug #21669 ("$obj = new $this->var;" doesn't work)
 --FILE--
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array 001.phpt

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 06:40:28 2003 EDT

  Modified files:  
/php-src/ext/standard/tests/array   001.phpt 
  Log:
  fix test
  
Index: php-src/ext/standard/tests/array/001.phpt
diff -u php-src/ext/standard/tests/array/001.phpt:1.6 
php-src/ext/standard/tests/array/001.phpt:1.7
--- php-src/ext/standard/tests/array/001.phpt:1.6   Sat Nov 16 12:28:04 2002
+++ php-src/ext/standard/tests/array/001.phpt   Wed Aug 13 06:40:28 2003
@@ -57,18 +57,18 @@
   int(27)
   [3]=>
   string(4) "test"
-  ["-1000"]=>
+  [4]=>
   array(2) {
 [0]=>
 string(6) "banana"
 [1]=>
 string(6) "orange"
   }
-  [4]=>
-  string(6) "monkey"
   [5]=>
-  float(-0.33)
+  string(6) "monkey"
   [6]=>
+  float(-0.33)
+  [7]=>
   array(1) {
 [0]=>
 array(1) {
@@ -79,7 +79,7 @@
   }
 }
   }
-  [7]=>
+  [8]=>
   array(1) {
 [0]=>
 array(1) {
@@ -90,7 +90,7 @@
   }
 }
   }
-  [8]=>
+  [9]=>
   array(1) {
 [0]=>
 array(1) {
@@ -113,18 +113,18 @@
 int(27)
 int(3)
 string(4) "test"
-string(5) "-1000"
+int(4)
 array(2) {
   [0]=>
   string(6) "banana"
   [1]=>
   string(6) "orange"
 }
-int(4)
-string(6) "monkey"
 int(5)
-float(-0.33)
+string(6) "monkey"
 int(6)
+float(-0.33)
+int(7)
 array(1) {
   [0]=>
   array(1) {
@@ -135,7 +135,7 @@
 }
   }
 }
-int(7)
+int(8)
 array(1) {
   [0]=>
   array(1) {
@@ -146,7 +146,7 @@
 }
   }
 }
-int(8)
+int(9)
 array(1) {
   [0]=>
   array(1) {



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



Re: [PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-14 Thread Ilia Alshanetsky
Please apply this fix to the PHP_4_3 branch as well.

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/standard/tests/array bug21918.phpt

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 05:48:32 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard/tests/array   bug21918.phpt 
  Log:
  MFH
  
Index: php-src/ext/standard/tests/array/bug21918.phpt
diff -u php-src/ext/standard/tests/array/bug21918.phpt:1.1.2.1 
php-src/ext/standard/tests/array/bug21918.phpt:1.1.2.2
--- php-src/ext/standard/tests/array/bug21918.phpt:1.1.2.1  Mon Aug 11 16:19:19 
2003
+++ php-src/ext/standard/tests/array/bug21918.phpt  Wed Aug 13 05:48:32 2003
@@ -1,36 +1,36 @@
---TEST--
---FILE--
-'a', '-2'=>'b', 3=>'c', '4'=>'d', 5=>'e', '6001'=>'f', '07'=>'g');
-
-foreach($a as $k => $v) {
-   var_dump($k);
-   var_dump($v);
-}
-
-echo "==Normal==\n";
-$b = array();
-$b[] = 'a';
-
-foreach($b as $k => $v) {
-   var_dump($k);
-   var_dump($v);
-}
-
-echo "==Negative==\n";
-$c = array('-2' => 'a');
-$c[] = 'b';
-
-foreach($c as $k => $v) {
-   var_dump($k);
-   var_dump($v);
-}
-
-echo "==Done==\n";
-?>
---EXPECT--
+--TEST--
+Bug #21918 (different handling of positive vs. negative array indexes)
+--FILE--
+'a', '-2'=>'b', 3=>'c', '4'=>'d', 5=>'e', '6001'=>'f', '07'=>'g');
+
+foreach($a as $k => $v) {
+   var_dump($k);
+   var_dump($v);
+}
+
+echo "==Normal==\n";
+$b = array();
+$b[] = 'a';
+
+foreach($b as $k => $v) {
+   var_dump($k);
+   var_dump($v);
+}
+
+echo "==Negative==\n";
+$c = array('-2' => 'a');
+
+foreach($c as $k => $v) {
+   var_dump($k);
+   var_dump($v);
+}
+
+echo "==Done==\n";
+?>
+--EXPECT--
 ==Mixed==
 int(-1)
 string(1) "a"
@@ -46,12 +46,10 @@
 string(1) "f"
 string(2) "07"
 string(1) "g"
-==Normal==
-int(0)
+==Normal==
+int(0)
 string(1) "a"
 ==Negative==
-int(-2)
+int(-2)
 string(1) "a"
-int(-1)
-string(1) "b"
-==Done==
+==Done==



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



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

2003-08-14 Thread Marcus Boerger
helly   Tue Aug 12 17:29:28 2003 EDT

  Modified files:  
/php-src/ext/sqlite sqlite.c 
  Log:
  # Wez, your whish is my command
  
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.81 php-src/ext/sqlite/sqlite.c:1.82
--- php-src/ext/sqlite/sqlite.c:1.81Tue Aug 12 17:15:16 2003
+++ php-src/ext/sqlite/sqlite.c Tue Aug 12 17:29:28 2003
@@ -17,7 +17,7 @@
|  Marcus Boerger <[EMAIL PROTECTED]>  |
+--+
 
-   $Id: sqlite.c,v 1.81 2003/08/12 21:15:16 helly Exp $ 
+   $Id: sqlite.c,v 1.82 2003/08/12 21:29:28 helly Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -947,7 +947,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, "SQLite support", "enabled");
-   php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.81 2003/08/12 21:15:16 helly Exp $");
+   php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.82 2003/08/12 21:29:28 helly Exp $");
php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
php_info_print_table_end();
@@ -1147,7 +1147,7 @@
}
}
 
-   php_sqlite_open(fullpath?fullpath:filename, mode, NULL, return_value, errmsg, 
object TSRMLS_CC);
+   php_sqlite_open(fullpath ? fullpath : filename, mode, NULL, return_value, 
errmsg, object TSRMLS_CC);
 
if (fullpath) {
efree(fullpath);



-- 
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 exec.c file.c filestat.c formatted_print.c levenshtein.c metaphone.c pack.c reg.c scanf.c string.c url.c var.c versioning.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 11 19:16:54 2003 EDT

  Modified files:  
/php-src/ext/standard   array.c exec.c file.c filestat.c 
formatted_print.c levenshtein.c metaphone.c 
pack.c reg.c scanf.c string.c url.c var.c 
versioning.c 
  Log:
  emalloc -> safe_emalloc
  
  Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.241 php-src/ext/standard/array.c:1.242
--- php-src/ext/standard/array.c:1.241  Sat Aug  9 16:48:59 2003
+++ php-src/ext/standard/array.cMon Aug 11 19:16:53 2003
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.241 2003/08/09 20:48:59 iliaa Exp $ */
+/* $Id: array.c,v 1.242 2003/08/11 23:16:53 iliaa Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -880,7 +880,7 @@
RETURN_FALSE;
}
} else {
-   pval ***args = (pval ***) emalloc(sizeof(pval **)*ZEND_NUM_ARGS());
+   pval ***args = (pval ***) safe_emalloc(sizeof(pval **), 
ZEND_NUM_ARGS(), 0);
pval **min, result;
int i;
 
@@ -932,7 +932,7 @@
RETURN_FALSE;
}
} else {
-   pval ***args = (pval ***) emalloc(sizeof(pval **)*ZEND_NUM_ARGS());
+   pval ***args = (pval ***) safe_emalloc(sizeof(pval **), 
ZEND_NUM_ARGS(), 0);
pval **max, result;
int i;
 
@@ -1419,7 +1419,7 @@
zval ***args;   /* function arguments array */
int i;

-   args = (zval ***)emalloc(ZEND_NUM_ARGS() * sizeof(zval **));
+   args = (zval ***)safe_emalloc(ZEND_NUM_ARGS(), sizeof(zval **), 0);

if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
@@ -1643,7 +1643,7 @@
return;
}
 
-   elems = (Bucket **)emalloc(n_elems * sizeof(Bucket *));
+   elems = (Bucket **)safe_emalloc(n_elems, sizeof(Bucket *), 0);
hash = Z_ARRVAL_P(array);
n_left = n_elems;
 
@@ -1818,7 +1818,7 @@
}

/* Allocate arguments array and get the arguments, checking for errors. */
-   args = (zval ***)emalloc(argc * sizeof(zval **));
+   args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
@@ -1947,7 +1947,7 @@
}

/* Allocate arguments array and get the arguments, checking for errors. */
-   args = (zval ***)emalloc(argc * sizeof(zval **));
+   args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
@@ -1997,7 +1997,7 @@
}

/* Allocate arguments array and get the arguments, checking for errors. */
-   args = (zval ***)emalloc(argc * sizeof(zval **));
+   args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
@@ -2026,7 +2026,7 @@

/* Create the array of replacement elements */
repl_num = zend_hash_num_elements(Z_ARRVAL_PP(args[3]));
-   repl = (zval ***)emalloc(repl_num * sizeof(zval **));
+   repl = (zval ***)safe_emalloc(repl_num, sizeof(zval **), 0);
for (p=Z_ARRVAL_PP(args[3])->pListHead, i=0; p; p=p->pListNext, i++) {
repl[i] = ((zval **)p->pData);
}
@@ -2204,7 +2204,7 @@
}

/* Allocate arguments array and get the arguments, checking for errors. */
-   args = (zval ***)emalloc(argc * sizeof(zval **));
+   args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
@@ -2503,7 +2503,7 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, "You may only pad up to 
1048576 elements at a time");
RETURN_FALSE;
}
-   pads = (zval ***)emalloc(num_pads * sizeof(zval **));
+   pads = (zval ***)safe_emalloc(num_pads, sizeof(zval **), 0);
for (i = 0; i < num_pads; i++) {
pads[i] = pad_value;
}
@@ -2711,14 +2711,14 @@
WRONG_PARAM_COUNT;
}
/* Allocate arguments array and get the arguments, checking for errors. */
-   args = (zval ***)emalloc(argc * sizeof(zval **));
+   args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
}
/

[PHP-CVS] cvs: php-src(PHP_4_3) /ext/session/tests bug24592.phpt

2003-08-14 Thread Ilia Alshanetsky
iliaa   Wed Aug 13 20:54:42 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/session/tests  bug24592.phpt 
  Log:
  MFH: missing skip condition.
  
  
Index: php-src/ext/session/tests/bug24592.phpt
diff -u php-src/ext/session/tests/bug24592.phpt:1.1.2.1 
php-src/ext/session/tests/bug24592.phpt:1.1.2.2
--- php-src/ext/session/tests/bug24592.phpt:1.1.2.1 Mon Jul 21 17:49:52 2003
+++ php-src/ext/session/tests/bug24592.phpt Wed Aug 13 20:54:42 2003
@@ -1,5 +1,7 @@
 --TEST--
 Bug #24592 (crash when multiple NULL values are being stored)
+--SKIPIF--
+
 --INI--
 register_globals=0
 html_errors=0



-- 
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/pspell/tests 01pspell_basic.phpt

2003-08-14 Thread Jani Taskinen
sniper  Sat Aug  9 11:46:48 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/pspell/tests   01pspell_basic.phpt 
  Log:
  MFH
  
Index: php-src/ext/pspell/tests/01pspell_basic.phpt
diff -u php-src/ext/pspell/tests/01pspell_basic.phpt:1.2 
php-src/ext/pspell/tests/01pspell_basic.phpt:1.2.2.1
--- php-src/ext/pspell/tests/01pspell_basic.phpt:1.2Thu Nov  7 20:09:47 2002
+++ php-src/ext/pspell/tests/01pspell_basic.phptSat Aug  9 11:46:48 2003
@@ -10,7 +10,7 @@
 --POST--
 --GET--
 --FILE--
-
 --EXPECT--
 I : true
 will : true



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



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

2003-08-14 Thread Vlad Krupin
vladWed Aug 13 17:01:04 2003 EDT

  Modified files:  
/php-src/ext/pspell pspell.c 
  Log:
  this comment makes no sense after the previous commit
  
Index: php-src/ext/pspell/pspell.c
diff -u php-src/ext/pspell/pspell.c:1.36 php-src/ext/pspell/pspell.c:1.37
--- php-src/ext/pspell/pspell.c:1.36Wed Aug 13 14:59:44 2003
+++ php-src/ext/pspell/pspell.c Wed Aug 13 17:01:04 2003
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: pspell.c,v 1.36 2003/08/13 18:59:44 vlad Exp $ */
+/* $Id: pspell.c,v 1.37 2003/08/13 21:01:04 vlad Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -735,7 +735,6 @@
zval **sccin, **pignore;
int argc;
 
-   /* Hack. But I cannot imagine any word being more than 999 characters long */
int loc = PSPELL_LARGEST_WORD;
char ignore_str[PSPELL_LARGEST_WORD + 1];   
long ignore = 0L;



-- 
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 /ext/standard php_rand.h rand.c

2003-08-14 Thread Jani Taskinen
sniper  Sun Aug 10 20:43:32 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/standard   rand.c php_rand.h 
  Log:
  MFH: - Fixed bug #25007 (rand() & mt_rand() seed RNG every call). 
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.336 php-src/NEWS:1.1247.2.337
--- php-src/NEWS:1.1247.2.336   Sat Aug  9 16:50:25 2003
+++ php-src/NEWSSun Aug 10 20:43:32 2003
@@ -1,6 +1,7 @@
 PHP 4  NEWS
 |||
 ?? Aug 2003, Version 4.3.3RC4
+- Fixed bug #25007 (rand() & mt_rand() seed RNG every call). (Jani)
 - Fixed bug #24989 (external libexpat conflicts with bundled libexpat). (Jani)
 - Fixed bug #24980 (array_reduce() uses first element as default running
   total). (Ilia)
Index: php-src/ext/standard/rand.c
diff -u php-src/ext/standard/rand.c:1.60.2.1 php-src/ext/standard/rand.c:1.60.2.2
--- php-src/ext/standard/rand.c:1.60.2.1Tue Dec 31 11:35:34 2002
+++ php-src/ext/standard/rand.c Sun Aug 10 20:43:32 2003
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: rand.c,v 1.60.2.1 2002/12/31 16:35:34 sebastian Exp $ */
+/* $Id: rand.c,v 1.60.2.2 2003/08/11 00:43:32 sniper Exp $ */
 
 #include 
 
@@ -60,6 +60,9 @@
srand((unsigned int) seed);
 # endif
 #endif
+
+   /* Seed only once */
+   BG(rand_is_seeded) = 1;
 }
 /* }}} */
 
@@ -205,6 +208,9 @@

for (BG(left) = 0, *s++ = x, j = N; --j;
*s++ = (x *= 69069U) & 0xU);
+
+   /* Seed only once */
+   BG(mt_rand_is_seeded) = 1;
 }
 /* }}} */
 
@@ -253,12 +259,6 @@
 }
 /* }}} */
 
-#ifdef PHP_WIN32
-#define GENERATE_SEED() ((long) (time(0) * GetCurrentProcessId() * 100 * 
php_combined_lcg(TSRMLS_C)))
-#else
-#define GENERATE_SEED() ((long) (time(0) * getpid() * 100 * 
php_combined_lcg(TSRMLS_C)))
-#endif
-
 /* {{{ proto void srand([int seed])
Seeds random number generator */
 PHP_FUNCTION(srand)
@@ -272,7 +272,6 @@
seed = GENERATE_SEED();
 
php_srand(seed TSRMLS_CC);
-   BG(rand_is_seeded) = 1;
 }
 /* }}} */
 
@@ -289,7 +288,6 @@
seed = GENERATE_SEED();
 
php_mt_srand(seed TSRMLS_CC);
-   BG(mt_rand_is_seeded) = 1;
 }
 /* }}} */
 
Index: php-src/ext/standard/php_rand.h
diff -u php-src/ext/standard/php_rand.h:1.19.4.2 
php-src/ext/standard/php_rand.h:1.19.4.3
--- php-src/ext/standard/php_rand.h:1.19.4.2Fri Aug  8 09:34:52 2003
+++ php-src/ext/standard/php_rand.h Sun Aug 10 20:43:32 2003
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: php_rand.h,v 1.19.4.2 2003/08/08 13:34:52 iliaa Exp $ */
+/* $Id: php_rand.h,v 1.19.4.3 2003/08/11 00:43:32 sniper Exp $ */
 
 #ifndef PHP_RAND_H
 #definePHP_RAND_H
@@ -44,6 +44,12 @@
 
 /* MT Rand */
 #define PHP_MT_RAND_MAX ((long) (0x7FFF)) /* (1<<31) - 1 */ 
+
+#ifdef PHP_WIN32
+#define GENERATE_SEED() ((long) (time(0) * GetCurrentProcessId() * 100 * 
php_combined_lcg(TSRMLS_C)))
+#else
+#define GENERATE_SEED() ((long) (time(0) * getpid() * 100 * 
php_combined_lcg(TSRMLS_C)))
+#endif
 
 PHPAPI void php_srand(long seed TSRMLS_DC);
 PHPAPI long php_rand(TSRMLS_D);



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



[PHP-CVS] cvs: php-src /ext/standard/tests/array 002.phpt 003.phpt

2003-08-14 Thread Jani Taskinen
sniper  Mon Aug 11 19:55:46 2003 EDT

  Modified files:  
/php-src/ext/standard/tests/array   002.phpt 003.phpt 
  Log:
  Fix the test results (negative indices are not strings anymore)
  
Index: php-src/ext/standard/tests/array/002.phpt
diff -u php-src/ext/standard/tests/array/002.phpt:1.4 
php-src/ext/standard/tests/array/002.phpt:1.5
--- php-src/ext/standard/tests/array/002.phpt:1.4   Sat Nov 16 12:28:04 2002
+++ php-src/ext/standard/tests/array/002.phpt   Mon Aug 11 19:55:46 2003
@@ -42,7 +42,7 @@
   int(27)
   [1000]=>
   string(4) "test"
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -58,7 +58,7 @@
  -- Testing arsort() -- 
 No second argument:
 array(8) {
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -82,7 +82,7 @@
 }
 Using SORT_REGULAR:
 array(8) {
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -108,7 +108,7 @@
 array(8) {
   ["test"]=>
   int(27)
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -140,7 +140,7 @@
   string(27) "PHP: Hypertext Preprocessor"
   [0]=>
   string(3) "PHP"
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -170,7 +170,7 @@
   string(4) "test"
   ["test"]=>
   int(27)
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -194,7 +194,7 @@
   string(4) "test"
   ["test"]=>
   int(27)
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -216,7 +216,7 @@
   string(27) "PHP: Hypertext Preprocessor"
   [0]=>
   string(3) "PHP"
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -232,7 +232,7 @@
   float(-0.33)
   ["test"]=>
   int(27)
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -268,7 +268,7 @@
   int(27)
   [0]=>
   string(3) "PHP"
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -292,7 +292,7 @@
   string(3) "PHP"
   ["test"]=>
   int(27)
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -316,7 +316,7 @@
   int(27)
   [0]=>
   string(3) "PHP"
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -340,7 +340,7 @@
   string(4) "test"
   [0]=>
   string(3) "PHP"
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -352,7 +352,7 @@
  -- Testing ksort() -- 
 No second argument:
 array(8) {
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -376,7 +376,7 @@
 }
 Using SORT_REGULAR:
 array(8) {
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -400,7 +400,7 @@
 }
 Using SORT_NUMERIC:
 array(8) {
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -424,7 +424,7 @@
 }
 Using SORT_STRING
 array(8) {
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
Index: php-src/ext/standard/tests/array/003.phpt
diff -u php-src/ext/standard/tests/array/003.phpt:1.5 
php-src/ext/standard/tests/array/003.phpt:1.6
--- php-src/ext/standard/tests/array/003.phpt:1.5   Sat Nov 16 12:28:04 2002
+++ php-src/ext/standard/tests/array/003.phpt   Mon Aug 11 19:55:46 2003
@@ -32,7 +32,7 @@
 array(8) {
   [16777216]=>
   float(-0.33)
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"
@@ -55,7 +55,7 @@
 
  -- Testing uksort() -- 
 array(8) {
-  ["-1000"]=>
+  [-1000]=>
   array(2) {
 [0]=>
 string(6) "banana"



-- 
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/mbstring mbstring.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Tue Aug 12 11:04:53 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mbstring   mbstring.c 
  Log:
  Fix compile warning (unused variable)
  
  
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.142.2.23 
php-src/ext/mbstring/mbstring.c:1.142.2.24
--- php-src/ext/mbstring/mbstring.c:1.142.2.23  Sat Aug  9 02:12:41 2003
+++ php-src/ext/mbstring/mbstring.c Tue Aug 12 11:04:52 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.142.2.23 2003/08/09 06:12:41 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.142.2.24 2003/08/12 15:04:52 iliaa Exp $ */
 
 /*
  * PHP4 Multibyte String module "mbstring"
@@ -3692,7 +3692,6 @@
 MBSTRING_API int php_mb_gpc_encoding_detector(const char *arg_string, int arg_length, 
char *arg_list TSRMLS_DC)
 {
mbfl_string string;
-   const char *ret;
enum mbfl_no_encoding *elist;
enum mbfl_no_encoding encoding;
 



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



[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c /main main.c ZendEngine2 Zend.m4 flex.skl zend_compile.c zend_globals.h zend_highlight.c zend_language_scanner.h zend_language_scanner.l zend_multibyte.c zend_multibyte.h

2003-08-14 Thread Masaki Fujimoto
fujimotoMon Aug 11 01:24:42 2003 EDT

  Added files: 
/ZendEngine2zend_multibyte.h 

  Modified files:  
/ZendEngine2Zend.m4 flex.skl zend_compile.c zend_globals.h 
zend_highlight.c zend_language_scanner.h 
zend_language_scanner.l zend_multibyte.c 
/php-src/ext/mbstring   mbstring.c 
/php-src/main   main.c 
  Log:
  - added script encoding support to Zend Engine 2.
this enables ZE2 to gracefully parse scripts written in UTF-8 (with BOM),
UTF-16, UTF-32, Shift_JIS, ISO-2022-JP etc... (when configured with
'--enable-zend-multibyte' and '--enable-mbstring')
  
  Index: ZendEngine2/Zend.m4
diff -u ZendEngine2/Zend.m4:1.39 ZendEngine2/Zend.m4:1.40
--- ZendEngine2/Zend.m4:1.39Thu Mar 20 12:41:40 2003
+++ ZendEngine2/Zend.m4 Mon Aug 11 01:24:41 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: Zend.m4,v 1.39 2003/03/20 17:41:40 stas Exp $
+dnl $Id: Zend.m4,v 1.40 2003/08/11 05:24:41 fujimoto Exp $
 dnl
 dnl This file contains Zend specific autoconf functions.
 dnl
@@ -129,6 +129,13 @@
   ZEND_MEMORY_LIMIT=no
 ])
 
+AC_ARG_ENABLE(zend-multibyte,
+[  --enable-zend-multibyte   Compile with zend multibyte support. ], [
+  ZEND_MULTIBYTE=$enableval
+],[
+  ZEND_MULTIBYTE=no
+])
+
 AC_MSG_CHECKING(whether to enable thread-safety)
 AC_MSG_RESULT($ZEND_MAINTAINER_ZTS)
 
@@ -140,6 +147,9 @@
 
 AC_MSG_CHECKING(whether to enable Zend debugging)
 AC_MSG_RESULT($ZEND_DEBUG)
+
+AC_MSG_CHECKING(whether to enable Zend multibyte)
+AC_MSG_RESULT($ZEND_MULTIBYTE)

 if test "$ZEND_DEBUG" = "yes"; then
   AC_DEFINE(ZEND_DEBUG,1,[ ])
@@ -168,6 +178,9 @@
   AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
 fi
 
+if test "$ZEND_MULTIBYTE" = "yes"; then
+  AC_DEFINE(ZEND_MULTIBYTE, 1, [ ])
+fi
 
 changequote({,})
 if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
Index: ZendEngine2/flex.skl
diff -u ZendEngine2/flex.skl:1.30 ZendEngine2/flex.skl:1.31
--- ZendEngine2/flex.skl:1.30   Tue Feb 18 04:51:21 2003
+++ ZendEngine2/flex.sklMon Aug 11 01:24:41 2003
@@ -1,7 +1,7 @@
 /* A Lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /usr/repository/ZendEngine2/flex.skl,v 1.30 2003/02/18 09:51:21 wez Exp $
+ * $Header: /usr/repository/ZendEngine2/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto 
Exp $
  * vim:ft=lex:
  */
 
@@ -440,12 +440,17 @@
 #define ECHO /* There is no output */
 #endif
 
-#define YY_INPUT(buf, result, max_size) \
+#ifdef ZEND_MULTIBYTE
+# define YY_INPUT(buf, result, max_size) \
+   if ( ((result = zend_multibyte_yyinput(yyin, buf, max_size TSRMLS_CC)) == 0) \
+   && zend_stream_ferror( yyin TSRMLS_CC) ) \
+   YY_FATAL_ERROR( "input in flex scanner failed" );
+#else
+# define YY_INPUT(buf, result, max_size) \
if ( ((result = zend_stream_read(yyin, buf, max_size TSRMLS_CC)) == 0) \
  && zend_stream_ferror( yyin TSRMLS_CC) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
-
-
+#endif
 
 #ifndef ECHO
 %- Standard (non-C++) definition
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.458 ZendEngine2/zend_compile.c:1.459
--- ZendEngine2/zend_compile.c:1.458Sun Aug 10 19:59:35 2003
+++ ZendEngine2/zend_compile.c  Mon Aug 11 01:24:41 2003
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.458 2003/08/10 23:59:35 helly Exp $ */
+/* $Id: zend_compile.c,v 1.459 2003/08/11 05:24:41 fujimoto Exp $ */
 
 #include "zend_language_parser.h"
 #include "zend.h"
@@ -27,6 +27,10 @@
 #include "zend_API.h"
 #include "zend_fast_cache.h"
 
+#ifdef ZEND_MULTIBYTE
+#include "zend_multibyte.h"
+#endif /* ZEND_MULTIBYTE */
+
 ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type 
TSRMLS_DC);
 
 
@@ -51,7 +55,14 @@
/* NULL, name length, filename length, line number length */
result->value.str.len = 1+name_length+strlen(filename)+lineno_len;
result->value.str.val = (char *) emalloc(result->value.str.len+1);
+#ifdef ZEND_MULTIBYTE
+   /* must be binary safe */
+   result->value.str.val[0] = '\0';
+   memcpy(result->value.str.val+1, name, name_length);
+   sprintf(result->value.str.val+1+name_length, "%s%s", filename, lineno_buf);
+#else
sprintf(result->value.str.val, "%c%s%s%s", '\0', name, filename, lineno_buf);
+#endif /* ZEND_MULTIBYTE */
result->type = IS_STRING;
result->refcount = 1;
 }
@@ -90,6 +101,15 @@
init_compiler_declarables(TSRMLS_C);
CG(throw_list) = NULL;
zend_hash_apply(CG(auto_globals), (apply_func_t) zend_auto_global_arm 
TSRMLS_CC);
+
+#ifdef ZEND_MULTIBYTE
+   CG(script_encoding_list) = NULL;
+   CG(script_encoding_list_size) = 0;
+   CG(internal_encoding) = NULL;
+   CG(encoding_detector) = NULL;
+   CG(encoding_converter) = NULL;
+   

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

2003-08-14 Thread Ilia Alshanetsky
iliaa   Sat Aug  9 16:49:00 2003 EDT

  Added files: 
/php-src/ext/standard/tests/array   bug24897.phpt 

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  Fixed bug #24897 (inconsistent behavior of shuffle() & array_multisort())
  
  
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.240 php-src/ext/standard/array.c:1.241
--- php-src/ext/standard/array.c:1.240  Sat Aug  9 12:43:28 2003
+++ php-src/ext/standard/array.cSat Aug  9 16:48:59 2003
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.240 2003/08/09 16:43:28 iliaa Exp $ */
+/* $Id: array.c,v 1.241 2003/08/09 20:48:59 iliaa Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1639,7 +1639,7 @@
 
n_elems = zend_hash_num_elements(Z_ARRVAL_P(array));

-   if (n_elems <= 1) {
+   if (n_elems < 1) {
return;
}
 
@@ -3150,7 +3150,7 @@
}
 
/* If all arrays are empty or have only one entry, we don't need to do 
anything. */
-   if (array_size <= 1) {
+   if (array_size < 1) {
for (k = 0; k < MULTISORT_LAST; k++)
efree(ARRAYG(multisort_flags)[k]);
efree(arrays);

Index: php-src/ext/standard/tests/array/bug24897.phpt
+++ php-src/ext/standard/tests/array/bug24897.phpt
--TEST--
Bug #24897 (inconsistent behaviour or shuffle() & array_multisort())
--FILE--
 2);
shuffle($a);
var_dump($a);

$a = array(1 => 2);
array_multisort($a);
var_dump($a);
?>
--EXPECT--
array(1) {
  [0]=>
  int(2)
}
array(1) {
  [0]=>
  int(2)
}



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



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

2003-08-14 Thread Marcus Boerger
helly   Tue Aug 12 17:15:16 2003 EDT

  Modified files:  
/php-src/ext/sqlite sqlite.c 
  Log:
  Bugfix #25056
  
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.80 php-src/ext/sqlite/sqlite.c:1.81
--- php-src/ext/sqlite/sqlite.c:1.80Sun Aug  3 13:44:37 2003
+++ php-src/ext/sqlite/sqlite.c Tue Aug 12 17:15:16 2003
@@ -17,7 +17,7 @@
|  Marcus Boerger <[EMAIL PROTECTED]>  |
+--+
 
-   $Id: sqlite.c,v 1.80 2003/08/03 17:44:37 zeev Exp $ 
+   $Id: sqlite.c,v 1.81 2003/08/12 21:15:16 helly Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -947,7 +947,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, "SQLite support", "enabled");
-   php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.80 2003/08/03 17:44:37 zeev Exp $");
+   php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.81 2003/08/12 21:15:16 helly Exp $");
php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
php_info_print_table_end();
@@ -1107,7 +1107,7 @@
 PHP_FUNCTION(sqlite_open)
 {
int mode = 0666;
-   char *filename;
+   char *filename, *fullpath = NULL;
long filename_len;
zval *errmsg = NULL;
zval *object = getThis();
@@ -1123,17 +1123,22 @@
}
 
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
-   if (PG(safe_mode) && (!php_checkuid(filename, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
+   /* resolve the fully-qualified path name to use as the hash key */
+   fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+   
+   if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
+   efree(fullpath);
if (object) {
RETURN_NULL();
} else {
RETURN_FALSE;
}
}
-   
-   if (php_check_open_basedir(filename TSRMLS_CC)) {
+
+   if (php_check_open_basedir(fullpath TSRMLS_CC)) {
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
+   efree(fullpath);
if (object) {
RETURN_NULL();
} else {
@@ -1142,8 +1147,11 @@
}
}
 
-   php_sqlite_open(filename, mode, NULL, return_value, errmsg, object TSRMLS_CC);
+   php_sqlite_open(fullpath?fullpath:filename, mode, NULL, return_value, errmsg, 
object TSRMLS_CC);
 
+   if (fullpath) {
+   efree(fullpath);
+   }
php_set_error_handling(EH_NORMAL, NULL 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_4_3) / NEWS

2003-08-14 Thread Ilia Alshanetsky
iliaa   Thu Aug 14 10:38:50 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  Set RC4 date
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.348 php-src/NEWS:1.1247.2.349
--- php-src/NEWS:1.1247.2.348   Thu Aug 14 10:37:33 2003
+++ php-src/NEWSThu Aug 14 10:38:50 2003
@@ -1,6 +1,6 @@
 PHP 4  NEWS
 |||
-?? Aug 2003, Version 4.3.3RC4
+14 Aug 2003, Version 4.3.3RC4
 - Fixed bug #25084 (Make refer check not dependant on register_globals). (Ilia)
 - Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). (Ilia)
 - Fixed bug #25044 (header("Location:") changing HTTP status). (Marcus)



-- 
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/interbase interbase.c php_interbase.h

2003-08-14 Thread Ard Biesheuvel
abies   Wed Aug 13 09:27:36 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/interbase  interbase.c php_interbase.h 
  Log:
  Fixed crash in _php_ibase_error() after request shutdown (also fixes #7014)
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.91.2.14 
php-src/ext/interbase/interbase.c:1.91.2.15
--- php-src/ext/interbase/interbase.c:1.91.2.14 Tue Aug 12 21:28:32 2003
+++ php-src/ext/interbase/interbase.c   Wed Aug 13 09:27:36 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.91.2.14 2003/08/13 01:28:32 abies Exp $ */
+/* $Id: interbase.c,v 1.91.2.15 2003/08/13 13:27:36 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -531,7 +531,6 @@
ibase_globals->timestampformat = NULL;
ibase_globals->dateformat = NULL;
ibase_globals->timeformat = NULL;
-   ibase_globals->errmsg = NULL;
ibase_globals->num_persistent = 0;
 }
 
@@ -588,10 +587,7 @@
}
IBG(timeformat) = DL_STRDUP(IBG(cfg_timeformat));
 
-   if (IBG(errmsg)) {
-   DL_FREE(IBG(errmsg));
-   }
-   IBG(errmsg) = DL_MALLOC(sizeof(char)*MAX_ERRMSG+1);
+   RESET_ERRMSG;
 
return SUCCESS;
 }
@@ -619,11 +615,6 @@
}
IBG(timeformat) = NULL;
 
-   if (IBG(errmsg)) {
-   DL_FREE(IBG(errmsg));
-   }
-   IBG(errmsg) = NULL;
-
return SUCCESS;
 } 
  
@@ -633,7 +624,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.14 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.15 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "yes");
 #endif
Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.28.2.6 
php-src/ext/interbase/php_interbase.h:1.28.2.7
--- php-src/ext/interbase/php_interbase.h:1.28.2.6  Wed Jul 23 22:47:10 2003
+++ php-src/ext/interbase/php_interbase.h   Wed Aug 13 09:27:36 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_interbase.h,v 1.28.2.6 2003/07/24 02:47:10 sniper Exp $ */
+/* $Id: php_interbase.h,v 1.28.2.7 2003/08/13 13:27:36 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -102,7 +102,7 @@
char *cfg_dateformat;
char *timeformat;
char *cfg_timeformat;
-   char *errmsg;
+   char errmsg[MAX_ERRMSG];
 ZEND_END_MODULE_GLOBALS(ibase)
 
 typedef struct {



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



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

2003-08-14 Thread Sascha Schumann
sas Wed Aug 13 14:59:13 2003 EDT

  Modified files:  
/php-src/ext/ircg   ircg.c 
  Log:
  MFH Fix CTCP handling so that commands without parameters are processed
  MFH Use %ld for time_t's
  MFH Provide a warning when irc_connect fails
  
  
Index: php-src/ext/ircg/ircg.c
diff -u php-src/ext/ircg/ircg.c:1.194 php-src/ext/ircg/ircg.c:1.195
--- php-src/ext/ircg/ircg.c:1.194   Tue Jul  8 17:46:19 2003
+++ php-src/ext/ircg/ircg.c Wed Aug 13 14:59:13 2003
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: ircg.c,v 1.194 2003/07/08 21:46:19 sas Exp $ */
+/* $Id: ircg.c,v 1.195 2003/08/13 18:59:13 sas Exp $ */
 
 /* {{{ includes */
 
@@ -517,36 +517,42 @@
 static void handle_ctcp(php_irconn_t *conn, smart_str *chan, smart_str *from,
smart_str *to, smart_str *msg, smart_str *result)
 {
+   char *token;
char *token_end;
-   char *real_msg;
-   char *real_msg_end;
+   char *ctcp_arg;
+   char *ctcp_arg_end;
+   format_msg_t **fmt_msg_p;
+   smart_str tmp = {0};
+   int status = 0;
 
-   for (token_end = msg->c + 1; *token_end; token_end++)
-   if (!isalpha(*token_end)) break;
+   token = msg->c + 1;
+   token_end = strchr(token, 1);
 
-   if (*token_end != '\001') {
-   real_msg = token_end + 1;
+   if (!token_end) return;
 
-   real_msg_end = strchr(real_msg, '\001');
-   if (real_msg_end) {
-   format_msg_t **fmt_msg_p;
-   smart_str tmp;
-   int status = 0;
-   
-   *real_msg_end = '\0';
-   *token_end = '\0';
-   
-   if (ircg_hash_find(&conn->ctcp_msgs, msg->c + 1, token_end - 
msg->c - 1, (void **) &fmt_msg_p) != SUCCESS) {
-   return;
-   }
-
-   smart_str_setl(&tmp, real_msg, real_msg_end - real_msg);
-   
-   format_msg(*fmt_msg_p, chan, to, from, &tmp, result, 
conn->conn.username, conn->conn.username_len, &status);
+   *token_end = 0;
+   
+   ctcp_arg = strchr(token, ' ');
+   
+   if (ctcp_arg) {
+   ctcp_arg_end = token_end;
+   token_end = ctcp_arg;
+   *token_end = 0;
+   ctcp_arg++;
+   smart_str_setl(&tmp, ctcp_arg, ctcp_arg_end - ctcp_arg);
+   }
+   
+   if (ircg_hash_find(&conn->ctcp_msgs, token, token_end - token, 
+   (void **) &fmt_msg_p) != SUCCESS) {
+   return;
+   }
+   
+   format_msg(*fmt_msg_p, chan, to, from, &tmp, result, 
+   conn->conn.username, conn->conn.username_len, &status);
 
-   if (status == 1)
-   irc_disconnect(&conn->conn, "Connection terminated by 
authenticated CTCP message");
-   }
+   if (status == 1) {
+   irc_disconnect(&conn->conn, "Connection terminated by "
+   "authenticated CTCP message");
}
 }
 
@@ -949,7 +955,7 @@
} else if ((php_ircg_now() - conn->login) > WINDOW_TIMEOUT) {
char buf[1024];
 
-   sprintf(buf, "timeout after %d seconds (%d, %d)", 
+   sprintf(buf, "timeout after %ld seconds (%ld, %ld)", 
php_ircg_now()-conn->login,
php_ircg_now(), conn->login);
irc_disconnect(ircc, buf);
@@ -2158,6 +2164,7 @@
if (drop_ref)
fmt_msgs_drop_ref(fmt_msgs);
IRCG_SHARED_FREE(conn);
+   php_error(E_WARNING, "%s(): irc_connect() failed prematurely", 
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
 



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



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

2003-08-14 Thread Marcus Boerger
helly   Sun Aug 10 16:39:18 2003 EDT

  Modified files:  
/php-src/ext/ming   ming.c 
  Log:
  Nuke unused vars
  
Index: php-src/ext/ming/ming.c
diff -u php-src/ext/ming/ming.c:1.52 php-src/ext/ming/ming.c:1.53
--- php-src/ext/ming/ming.c:1.52Fri Jul 11 03:48:11 2003
+++ php-src/ext/ming/ming.c Sun Aug 10 16:39:18 2003
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: ming.c,v 1.52 2003/07/11 07:48:11 sniper Exp $ */
+/* $Id: ming.c,v 1.53 2003/08/10 20:39:18 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1440,8 +1440,6 @@
 
 PHP_FUNCTION(swfmovie_output)
 {
-   zval **zlimit = NULL;
-   int limit = -1;
SWFMovie movie = getMovie(getThis() TSRMLS_CC);
 
 #ifdef HAVE_MING_ZLIB
@@ -1478,8 +1476,6 @@
 PHP_FUNCTION(swfmovie_saveToFile)
 {
zval **x;
-   zval **zlimit = NULL;
-   int limit = -1;
SWFMovie movie = getMovie(getThis() TSRMLS_CC);
php_stream *what;
 
@@ -1517,8 +1513,7 @@
   Saves the movie. 'where' can be stream and the movie will be saved there otherwise 
it is treated as string and written in file with that name */
 PHP_FUNCTION(swfmovie_save)
 {
-   zval **x, **zlimit = NULL;
-   int limit = -1;
+   zval **x;
long retval;
php_stream *stream;
 



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



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

2003-08-14 Thread Ard Biesheuvel
abies   Sun Aug 10 13:24:52 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Win32 fixes
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.125 php-src/ext/interbase/interbase.c:1.126
--- php-src/ext/interbase/interbase.c:1.125 Sun Aug 10 12:21:26 2003
+++ php-src/ext/interbase/interbase.c   Sun Aug 10 13:24:51 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.125 2003/08/10 16:21:26 abies Exp $ */
+/* $Id: interbase.c,v 1.126 2003/08/10 17:24:51 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -683,7 +683,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.125 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.126 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -1899,7 +1899,7 @@
 
 /* {{{ _php_ibase_do_fetch() */
 
-static void _php_ibase_do_fetch(ibase_result *ib_result)
+static void _php_ibase_do_fetch(ibase_result *ib_result TSRMLS_DC)
 {
if (ib_result->has_more_rows) {
if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, 
ib_result->out_sqlda) == 100L) {
@@ -2048,7 +2048,7 @@
RETURN_FALSE;
}

-   /* find out if what kind of statement was prepared */
+   /* find out what kind of statement was prepared */
if (isc_dsql_sql_info(IB_STATUS, &ib_query->stmt, sizeof(info_type), 
info_type, sizeof(result), result)) {
_php_ibase_error(TSRMLS_C);
free_alloca(args);
@@ -2057,12 +2057,12 @@
 
switch (result[3]) {
isc_tr_handle tr;
+   ibase_tr_list **l;

case isc_info_sql_stmt_start_trans:

/* a SET TRANSACTION statement should be executed with a NULL 
trans handle */
tr = NULL;
-   ibase_tr_list **l;

if (isc_dsql_execute_immediate(IB_STATUS, &ib_link->link, &tr, 
0, query, ib_link->dialect, NULL)) {
_php_ibase_error(TSRMLS_C);
@@ -2140,7 +2140,7 @@
unsigned i = 3, result_size = 
isc_vax_integer(&result[1],2);
 
while (result[i] != isc_info_end && i < 
result_size) {
-   short len = 
isc_vax_integer(&result[i+1],2);
+   short len = 
(short)isc_vax_integer(&result[i+1],2);
if (result[i] != 
isc_info_req_select_count) {
trans->affected_rows += 
isc_vax_integer(&result[i+3],len);
}
@@ -2157,7 +2157,7 @@
ib_query->stmt = NULL; /* keep stmt when free query */
_php_ibase_free_query(ib_query TSRMLS_CC);
ib_result->has_more_rows = 1;
-   _php_ibase_do_fetch(ib_result);
+   _php_ibase_do_fetch(ib_result TSRMLS_CC);
ZEND_REGISTER_RESOURCE(return_value, ib_result, le_result);
} else {
_php_ibase_free_query(ib_query TSRMLS_CC);
@@ -2212,7 +2212,7 @@
 /* }}} */
 
 /* {{{ proto ibase_num_rows( resource result_identifier )
-   Returns the number of records in the result */
+   Returns the number of rows in a result */
 PHP_FUNCTION(ibase_num_rows) 
 {
zval **result_arg;
@@ -2236,7 +2236,7 @@
unsigned i = 3, result_size = isc_vax_integer(&result[1],2);
 
while (result[i] != isc_info_end && i < result_size) {
-   short len = isc_vax_integer(&result[i+1],2);
+   short len = (short)isc_vax_integer(&result[i+1],2);
if (result[i] == isc_info_req_select_count) {
RETURN_LONG(isc_vax_integer(&result[i+3],len));
}
@@ -2244,6 +2244,7 @@
}
}   
 }
+/* }}} */
 
 /* {{{ _php_ibase_var_zval() */
 static int _php_ibase_var_zval(zval *val, void *data, int type, int len, int scale, 
int flag TSRMLS_DC)
@@ -2530,13 +2531,13 @@

if (isc_open_blob(IB_STATUS, 
&ib_result->link, &ib_result->trans, &bl_handle, (ISC_QUAD ISC_FAR *) var->sqldata)) {
_php_ibase_error(TSRMLS_C);
-   RETURN_FALSE;
+   goto 
_php_ibase_fetch_hash_error;
  

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

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 06:35:15 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Disable the debugging to prevent the tests from failing.
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.138 php-src/ext/interbase/interbase.c:1.139
--- php-src/ext/interbase/interbase.c:1.138 Tue Aug 12 22:19:14 2003
+++ php-src/ext/interbase/interbase.c   Wed Aug 13 06:35:14 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.138 2003/08/13 02:19:14 abies Exp $ */
+/* $Id: interbase.c,v 1.139 2003/08/13 10:35:14 sniper Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -82,8 +82,8 @@
 #endif
 
 #ifdef ZEND_DEBUG
-#define IBDEBUG(a) php_printf("::: %s (%d)\n", a, __LINE__);
-/* #define IBDEBUG(a) */
+/* #define IBDEBUG(a) php_printf("::: %s (%d)\n", a, __LINE__); */
+#define IBDEBUG(a)
 #else
 #define IBDEBUG(a)
 #endif
@@ -698,7 +698,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.138 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.139 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif



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



[PHP-CVS] cvs: CVSROOT / avail

2003-08-14 Thread Sascha Schumann
sas Tue Aug 12 05:09:50 2003 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  neufeind pear karma
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.731 CVSROOT/avail:1.732
--- CVSROOT/avail:1.731 Tue Aug 12 05:06:24 2003
+++ CVSROOT/avail   Tue Aug 12 05:09:50 2003
@@ -45,7 +45,7 @@
 # The PEAR Team has access to the full PEAR tree, the PEAR portion of
 # the PHP tree, the PEAR website, and the PEAR documentation.
 
-avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino|pear,peardoc
+avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind|pear,peardoc
 
 avail|cox,mj,vblavet,dickmann,tal,pajoye,jmcastagnetto,alexmerz|php-src/pear
 
avail|alan_k,chagenbu,cmv,cox,derick,dickmann,jon,mj,pajoye,richard,tal,antonio,alexmerz|pearweb



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



[PHP-CVS] cvs: php-src /sapi/cli php_cli.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Tue Aug 12 21:29:51 2003 EDT

  Modified files:  
/php-src/sapi/cli   php_cli.c 
  Log:
  Fixed bug #20896 (-s -w modes with php-cli cause php to hang).
  
  
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.97 php-src/sapi/cli/php_cli.c:1.98
--- php-src/sapi/cli/php_cli.c:1.97 Fri Aug  1 12:52:49 2003
+++ php-src/sapi/cli/php_cli.c  Tue Aug 12 21:29:51 2003
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.97 2003/08/01 16:52:49 iliaa Exp $ */
+/* $Id: php_cli.c,v 1.98 2003/08/13 01:29:51 iliaa Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -921,7 +921,6 @@
case PHP_MODE_STRIP:
if (open_file_for_scanning(&file_handle TSRMLS_CC)==SUCCESS) {
zend_strip(TSRMLS_C);
-   fclose(file_handle.handle.fp);
}
goto out;
break;
@@ -932,7 +931,6 @@
if (open_file_for_scanning(&file_handle 
TSRMLS_CC)==SUCCESS) {

php_get_highlight_struct(&syntax_highlighter_ini);
zend_highlight(&syntax_highlighter_ini 
TSRMLS_CC);
-   fclose(file_handle.handle.fp);
}
goto out;
}



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

2003-08-14 Thread Jani Taskinen
sniper  Tue Aug 12 21:24:27 2003 EDT

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  Fix external builds (configure run outside srcdir)
  
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.242 php-src/ext/standard/array.c:1.243
--- php-src/ext/standard/array.c:1.242  Mon Aug 11 19:16:53 2003
+++ php-src/ext/standard/array.cTue Aug 12 21:24:27 2003
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.242 2003/08/11 23:16:53 iliaa Exp $ */
+/* $Id: array.c,v 1.243 2003/08/13 01:24:27 sniper Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -39,6 +39,7 @@
 #include "win32/unistd.h"
 #endif
 #include "zend_globals.h"
+#include "zend_variables.h"
 #include "php_globals.h"
 #include "php_array.h"
 #include "basic_functions.h"



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



[PHP-CVS] cvs: php-src /ext/standard php_rand.h

2003-08-14 Thread Sara Golemon
pollita Tue Aug 12 20:49:22 2003 EDT

  Modified files:  
/php-src/ext/standard   php_rand.h 
  Log:
  Prevent carryover when max-min > signed int max
  
Index: php-src/ext/standard/php_rand.h
diff -u php-src/ext/standard/php_rand.h:1.23 php-src/ext/standard/php_rand.h:1.24
--- php-src/ext/standard/php_rand.h:1.23Sun Aug 10 20:42:29 2003
+++ php-src/ext/standard/php_rand.h Tue Aug 12 20:49:22 2003
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: php_rand.h,v 1.23 2003/08/11 00:42:29 sniper Exp $ */
+/* $Id: php_rand.h,v 1.24 2003/08/13 00:49:22 pollita Exp $ */
 
 #ifndef PHP_RAND_H
 #definePHP_RAND_H
@@ -40,7 +40,7 @@
 #endif
 
 #define RAND_RANGE(__n, __min, __max, __tmax) \
-(__n) = (__min) + (long) ((double) ((__max) - (__min) + 1.0) * ((__n) / ((__tmax) 
+ 1.0)))
+(__n) = (__min) + (long) ((double) ( (double) (__max) - (__min) + 1.0) * ((__n) / 
((__tmax) + 1.0)))
 
 /* MT Rand */
 #define PHP_MT_RAND_MAX ((long) (0x7FFF)) /* (1<<31) - 1 */ 



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



[PHP-CVS] cvs: php-src /ext/interbase/tests 002.phpt

2003-08-14 Thread Ard Biesheuvel
abies   Tue Aug 12 05:57:57 2003 EDT

  Modified files:  
/php-src/ext/interbase/tests002.phpt 
  Log:
  Tiny fix
  
Index: php-src/ext/interbase/tests/002.phpt
diff -u php-src/ext/interbase/tests/002.phpt:1.3 
php-src/ext/interbase/tests/002.phpt:1.4
--- php-src/ext/interbase/tests/002.phpt:1.3Fri Apr 25 11:43:28 2003
+++ php-src/ext/interbase/tests/002.phptTue Aug 12 05:57:57 2003
@@ -5,12 +5,10 @@
 --POST--
 --GET--
 --FILE--
-http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/com_dotnet README com_com.c com_dotnet.c com_extension.c com_handlers.c com_misc.c com_olechar.c com_typeinfo.c com_variant.c php_com_dotnet.h php_com_dotnet_internal.h /ext/com_dotnet/tests variants.phpt /main config.w32.h internal_functions_win32.c

2003-08-14 Thread Wez Furlong
wez Thu Aug 14 12:49:56 2003 EDT

  Added files: 
/php-src/ext/com_dotnet README com_com.c com_dotnet.c 
com_extension.c com_handlers.c com_misc.c 
com_olechar.c com_typeinfo.c com_variant.c 
php_com_dotnet.h php_com_dotnet_internal.h 
/php-src/ext/com_dotnet/tests   variants.phpt 

  Modified files:  
/php-src/main   config.w32.h internal_functions_win32.c 
  Log:
  Add new COM (and .Net) extension for php5.
  Not yet complete, but should work for most people.
  
  Index: php-src/main/config.w32.h
diff -u php-src/main/config.w32.h:1.75 php-src/main/config.w32.h:1.76
--- php-src/main/config.w32.h:1.75  Fri Jun 27 12:43:05 2003
+++ php-src/main/config.w32.h   Thu Aug 14 12:49:56 2003
@@ -2,7 +2,7 @@
Build Configuration for Win32.
This has only been tested with MS VisualC++ 6 (and later).
 
-   $Id: config.w32.h,v 1.75 2003/06/27 16:43:05 sebastian Exp $
+   $Id: config.w32.h,v 1.76 2003/08/14 16:49:56 wez Exp $
 */
 
 /* Default PHP / PEAR directories */
@@ -46,6 +46,10 @@
 /* #define HAVE_MBSTR_KR 0 */
 /* #define HAVE_MBSTR_RU 0 */
 /* #define HAVE_MBSTR_TW 0 */ 
+
+/* If you have the .Net SDK in your include path, define this
+ * to compile .Net support into your COM extension. */
+#define HAVE_MSCOREE_H 0
 
 /* Enable / Disable ODBC extension (default: enabled) */
 #define HAVE_UODBC 1
Index: php-src/main/internal_functions_win32.c
diff -u php-src/main/internal_functions_win32.c:1.78 
php-src/main/internal_functions_win32.c:1.79
--- php-src/main/internal_functions_win32.c:1.78Fri Jun 27 10:32:59 2003
+++ php-src/main/internal_functions_win32.c Thu Aug 14 12:49:56 2003
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: internal_functions_win32.c,v 1.78 2003/06/27 14:32:59 edink Exp $ */
+/* $Id: internal_functions_win32.c,v 1.79 2003/08/14 16:49:56 wez Exp $ */
 
 /* {{{ includes
  */
@@ -97,6 +97,7 @@
 #ifdef HAVE_SQLITE
 #include "ext/sqlite/php_sqlite.h"
 #endif
+#include "ext/com_dotnet/php_com_dotnet.h"
 /* }}} */
 
 /* {{{ php_builtin_extensions[]
@@ -109,6 +110,7 @@
 #if HAVE_CALENDAR
,phpext_calendar_ptr
 #endif
+   ,phpext_com_dotnet_ptr
 #if HAVE_CTYPE
,phpext_ctype_ptr
 #endif
@@ -135,14 +137,14 @@
 #endif
 #if HAVE_LIBXML
 #if HAVE_DOM
-   ,phpext_dom_ptr
+   phpext_dom_ptr
 #endif
 #if HAVE_SIMPLEXML
-   ,phpext_simplexml_ptr
+   phpext_simplexml_ptr
 #endif
 #endif
 #if HAVE_XML
-   ,phpext_xml_ptr
+   phpext_xml_ptr
 #endif
 #if HAVE_XML && HAVE_WDDX
,phpext_wddx_ptr

Index: php-src/ext/com_dotnet/com_com.c
+++ php-src/ext/com_dotnet/com_com.c
/*
   +--+
   | PHP Version 4|
   +--+
   | 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|
   | available through the world-wide-web at the following url:   |
   | http://www.php.net/license/3_0.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.   |
   +--+
   | Author: Wez Furlong  <[EMAIL PROTECTED]>  |
   +--+
 */

/* $Id: com_com.c,v 1.1 2003/08/14 16:49:55 wez Exp $ */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_com_dotnet.h"
#include "php_com_dotnet_internal.h"
#include "Zend/zend_default_classes.h"

/* {{{ com_create_instance - ctor for COM class */
PHP_FUNCTION(com_create_instance)
{
zval *object = getThis();
zval *server_params = NULL;
php_com_dotnet_object *obj;
char *module_name, *typelib_name = NULL, *server_name = NULL;
char *user_name = NULL, *domain_name = NULL, *password = NULL;
long module_name_len, typelib_name_len, server_name_len,
user_name_len, domain_name_len, password_len;
OLECHAR *moniker;
CLSID clsid;
CLSCTX ctx = CLSCTX_SERVER;
HRESULT res = E_FAIL;
int mode = COMG(autoreg_case_sensitive) ? CONST_CS : 0;
ITypeLib *TL = NULL;

obj = CDNO_FETCH(object);

if (FAILURE == zend_parse_parameters_ex(

[PHP-CVS] cvs: php-src /ext/pspell pspell.dsp

2003-08-14 Thread Vlad Krupin
vladWed Aug 13 14:57:19 2003 EDT

  Added files: 
/php-src/ext/pspell pspell.dsp 
  Log:
  win32 build is now possible
  Credit is due to Blaine Lang <[EMAIL PROTECTED]> for figuring that out
  

Index: php-src/ext/pspell/pspell.dsp
+++ php-src/ext/pspell/pspell.dsp
# Microsoft Developer Studio Project File - Name="pspell" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102

CFG=pspell - Win32 Debug_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "pspell.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "pspell.mak" CFG="pspell - Win32 Debug_TS"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "pspell - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "pspell - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe

!IF  "$(CFG)" == "pspell - Win32 Debug_TS"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "pspell___Win32_Debug_TS"
# PROP BASE Intermediate_Dir "pspell___Win32_Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I 
"..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D 
ZEND_DEBUG=1 /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" 
/I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /D ZEND_DEBUG=1 /D "_DEBUG" /D ZTS=1 /D HAVE_PSPELL=1 
/D "COMPILE_DL_PSPELL" /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 php4ts_debug.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib 
odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_pspell.dll" 
/pdbtype:sept /libpath:"..\..\Debug_TS"
# ADD LINK32 php4ts_debug.lib aspell-15.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 
/out:"..\..\Debug_TS/php_pspell.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" 
/libpath:"..\..\..\aspell\lib"

!ELSEIF  "$(CFG)" == "pspell - Win32 Release_TS"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "pspell___Win32_Release_TS"
# PROP BASE Intermediate_Dir "pspell___Win32_Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" 
/D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I 
"..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I 
"..\..\..\aspell\include\pspell" /D ZEND_DEBUG=0 /D "NDEBUG" /D ZTS=1 /D HAVE_PSPELL=1 
/D "COMPILE_DL_PSPELL" /D "WIN32" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "PSPELL_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 
/nologo /dll /machine:I386
# ADD LINK32 php4ts.lib aspell-15.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib 
odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_pspell.dll" 
/libpath:"..\..\Release_TS" /libpath:"..\..\..\aspell\lib"

!ENDIF 

# Begin Target

# Name "pspell - Win32 Debug_TS"
# Name "pspell - Win32 Release_TS"
# Begin Group "Source Files"

# PROP Defa

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

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 14:16:01 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  Be a bit more wordy..
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.345 php-src/NEWS:1.1247.2.346
--- php-src/NEWS:1.1247.2.345   Wed Aug 13 12:14:08 2003
+++ php-src/NEWSWed Aug 13 14:16:00 2003
@@ -17,7 +17,7 @@
 - Fixed bug #24142 (workaround for a gcc bug affecting round()). (Marcus, Ilia)
 - Fixed bug #24063 (serialize() missing 0 after the . on scientific notation).
   (Marcus, Ilia)
-- Fixed bug #23936 (fail to select and fetch). (Ard)
+- Fixed bug #23936 (ext/interbase: fail to select and fetch). (Ard)
 - Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
   situations). (Ilia)
 - Fixed bug #22245 (References inside $_SESSION not being handled). (Ilia)



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



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

2003-08-14 Thread Jani Taskinen
sniper  Sun Aug 10 20:49:19 2003 EDT

  Modified files:  
/php-src/ext/standard   basic_functions.c crypt.c 
  Log:
  Moved the RINIT(crypt) stuff into crypt() itself.
  
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.621 
php-src/ext/standard/basic_functions.c:1.622
--- php-src/ext/standard/basic_functions.c:1.621Thu Aug  7 15:53:31 2003
+++ php-src/ext/standard/basic_functions.c  Sun Aug 10 20:49:18 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.621 2003/08/07 19:53:31 moriyoshi Exp $ */
+/* $Id: basic_functions.c,v 1.622 2003/08/11 00:49:18 sniper Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1191,10 +1191,6 @@
}
 #endif
BG(user_shutdown_function_names) = NULL;
-
-#if HAVE_CRYPT
-   PHP_RINIT(crypt)(INIT_FUNC_ARGS_PASSTHRU);
-#endif
 
PHP_RINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU);
 
Index: php-src/ext/standard/crypt.c
diff -u php-src/ext/standard/crypt.c:1.57 php-src/ext/standard/crypt.c:1.58
--- php-src/ext/standard/crypt.c:1.57   Tue Jun 10 16:03:37 2003
+++ php-src/ext/standard/crypt.cSun Aug 10 20:49:19 2003
@@ -17,7 +17,7 @@
|  Rasmus Lerdorf <[EMAIL PROTECTED]> |
+--+
  */
-/* $Id: crypt.c,v 1.57 2003/06/10 20:03:37 imajes Exp $ */
+/* $Id: crypt.c,v 1.58 2003/08/11 00:49:19 sniper Exp $ */
 #include 
 
 #include "php.h"
@@ -89,8 +89,6 @@
 
 #define PHP_CRYPT_RAND php_rand(TSRMLS_C)
 
-static int php_crypt_rand_seeded=0;
-
 PHP_MINIT_FUNCTION(crypt)
 {
REGISTER_LONG_CONSTANT("CRYPT_SALT_LENGTH", PHP_MAX_SALT_LEN, CONST_CS | 
CONST_PERSISTENT);
@@ -103,16 +101,6 @@
 }
 
 
-PHP_RINIT_FUNCTION(crypt)
-{
-   if(!php_crypt_rand_seeded) {
-   php_srand(time(0) * getpid() * (unsigned long) 
(php_combined_lcg(TSRMLS_C) * 1.0) TSRMLS_CC);
-   php_crypt_rand_seeded=1;
-   } 
-   return SUCCESS;
-}
-
-
 static unsigned char itoa64[] = 
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
 static void php_to64(char *s, long v, int n)
@@ -130,6 +118,10 @@
char salt[PHP_MAX_SALT_LEN+1];
char *str, *salt_in = NULL;
int str_len, salt_in_len;
+
+   if (!BG(rand_is_seeded)) {
+   php_srand(GENERATE_SEED() TSRMLS_CC);
+   } 
 
salt[0]=salt[PHP_MAX_SALT_LEN]='\0';
/* This will produce suitable results if people depend on DES-encryption



-- 
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 config.m4 math.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Sat Aug  9 12:13:48 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   math.c config.m4 
  Log:
  MFH: Detection of buggy compiler (gcc)
  
  
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.97.2.5 php-src/ext/standard/math.c:1.97.2.6
--- php-src/ext/standard/math.c:1.97.2.5Fri Aug  8 19:42:10 2003
+++ php-src/ext/standard/math.c Sat Aug  9 12:13:47 2003
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: math.c,v 1.97.2.5 2003/08/08 23:42:10 iliaa Exp $ */
+/* $Id: math.c,v 1.97.2.6 2003/08/09 16:13:47 iliaa Exp $ */
 
 #include "php.h"
 #include "php_math.h"
@@ -32,7 +32,13 @@
 #define M_PI 3.14159265358979323846
 #endif
 
-#define PHP_ROUND_FUZZ 0.501
+#ifndef PHP_ROUND_FUZZ
+# ifndef PHP_WIN32
+#  define PHP_ROUND_FUZZ 0.501
+# else
+#  define PHP_ROUND_FUZZ 0.5
+# endif
+#endif
 
 /* {{{ proto int abs(int number)
Return the absolute value of the number */
Index: php-src/ext/standard/config.m4
diff -u php-src/ext/standard/config.m4:1.47.2.3 php-src/ext/standard/config.m4:1.47.2.4
--- php-src/ext/standard/config.m4:1.47.2.3 Thu Jun  5 00:15:03 2003
+++ php-src/ext/standard/config.m4  Sat Aug  9 12:13:47 2003
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.47.2.3 2003/06/05 04:15:03 sniper Exp $ -*- sh -*-
+dnl $Id: config.m4,v 1.47.2.4 2003/08/09 16:13:47 iliaa Exp $ -*- sh -*-
 
 divert(3)dnl
 
@@ -225,6 +225,27 @@
 ],[
   REGEX_TYPE=php
 ])
+
+dnl
+dnl round fuzz
+dnl
+AC_MSG_CHECKING([whether rounding works as expected])
+AC_TRY_RUN([
+#include 
+  int main() {
+return floor(0.045*pow(10,2) + 0.5)/10.0 != 0.5;
+  }
+],[
+  PHP_ROUND_FUZZ=0.5
+  AC_MSG_RESULT(yes)
+],[
+  PHP_ROUND_FUZZ=0.501
+  AC_MSG_RESULT(no)
+],[
+  PHP_ROUND_FUZZ=0.501
+  AC_MSG_RESULT(cross compile)
+])
+AC_DEFINE_UNQUOTED(PHP_ROUND_FUZZ, $PHP_ROUND_FUZZ, [ see #24142 ])
 
 AC_FUNC_FNMATCH
 



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



[PHP-CVS] cvs: php-src /ext/standard/tests/array bug21918.phpt

2003-08-14 Thread Jani Taskinen
sniper  Wed Aug 13 05:48:20 2003 EDT

  Modified files:  
/php-src/ext/standard/tests/array   bug21918.phpt 
  Log:
  Fix the test. (this was mixed test with bug #24159)
  
Index: php-src/ext/standard/tests/array/bug21918.phpt
diff -u php-src/ext/standard/tests/array/bug21918.phpt:1.1 
php-src/ext/standard/tests/array/bug21918.phpt:1.2
--- php-src/ext/standard/tests/array/bug21918.phpt:1.1  Mon Aug 11 16:14:25 2003
+++ php-src/ext/standard/tests/array/bug21918.phpt  Wed Aug 13 05:48:20 2003
@@ -1,36 +1,36 @@
---TEST--
---FILE--
-'a', '-2'=>'b', 3=>'c', '4'=>'d', 5=>'e', '6001'=>'f', '07'=>'g');
-
-foreach($a as $k => $v) {
-   var_dump($k);
-   var_dump($v);
-}
-
-echo "==Normal==\n";
-$b = array();
-$b[] = 'a';
-
-foreach($b as $k => $v) {
-   var_dump($k);
-   var_dump($v);
-}
-
-echo "==Negative==\n";
-$c = array('-2' => 'a');
-$c[] = 'b';
-
-foreach($c as $k => $v) {
-   var_dump($k);
-   var_dump($v);
-}
-
-echo "==Done==\n";
-?>
---EXPECT--
+--TEST--
+Bug #21918 (different handling of positive vs. negative array indexes)
+--FILE--
+'a', '-2'=>'b', 3=>'c', '4'=>'d', 5=>'e', '6001'=>'f', '07'=>'g');
+
+foreach($a as $k => $v) {
+   var_dump($k);
+   var_dump($v);
+}
+
+echo "==Normal==\n";
+$b = array();
+$b[] = 'a';
+
+foreach($b as $k => $v) {
+   var_dump($k);
+   var_dump($v);
+}
+
+echo "==Negative==\n";
+$c = array('-2' => 'a');
+
+foreach($c as $k => $v) {
+   var_dump($k);
+   var_dump($v);
+}
+
+echo "==Done==\n";
+?>
+--EXPECT--
 ==Mixed==
 int(-1)
 string(1) "a"
@@ -46,12 +46,10 @@
 string(1) "f"
 string(2) "07"
 string(1) "g"
-==Normal==
-int(0)
+==Normal==
+int(0)
 string(1) "a"
 ==Negative==
-int(-2)
+int(-2)
 string(1) "a"
-int(-1)
-string(1) "b"
-==Done==
+==Done==



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



[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-14 Thread Ard Biesheuvel
abies   Tue Aug 12 22:19:15 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c php_interbase.h 
  Log:
  Allow the use of EXECUTE PROCEDURE statements
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.137 php-src/ext/interbase/interbase.c:1.138
--- php-src/ext/interbase/interbase.c:1.137 Tue Aug 12 14:01:59 2003
+++ php-src/ext/interbase/interbase.c   Tue Aug 12 22:19:14 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.137 2003/08/12 18:01:59 abies Exp $ */
+/* $Id: interbase.c,v 1.138 2003/08/13 02:19:14 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -82,8 +82,8 @@
 #endif
 
 #ifdef ZEND_DEBUG
-/* #define IBDEBUG(a) php_printf("::: %s (%d)\n", a, __LINE__); */
-#define IBDEBUG(a)
+#define IBDEBUG(a) php_printf("::: %s (%d)\n", a, __LINE__);
+/* #define IBDEBUG(a) */
 #else
 #define IBDEBUG(a)
 #endif
@@ -698,7 +698,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.137 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.138 $");
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
@@ -1554,7 +1554,8 @@
BIND_BUF *bind_buf = NULL;
int rv = FAILURE;
char info_count[] = {isc_info_sql_records}, result[64];
-
+   ISC_STATUS isc_result;
+   
RESET_ERRMSG;
 
if (argc > 0 && args != NULL) {
@@ -1627,6 +1628,7 @@
IB_RESULT->link = ib_query->link->handle;
IB_RESULT->trans = ib_query->trans->handle;
IB_RESULT->stmt = ib_query->stmt; 
+   IB_RESULT->statement_type = ib_query->statement_type;
IB_RESULT->drop_stmt = 0; /* when free result close but not drop!*/
 
out_sqlda = IB_RESULT->out_sqlda = 
emalloc(XSQLDA_LENGTH(ib_query->out_sqlda->sqld));
@@ -1656,7 +1658,12 @@
}
}
 
-   if (isc_dsql_execute(IB_STATUS, &ib_query->trans->handle, &ib_query->stmt, 
ib_query->dialect, in_sqlda)) {
+   if (ib_query->statement_type == isc_info_sql_stmt_exec_procedure) {
+   isc_result = isc_dsql_execute2(IB_STATUS, &ib_query->trans->handle, 
&ib_query->stmt, SQLDA_CURRENT_VERSION, in_sqlda, out_sqlda);
+   } else {
+   isc_result = isc_dsql_execute(IB_STATUS, &ib_query->trans->handle, 
&ib_query->stmt, SQLDA_CURRENT_VERSION, in_sqlda);
+   }
+   if (isc_result) {
IBDEBUG("Could not execute query");
_php_ibase_error(TSRMLS_C);
goto _php_ibase_exec_error;
@@ -2505,15 +2512,20 @@
RETURN_FALSE;
}
 
-   if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, ib_result->out_sqlda)) {
+   if (ib_result->statement_type != isc_info_sql_stmt_exec_procedure) {
 
-   ib_result->has_more_rows = 0;
-   if (IB_STATUS[0] && IB_STATUS[1]) { /* error in fetch */
-   _php_ibase_error(TSRMLS_C);
+   if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, 
ib_result->out_sqlda)) {
+   
+   ib_result->has_more_rows = 0;
+   if (IB_STATUS[0] && IB_STATUS[1]) { /* error in fetch */
+   _php_ibase_error(TSRMLS_C);
+   }
+   RETURN_FALSE;
}
-   RETURN_FALSE;
-   }
-
+   } else {
+   ib_result->has_more_rows = 0;
+   }   
+   
array_init(return_value);

arr_cnt = 0;
Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.46 
php-src/ext/interbase/php_interbase.h:1.47
--- php-src/ext/interbase/php_interbase.h:1.46  Tue Aug 12 14:08:13 2003
+++ php-src/ext/interbase/php_interbase.h   Tue Aug 12 22:19:14 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_interbase.h,v 1.46 2003/08/12 18:08:13 abies Exp $ */
+/* $Id: php_interbase.h,v 1.47 2003/08/13 02:19:14 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -166,6 +166,7 @@
XSQLDA *out_sqlda;
ibase_array *out_array;
unsigned char has_more_rows;
+   char statement_type;
 } ibase_result;
 
 typedef struct _php_ibase_varchar {



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

2003-08-14 Thread Marcus Boerger
helly   Mon Aug 11 16:19:51 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  BFN
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.341 php-src/NEWS:1.1247.2.342
--- php-src/NEWS:1.1247.2.341   Mon Aug 11 15:21:22 2003
+++ php-src/NEWSMon Aug 11 16:19:50 2003
@@ -20,6 +20,7 @@
   situations). (Ilia)
 - Fixed bug #22245 (References inside $_SESSION not being handled). (Ilia)
 - Fixed bug #21957 (serialize() mangles objects with __sleep). (Ilia)
+- Fixed bug #21918 (strange behaviour of mixed type in array-keys). (Marcus)
 
 07 Aug 2003, Version 4.3.3RC3
 - Fixed bug #24958 (Incorrect handling of 404s). (Ilia, Justin)



-- 
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 /ext/odbc php_odbc.c

2003-08-14 Thread Ilia Alshanetsky
iliaa   Thu Aug 14 10:37:33 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/odbc   php_odbc.c 
/php-srcNEWS 
  Log:
  MFH: Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields).
  
  
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.143.2.14 php-src/ext/odbc/php_odbc.c:1.143.2.15
--- php-src/ext/odbc/php_odbc.c:1.143.2.14  Sun Aug 10 22:08:32 2003
+++ php-src/ext/odbc/php_odbc.c Thu Aug 14 10:37:33 2003
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.143.2.14 2003/08/11 02:08:32 sniper Exp $ */
+/* $Id: php_odbc.c,v 1.143.2.15 2003/08/14 14:37:33 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1459,8 +1459,13 @@
if (result_type & ODBC_NUM) {
zend_hash_index_update(Z_ARRVAL_P(return_value), i, &tmp, 
sizeof(pval *), NULL);
} else {
-   zend_hash_update(Z_ARRVAL_P(return_value), 
result->values[i].name, 
+   if (!*(result->values[i].name)) {
+   zend_hash_update(Z_ARRVAL_P(return_value), 
Z_STRVAL_P(tmp),
+   Z_STRLEN_P(tmp)+1, &tmp, sizeof(pval *), NULL);
+   } else {
+   zend_hash_update(Z_ARRVAL_P(return_value), 
result->values[i].name, 
strlen(result->values[i].name)+1, &tmp, 
sizeof(pval *), NULL);
+   }
}
}
if (buf) efree(buf);
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.347 php-src/NEWS:1.1247.2.348
--- php-src/NEWS:1.1247.2.347   Wed Aug 13 21:32:02 2003
+++ php-src/NEWSThu Aug 14 10:37:33 2003
@@ -2,6 +2,7 @@
 |||
 ?? Aug 2003, Version 4.3.3RC4
 - Fixed bug #25084 (Make refer check not dependant on register_globals). (Ilia)
+- Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). (Ilia)
 - Fixed bug #25044 (header("Location:") changing HTTP status). (Marcus)
 - Fixed bug #25037 (Possible infinite loop inside SendText()). (Ilia)
 - Fixed bug #25007 (rand() & mt_rand() seed RNG every call). (Jani)



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



Re: [PHP-CVS] cvs: php-src /ext/sqlite sqlite.c

2003-08-14 Thread Wez Furlong
Let's have some whitespace around the ternary :-)

On Tue, 12 Aug 2003, Marcus Boerger wrote:

> helly Tue Aug 12 17:15:16 2003 EDT
> + php_sqlite_open(fullpath?fullpath:filename, mode, NULL, return_value, errmsg, 
> object TSRMLS_CC);


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



  1   2   >