[PHP-CVS] cvs: CVSROOT / avail

2008-04-16 Thread Pierre-Alain Joye
pajoye  Wed Apr 16 09:17:38 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - (run|class)kit karma for mlively
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1378r2=1.1379diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1378 CVSROOT/avail:1.1379
--- CVSROOT/avail:1.1378Tue Apr 15 12:13:47 2008
+++ CVSROOT/avail   Wed Apr 16 09:17:38 2008
@@ -286,6 +286,7 @@
 avail|ramsey|pecl/uploadprogress,pecl/pdo_user
 avail|seariver|pecl/wxwidgets
 avail|pestilence669|pecl/xrange
+avail|mlively|pecl/runkit,pecl/classkit
 
 # Objective-C bridge
 avail|wez,jan|php-objc



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



[PHP-CVS] cvs: php-src /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/mysqlnd mysqlnd.c mysqlnd.h mysqlnd_debug.h mysqlnd_libmysql_compat.h mysqlnd_loaddata.c mysqlnd_ps.c mysqlnd_ps_codec.c m

2008-04-16 Thread Andrey Hristov
andrey  Wed Apr 16 12:53:18 2008 UTC

  Modified files:  
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli mysqli_api.c 
/php-src/ext/mysqlndmysqlnd.c mysqlnd.h mysqlnd_debug.h 
mysqlnd_libmysql_compat.h mysqlnd_loaddata.c 
mysqlnd_ps.c mysqlnd_ps_codec.c 
mysqlnd_result.c mysqlnd_result_meta.c 
mysqlnd_structs.h mysqlnd_wireprotocol.c 
php_mysqlnd.c 
  Log:
  Update ext/mysql, ext/mysqli and ext/mysqlnd from development tree
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.257r2=1.258diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.257 php-src/ext/mysql/php_mysql.c:1.258
--- php-src/ext/mysql/php_mysql.c:1.257 Mon Mar 10 20:27:15 2008
+++ php-src/ext/mysql/php_mysql.c   Wed Apr 16 12:53:18 2008
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.257 2008/03/10 20:27:15 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.258 2008/04/16 12:53:18 andrey Exp $ */
 
 /* TODO:
  *
@@ -1882,7 +1882,7 @@
switch(Z_TYPE_PP(field)) {
case IS_STRING: {
int i=0;
-   MYSQL_FIELD *tmp_field;
+   const MYSQL_FIELD *tmp_field;
char *table_name, *field_name, *tmp;
 
if ((tmp=strchr(Z_STRVAL_PP(field), 
'.'))) {
@@ -2412,7 +2412,7 @@
 {
zval **result, **field=NULL;
MYSQL_RES *mysql_result;
-   MYSQL_FIELD *mysql_field;
+   const MYSQL_FIELD *mysql_field;

switch (ZEND_NUM_ARGS()) {
case 1:
@@ -2497,7 +2497,7 @@
 {
zval **result, **field;
MYSQL_RES *mysql_result;
-   MYSQL_FIELD *mysql_field = {0};
+   const MYSQL_FIELD *mysql_field = {0};
char buf[512];
int  len;
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.163r2=1.164diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.163 
php-src/ext/mysqli/mysqli_api.c:1.164
--- php-src/ext/mysqli/mysqli_api.c:1.163   Thu Mar 20 15:34:09 2008
+++ php-src/ext/mysqli/mysqli_api.c Wed Apr 16 12:53:18 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_api.c,v 1.163 2008/03/20 15:34:09 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.164 2008/04/16 12:53:18 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -166,7 +166,7 @@
if (argc == start) {
return PASS;
}
-   params = emalloc((argc - start) * sizeof(MYSQLND_PARAM_BIND));
+   params = safe_emalloc(argc - start, sizeof(MYSQLND_PARAM_BIND), 0);
for (i = 0; i  (argc - start); i++) {
zend_uchar type;
switch (types[i]) {
@@ -445,7 +445,7 @@
unsigned int i;
MYSQLND_RESULT_BIND *params;
 
-   params = emalloc((argc - start) * sizeof(MYSQLND_RESULT_BIND));
+   params = safe_emalloc(argc - start, sizeof(MYSQLND_RESULT_BIND), 0);
for (i = 0; i  (argc - start); i++) {
params[i].zv = *(args[i + start]);
}
@@ -1038,7 +1038,7 @@
 /* }}} */
 
 /* {{{  php_add_field_properties */
-static void php_add_field_properties(zval *value, MYSQL_FIELD *field TSRMLS_DC)
+static void php_add_field_properties(zval *value, const MYSQL_FIELD *field 
TSRMLS_DC)
 {
add_property_utf8_string(value, name,(field-name ? field-name : 
), ZSTR_DUPLICATE);
add_property_utf8_string(value, orgname,(field-org_name ? 
field-org_name : ), ZSTR_DUPLICATE);
@@ -1061,7 +1061,7 @@
 {
MYSQL_RES   *result;
zval*mysql_result;
-   MYSQL_FIELD *field;
+   const MYSQL_FIELD   *field;
 
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O, mysql_result, mysqli_result_class_entry) == FAILURE) {
return;
@@ -1084,9 +1084,7 @@
 {
MYSQL_RES   *result;
zval*mysql_result;
-   MYSQL_FIELD *field;
zval*obj;
-
unsigned int i;
 
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O, mysql_result, mysqli_result_class_entry) == FAILURE) {
@@ -1098,7 +1096,7 @@
array_init(return_value);
 
for (i = 0; i  mysql_num_fields(result); i++) {
-   field = mysql_fetch_field_direct(result, i);
+   const MYSQL_FIELD *field = mysql_fetch_field_direct(result, i);
 
MAKE_STD_ZVAL(obj);
object_init(obj);
@@ -1115,7 +1113,7 @@
 {
MYSQL_RES   *result;
 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/mysqlnd mysqlnd.c mysqlnd.h mysqlnd_debug.h mysqlnd_libmysql_compat.h mysqlnd_loaddata.c mysqlnd_ps.c mysqlnd_ps_

2008-04-16 Thread Andrey Hristov
andrey  Wed Apr 16 12:57:38 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli mysqli_api.c 
/php-src/ext/mysqlndmysqlnd.c mysqlnd.h mysqlnd_debug.h 
mysqlnd_libmysql_compat.h mysqlnd_loaddata.c 
mysqlnd_ps.c mysqlnd_ps_codec.c 
mysqlnd_result.c mysqlnd_result_meta.c 
mysqlnd_structs.h mysqlnd_wireprotocol.c 
php_mysqlnd.c 
  Log:
  MFB: Update CVS from the development tree
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.16r2=1.213.2.6.2.16.2.17diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.16 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.17
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.16   Mon Mar 10 22:15:36 2008
+++ php-src/ext/mysql/php_mysql.c   Wed Apr 16 12:57:38 2008
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.16 2008/03/10 22:15:36 felipe Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.17 2008/04/16 12:57:38 andrey Exp $ */
 
 /* TODO:
  *
@@ -1871,7 +1871,7 @@
switch(Z_TYPE_PP(field)) {
case IS_STRING: {
int i=0;
-   MYSQL_FIELD *tmp_field;
+   const MYSQL_FIELD *tmp_field;
char *table_name, *field_name, *tmp;
 
if ((tmp=strchr(Z_STRVAL_PP(field), 
'.'))) {
@@ -2375,7 +2375,7 @@
 {
zval **result, **field=NULL;
MYSQL_RES *mysql_result;
-   MYSQL_FIELD *mysql_field;
+   const MYSQL_FIELD *mysql_field;

switch (ZEND_NUM_ARGS()) {
case 1:
@@ -2460,7 +2460,7 @@
 {
zval **result, **field;
MYSQL_RES *mysql_result;
-   MYSQL_FIELD *mysql_field = {0};
+   const MYSQL_FIELD *mysql_field = {0};
char buf[512];
int  len;
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.16.2.15r2=1.118.2.22.2.16.2.16diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.15 
php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.16
--- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.15Thu Mar 20 
14:03:29 2008
+++ php-src/ext/mysqli/mysqli_api.c Wed Apr 16 12:57:38 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_api.c,v 1.118.2.22.2.16.2.15 2008/03/20 14:03:29 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.118.2.22.2.16.2.16 2008/04/16 12:57:38 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -166,7 +166,7 @@
if (argc == start) {
return PASS;
}
-   params = emalloc((argc - start) * sizeof(MYSQLND_PARAM_BIND));
+   params = safe_emalloc(argc - start, sizeof(MYSQLND_PARAM_BIND), 0);
for (i = 0; i  (argc - start); i++) {
zend_uchar type;
switch (types[i]) {
@@ -445,7 +445,7 @@
unsigned int i;
MYSQLND_RESULT_BIND *params;
 
-   params = emalloc((argc - start) * sizeof(MYSQLND_RESULT_BIND));
+   params = safe_emalloc(argc - start, sizeof(MYSQLND_RESULT_BIND), 0);
for (i = 0; i  (argc - start); i++) {
params[i].zv = *(args[i + start]);
}
@@ -984,7 +984,7 @@
 /* }}} */
 
 /* {{{  php_add_field_properties */
-static void php_add_field_properties(zval *value, MYSQL_FIELD *field TSRMLS_DC)
+static void php_add_field_properties(zval *value, const MYSQL_FIELD *field 
TSRMLS_DC)
 {
add_property_string(value, name,(field-name ? field-name : ), 1);
add_property_string(value, orgname,(field-org_name ? field-org_name 
: ), 1);
@@ -1007,7 +1007,7 @@
 {
MYSQL_RES   *result;
zval*mysql_result;
-   MYSQL_FIELD *field;
+   const MYSQL_FIELD   *field;
 
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O, mysql_result, mysqli_result_class_entry) == FAILURE) {
return;
@@ -1030,7 +1030,6 @@
 {
MYSQL_RES   *result;
zval*mysql_result;
-   MYSQL_FIELD *field;
zval*obj;
 
unsigned int i;
@@ -1044,7 +1043,7 @@
array_init(return_value);
 
for (i = 0; i  mysql_num_fields(result); i++) {
-   field = mysql_fetch_field_direct(result, i);
+   const MYSQL_FIELD *field = mysql_fetch_field_direct(result, i);
 
MAKE_STD_ZVAL(obj);
object_init(obj);
@@ -1061,7 +1060,7 @@
 {

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

2008-04-16 Thread Antony Dovgal
tony2001Wed Apr 16 13:02:26 2008 UTC

  Modified files:  
/php-src/ext/ldap   ldap.c php_ldap.h 
  Log:
  convert ext/ldap to use new parameter parsing API
  also restructure the extension to get rid of some garbage
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.180r2=1.181diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.180 php-src/ext/ldap/ldap.c:1.181
--- php-src/ext/ldap/ldap.c:1.180   Sat Feb  9 21:58:39 2008
+++ php-src/ext/ldap/ldap.c Wed Apr 16 13:02:26 2008
@@ -23,7 +23,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.180 2008/02/09 21:58:39 johannes Exp $ */
+/* $Id: ldap.c,v 1.181 2008/04/16 13:02:26 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -94,99 +94,6 @@
 
 static int le_link, le_result, le_result_entry;
 
-/*
-   This is just a small subset of the functionality provided by the LDAP 
library. All the 
-   operations are synchronous. Referrals are not handled automatically.
-*/
-/* {{{ ldap_functions[]
- */
-const zend_function_entry ldap_functions[] = {
-   PHP_FE(ldap_connect,
NULL)
-   PHP_FALIAS(ldap_close,  ldap_unbind,NULL)
-   PHP_FE(ldap_bind,   
NULL)
-#ifdef HAVE_LDAP_SASL
-   PHP_FE(ldap_sasl_bind,  
NULL)
-#endif
-   PHP_FE(ldap_unbind, 
NULL)
-   PHP_FE(ldap_read,   
NULL)
-   PHP_FE(ldap_list,   
NULL)
-   PHP_FE(ldap_search, 
NULL)
-   PHP_FE(ldap_free_result,
NULL)
-   PHP_FE(ldap_count_entries,  
NULL)
-   PHP_FE(ldap_first_entry,
NULL)
-   PHP_FE(ldap_next_entry, 
NULL)
-   PHP_FE(ldap_get_entries,
NULL)
-   PHP_FE(ldap_first_attribute,third_arg_force_ref)
-   PHP_FE(ldap_next_attribute, third_arg_force_ref)
-   PHP_FE(ldap_get_attributes, 
NULL)
-   PHP_FALIAS(ldap_get_values, ldap_get_values_len,
NULL)
-   PHP_FE(ldap_get_values_len, 
NULL)
-   PHP_FE(ldap_get_dn, 
NULL)
-   PHP_FE(ldap_explode_dn, 
NULL)
-   PHP_FE(ldap_dn2ufn, 
NULL)
-   PHP_FE(ldap_add,
NULL)
-   PHP_FE(ldap_delete, 
NULL)
-   PHP_FALIAS(ldap_modify, ldap_mod_replace,   NULL)
-
-/* additional functions for attribute based modifications, Gerrit Thomson */
-   PHP_FE(ldap_mod_add,
NULL)
-   PHP_FE(ldap_mod_replace,
NULL)
-   PHP_FE(ldap_mod_del,
NULL)
-/* end gjt mod */
-
-   PHP_FE(ldap_errno,  
NULL)
-   PHP_FE(ldap_err2str,
NULL)
-   PHP_FE(ldap_error,  
NULL)
-   PHP_FE(ldap_compare,
NULL)
-   PHP_FE(ldap_sort,   
NULL)
-
-#if (LDAP_API_VERSION  2000) || HAVE_NSLDAP || HAVE_ORALDAP_10
-   PHP_FE(ldap_rename, 
NULL)
-   PHP_FE(ldap_get_option, third_arg_force_ref)
-   PHP_FE(ldap_set_option, 
NULL)
-   PHP_FE(ldap_first_reference,
NULL)
-   PHP_FE(ldap_next_reference, 
NULL)
-#ifdef HAVE_LDAP_PARSE_REFERENCE
-   PHP_FE(ldap_parse_reference,third_arg_force_ref)
-#endif
-#ifdef HAVE_LDAP_PARSE_RESULT
-   

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

2008-04-16 Thread Antony Dovgal
tony2001Wed Apr 16 13:17:44 2008 UTC

  Modified files:  
/php-src/ext/ldap   ldap.c 
  Log:
  unicode support and minor leak fix
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.181r2=1.182diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.181 php-src/ext/ldap/ldap.c:1.182
--- php-src/ext/ldap/ldap.c:1.181   Wed Apr 16 13:02:26 2008
+++ php-src/ext/ldap/ldap.c Wed Apr 16 13:17:44 2008
@@ -23,7 +23,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.181 2008/04/16 13:02:26 tony2001 Exp $ */
+/* $Id: ldap.c,v 1.182 2008/04/16 13:17:44 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -237,7 +237,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.181 
2008/04/16 13:02:26 tony2001 Exp $);
+   php_info_print_table_row(2, RCS Version, $Id: ldap.c,v 1.182 
2008/04/16 13:17:44 tony2001 Exp $);
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, %ld/unlimited, LDAPG(num_links));
@@ -1294,9 +1294,10 @@
ldap_linkdata *ld;
char *dn;
LDAPMod **ldap_mods;
-   int i, j, num_attribs, num_values, dn_len;
+   int i, j, num_attribs, num_values, dn_len, res;
+   unsigned int attribute_len;
int *num_berval;
-   char *attribute;
+   zstr attribute;
ulong index;
int is_full_add=0; /* flag for full add operation so ldap_mod_add can 
be put back into oper, gerrit THomson */
 
@@ -1322,13 +1323,27 @@
ldap_mods[i] = emalloc(sizeof(LDAPMod));
ldap_mods[i]-mod_op = oper | LDAP_MOD_BVALUES;
 
-   if (zend_hash_get_current_key(Z_ARRVAL_P(entry), attribute, 
index, 0) == HASH_KEY_IS_STRING) {
-   ldap_mods[i]-mod_type = estrdup(attribute);
+   res = zend_hash_get_current_key_ex(Z_ARRVAL_P(entry), 
attribute, attribute_len, index, 0, NULL);
+   if (res == HASH_KEY_IS_STRING) {
+   ldap_mods[i]-mod_type = estrndup(attribute.s, 
attribute_len - 1);
+   } else if (res == HASH_KEY_IS_UNICODE) {
+   char *tmp = zend_unicode_to_ascii(attribute.u, 
attribute_len - 1 TSRMLS_CC);
+   if (tmp) {
+   ldap_mods[i]-mod_type = estrdup(tmp);
+   } else {
+   ldap_mods[i]-mod_type = NULL;
+   goto error_out;
+   }
} else {
+error_out:
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
attribute in the data);
/* Free allocated memory */
while (i = 0) {
-   efree(ldap_mods[i--]);
+   if (ldap_mods[i]-mod_type) {
+   efree(ldap_mods[i]-mod_type);
+   }
+   efree(ldap_mods[i]);
+   i--;
}
efree(num_berval);
efree(ldap_mods);   



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

2008-04-16 Thread Antony Dovgal
tony2001Wed Apr 16 13:19:31 2008 UTC

  Modified files:  
/php-src/ext/ldap   ldap.c 
  Log:
  always initialize mod_type
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.182r2=1.183diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.182 php-src/ext/ldap/ldap.c:1.183
--- php-src/ext/ldap/ldap.c:1.182   Wed Apr 16 13:17:44 2008
+++ php-src/ext/ldap/ldap.c Wed Apr 16 13:19:31 2008
@@ -23,7 +23,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.182 2008/04/16 13:17:44 tony2001 Exp $ */
+/* $Id: ldap.c,v 1.183 2008/04/16 13:19:31 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -237,7 +237,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.182 
2008/04/16 13:17:44 tony2001 Exp $);
+   php_info_print_table_row(2, RCS Version, $Id: ldap.c,v 1.183 
2008/04/16 13:19:31 tony2001 Exp $);
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, %ld/unlimited, LDAPG(num_links));
@@ -1322,6 +1322,7 @@
for (i = 0; i  num_attribs; i++) {
ldap_mods[i] = emalloc(sizeof(LDAPMod));
ldap_mods[i]-mod_op = oper | LDAP_MOD_BVALUES;
+   ldap_mods[i]-mod_type = NULL;
 
res = zend_hash_get_current_key_ex(Z_ARRVAL_P(entry), 
attribute, attribute_len, index, 0, NULL);
if (res == HASH_KEY_IS_STRING) {
@@ -1331,7 +1332,6 @@
if (tmp) {
ldap_mods[i]-mod_type = estrdup(tmp);
} else {
-   ldap_mods[i]-mod_type = NULL;
goto error_out;
}
} else {



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



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

2008-04-16 Thread Antony Dovgal
tony2001Wed Apr 16 13:20:59 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/ldap   ldap.c 
  Log:
  plug minor memleak
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.161.2.3.2.11.2.5r2=1.161.2.3.2.11.2.6diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.5 
php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.6
--- php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.5  Sat Feb  9 21:59:17 2008
+++ php-src/ext/ldap/ldap.c Wed Apr 16 13:20:59 2008
@@ -23,7 +23,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.161.2.3.2.11.2.5 2008/02/09 21:59:17 johannes Exp $ */
+/* $Id: ldap.c,v 1.161.2.3.2.11.2.6 2008/04/16 13:20:59 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -327,7 +327,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.161.2.3.2.11.2.5 2008/02/09 21:59:17 johannes Exp $);
+   php_info_print_table_row(2, RCS Version, $Id: ldap.c,v 
1.161.2.3.2.11.2.6 2008/04/16 13:20:59 tony2001 Exp $);
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, %ld/unlimited, LDAPG(num_links));
@@ -1425,6 +1425,7 @@
for (i = 0; i  num_attribs; i++) {
ldap_mods[i] = emalloc(sizeof(LDAPMod));
ldap_mods[i]-mod_op = oper | LDAP_MOD_BVALUES;
+   ldap_mods[i]-mod_type = NULL;
 
if (zend_hash_get_current_key(Z_ARRVAL_PP(entry), attribute, 
index, 0) == HASH_KEY_IS_STRING) {
ldap_mods[i]-mod_type = estrdup(attribute);
@@ -1432,7 +1433,11 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
attribute in the data);
/* Free allocated memory */
while (i = 0) {
-   efree(ldap_mods[i--]);
+   if (ldap_mods[i]-mod_type) {
+   efree(ldap_mods[i]-mod_type);
+   }
+   efree(ldap_mods[i]);
+   i--;
}
efree(num_berval);
efree(ldap_mods);   



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/ldap ldap.c php_ldap.h

2008-04-16 Thread Antony Dovgal
tony2001Wed Apr 16 14:21:05 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/ldap   ldap.c php_ldap.h 
  Log:
  MFH: use new parameter parsing API
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.161.2.3.2.11.2.6r2=1.161.2.3.2.11.2.7diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.6 
php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.7
--- php-src/ext/ldap/ldap.c:1.161.2.3.2.11.2.6  Wed Apr 16 13:20:59 2008
+++ php-src/ext/ldap/ldap.c Wed Apr 16 14:21:04 2008
@@ -23,7 +23,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.161.2.3.2.11.2.6 2008/04/16 13:20:59 tony2001 Exp $ */
+/* $Id: ldap.c,v 1.161.2.3.2.11.2.7 2008/04/16 14:21:04 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -94,99 +94,6 @@
 
 static int le_link, le_result, le_result_entry;
 
-/*
-   This is just a small subset of the functionality provided by the LDAP 
library. All the 
-   operations are synchronous. Referrals are not handled automatically.
-*/
-/* {{{ ldap_functions[]
- */
-const zend_function_entry ldap_functions[] = {
-   PHP_FE(ldap_connect,
NULL)
-   PHP_FALIAS(ldap_close,  ldap_unbind,NULL)
-   PHP_FE(ldap_bind,   
NULL)
-#ifdef HAVE_LDAP_SASL
-   PHP_FE(ldap_sasl_bind,  
NULL)
-#endif
-   PHP_FE(ldap_unbind, 
NULL)
-   PHP_FE(ldap_read,   
NULL)
-   PHP_FE(ldap_list,   
NULL)
-   PHP_FE(ldap_search, 
NULL)
-   PHP_FE(ldap_free_result,
NULL)
-   PHP_FE(ldap_count_entries,  
NULL)
-   PHP_FE(ldap_first_entry,
NULL)
-   PHP_FE(ldap_next_entry, 
NULL)
-   PHP_FE(ldap_get_entries,
NULL)
-   PHP_FE(ldap_first_attribute,third_arg_force_ref)
-   PHP_FE(ldap_next_attribute, third_arg_force_ref)
-   PHP_FE(ldap_get_attributes, 
NULL)
-   PHP_FALIAS(ldap_get_values, ldap_get_values_len,
NULL)
-   PHP_FE(ldap_get_values_len, 
NULL)
-   PHP_FE(ldap_get_dn, 
NULL)
-   PHP_FE(ldap_explode_dn, 
NULL)
-   PHP_FE(ldap_dn2ufn, 
NULL)
-   PHP_FE(ldap_add,
NULL)
-   PHP_FE(ldap_delete, 
NULL)
-   PHP_FALIAS(ldap_modify, ldap_mod_replace,   NULL)
-
-/* additional functions for attribute based modifications, Gerrit Thomson */
-   PHP_FE(ldap_mod_add,
NULL)
-   PHP_FE(ldap_mod_replace,
NULL)
-   PHP_FE(ldap_mod_del,
NULL)
-/* end gjt mod */
-
-   PHP_FE(ldap_errno,  
NULL)
-   PHP_FE(ldap_err2str,
NULL)
-   PHP_FE(ldap_error,  
NULL)
-   PHP_FE(ldap_compare,
NULL)
-   PHP_FE(ldap_sort,   
NULL)
-
-#if (LDAP_API_VERSION  2000) || HAVE_NSLDAP || HAVE_ORALDAP_10
-   PHP_FE(ldap_rename, 
NULL)
-   PHP_FE(ldap_get_option, third_arg_force_ref)
-   PHP_FE(ldap_set_option, 
NULL)
-   PHP_FE(ldap_first_reference,
NULL)
-   PHP_FE(ldap_next_reference, 
NULL)
-#ifdef HAVE_LDAP_PARSE_REFERENCE
-   PHP_FE(ldap_parse_reference,third_arg_force_ref)
-#endif
-#ifdef 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/date php_date.c /ext/date/tests bug44742.phpt

2008-04-16 Thread Derick Rethans
derick  Wed Apr 16 17:21:46 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests bug44742.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
  Log:
  - Fixed bug #44703 (htmlspecialchars() does not detect bad character set
argument).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1142r2=1.2027.2.547.2.1143diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1142 php-src/NEWS:1.2027.2.547.2.1143
--- php-src/NEWS:1.2027.2.547.2.1142Fri Apr 11 19:01:24 2008
+++ php-src/NEWSWed Apr 16 17:21:44 2008
@@ -1,8 +1,9 @@
 PHPNEWS
 |||
 ?? Apr 2008, PHP 5.2.6
-- Fixed bug #44703 (htmlspecialchars() does not detect bad character set 
argument)
-  (Andy Wharmby)
+- Fixed bug #44703 (htmlspecialchars() does not detect bad character set
+  argument). (Andy Wharmby)
+- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
 
 10 Apr 2008, PHP 5.2.6RC5
 - Fixed incorrect heredoc handling when label is used within the block.
@@ -29,6 +30,9 @@
   (Ilia)
 - Fixed bug #44557 (Crash in imap_setacl when supplied integer as username)
   (Thomas Jarosch)
+- Fixed a bug in formatting timestamps when DST is active in the default
+  timezone (Derick)
+
 
 27 Mar 2008, PHP 5.2.6RC3
 - Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia,
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.57r2=1.43.2.45.2.58diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.57 
php-src/ext/date/php_date.c:1.43.2.45.2.58
--- php-src/ext/date/php_date.c:1.43.2.45.2.57  Mon Mar 31 09:12:15 2008
+++ php-src/ext/date/php_date.c Wed Apr 16 17:21:46 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.57 2008/03/31 09:12:15 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.58 2008/04/16 17:21:46 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2271,9 +2271,19 @@
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject 
TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj-time, DateTime);
 
-   offset = timelib_get_time_zone_info(dateobj-time-sse, tzobj-tzi.tz);
-   RETVAL_LONG(offset-offset);
-   timelib_time_offset_dtor(offset);
+   switch (tzobj-type) {
+   case TIMELIB_ZONETYPE_ID:
+   offset = timelib_get_time_zone_info(dateobj-time-sse, 
tzobj-tzi.tz);
+   RETVAL_LONG(offset-offset);
+   timelib_time_offset_dtor(offset);
+   break;
+   case TIMELIB_ZONETYPE_OFFSET:
+   RETURN_LONG(tzobj-tzi.utc_offset * -60);
+   break;
+   case TIMELIB_ZONETYPE_ABBR:
+   RETURN_LONG((tzobj-tzi.z.utc_offset - 
(tzobj-tzi.z.dst*60)) * -60);
+   break;
+   }
 }
 /* }}} */
 

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug44742.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/bug44742.phpt
+++ php-src/ext/date/tests/bug44742.phpt



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



[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests bug44742.phpt

2008-04-16 Thread Derick Rethans
derick  Wed Apr 16 17:24:00 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests bug44742.phpt 
  Log:
  - MF52: Fixed bug #44703 (htmlspecialchars() does not detect bad character set
argument).
  #- WIll merge to 5.3 later, that branch has some more modifications.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.176r2=1.177diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.176 php-src/ext/date/php_date.c:1.177
--- php-src/ext/date/php_date.c:1.176   Mon Mar 31 09:10:54 2008
+++ php-src/ext/date/php_date.c Wed Apr 16 17:24:00 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.176 2008/03/31 09:10:54 derick Exp $ */
+/* $Id: php_date.c,v 1.177 2008/04/16 17:24:00 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2750,9 +2750,19 @@
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject 
TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj-time, DateTime);
 
-   offset = timelib_get_time_zone_info(dateobj-time-sse, tzobj-tzi.tz);
-   RETVAL_LONG(offset-offset);
-   timelib_time_offset_dtor(offset);
+   switch (tzobj-type) {
+   case TIMELIB_ZONETYPE_ID:
+   offset = timelib_get_time_zone_info(dateobj-time-sse, 
tzobj-tzi.tz);
+   RETVAL_LONG(offset-offset);
+   timelib_time_offset_dtor(offset);
+   break;
+   case TIMELIB_ZONETYPE_OFFSET:
+   RETURN_LONG(tzobj-tzi.utc_offset * -60);
+   break;
+   case TIMELIB_ZONETYPE_ABBR:
+   RETURN_LONG((tzobj-tzi.z.utc_offset - 
(tzobj-tzi.z.dst*60)) * -60);
+   break;
+   }
 }
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug44742.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/date/tests/bug44742.phpt
diff -u /dev/null php-src/ext/date/tests/bug44742.phpt:1.2
--- /dev/null   Wed Apr 16 17:24:00 2008
+++ php-src/ext/date/tests/bug44742.phptWed Apr 16 17:24:00 2008
@@ -0,0 +1,35 @@
+--TEST--
+Bug #44742 (timezone_offset_get() causes segmentation faults)
+--FILE--
+?php
+$dates = array(
+   2008-04-11 00:00:00+,
+   2008-04-11 00:00:00+0200,
+   2008-04-11 00:00:00+0330,
+   2008-04-11 00:00:00-0500,
+   2008-04-11 00:00:00-1130,
+   2008-04-11 00:00:00 CEST,
+   2008-04-11 00:00:00 CET,
+   2008-04-11 00:00:00 UTC,
+   2008-04-11 00:00:00 America/New_York,
+   2008-04-11 00:00:00 Europe/Oslo,
+   2008-04-11 00:00:00 Asia/Singapore,
+);
+foreach ($dates as $date)
+{
+   $date = date_create($date);
+   var_dump(timezone_offset_get(date_timezone_get($date), $date));
+}
+?
+--EXPECT--
+int(0)
+int(7200)
+int(12600)
+int(-18000)
+int(-41400)
+int(7200)
+int(3600)
+int(0)
+int(-14400)
+int(7200)
+int(28800)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/hash EXPERIMENTAL

2008-04-16 Thread Ilia Alshanetsky
iliaa   Wed Apr 16 21:53:41 2008 UTC

  Removed files:   (Branch: PHP_5_3)
/php-src/ext/hash   EXPERIMENTAL 
  Log:
  Hash extension is no longer experimental
  
  



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