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

2007-08-06 Thread changelog
changelog   Tue Aug  7 01:31:15 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2770r2=1.2771diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2770 php-src/ChangeLog:1.2771
--- php-src/ChangeLog:1.2770Mon Aug  6 01:31:20 2007
+++ php-src/ChangeLog   Tue Aug  7 01:31:14 2007
@@ -1,3 +1,160 @@
+2007-08-06  Hannes Magnusson  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/zip/tests/oo_properties.phpt:
+  Fix test
+
+* (PHP_5_2)
+  ext/zip/php_zip.c
+  ext/zip/tests/oo_properties.phpt:
+  MFH: - Fix isset/empty($ZipArchive-property)
+  MFH: - Add test
+
+* ext/zip/tests/oo_properties.phpt
+  ext/zip/tests/oo_properties.phpt:
+  
+  - Fix isset/empty($ZipArchive-property)
+  - Add test
+
+* ext/zip/php_zip.c:
+  - Fix isset/empty($ZipArchive-property)
+  - Add test
+
+2007-08-06  Christopher Jones  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/oci8/oci8.c
+  ext/oci8/php_oci8_int.h:
+  MFH: oci8: flush persistent connection after password change
+
+* ext/oci8/oci8.c
+  ext/oci8/php_oci8_int.h:
+  flush persistent connection after password change
+
+2007-08-06  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* ext/openssl/openssl.c:
+  - MFB: #4, forgot this one (thanks mattias)
+
+* (PHP_5_2)
+  ext/openssl/openssl.c:
+  - #4, forgot this one (thanks mattias)
+
+2007-08-06  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  - move entry to right place..
+
+2007-08-06  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  - #4 entry
+
+* ext/openssl/openssl.c:
+  - MFB: #4, truncate the _default to the buffer size (was 200 since 
day
+  #1, we don't need dynamic alloc here)
+
+* (PHP_5_2)
+  ext/openssl/openssl.c:
+  - #4, truncate the _default to the buffer size (was 200 since day #1,
+  we don't need dynamic alloc here)
+
+2007-08-06  Jani Taskinen  [EMAIL PROTECTED]
+
+* ext/standard/var_unserializer.c
+  ext/standard/var_unserializer.c:
+  Touch generated file
+
+* ext/standard/var_unserializer.re:
+  ws fix
+
+* (PHP_5_2)
+  ext/standard/var_unserializer.re:
+  - fix ws
+
+* ext/standard/var_unserializer.re:
+  MFB: fix compile warning (+ some ws fixes)
+
+* sapi/apache2filter/apache_config.c:
+  Fix build
+
+2007-08-06  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/standard/var_unserializer.re:
+  
+  Fixed compiler warning
+
+2007-08-06  Rob Richards  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  BFN
+
+* (PHP_5_2)
+  ext/dom/php_dom.c
+  ext/dom/tests/bug35342.phpt
+  ext/dom/tests/bug42082.phpt:
+  MFH: fix bug #42082 (NodeList length zero should be empty). (Hannes)
+  add and update tests
+
+* ext/dom/tests/bug42082.phpt
+  ext/dom/tests/bug42082.phpt:
+  
+  fix bug #42082 (NodeList length zero should be empty). (Hannes)
+  add and update tests
+
+* ext/dom/php_dom.c
+  ext/dom/tests/bug35342.phpt:
+  fix bug #42082 (NodeList length zero should be empty). (Hannes)
+  add and update tests
+
+2007-08-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/oci8/package2.xml:
+  update changelog  list of files
+
+2007-08-06  Andrey Hristov  [EMAIL PROTECTED]
+
+* ext/mysql/php_mysql.c
+  ext/mysqlnd/mysqlnd.c
+  ext/mysqlnd/mysqlnd_priv.h
+  ext/mysqlnd/mysqlnd_result.c
+  ext/mysqlnd/mysqlnd_statistics.h
+  ext/mysqlnd/mysqlnd_wireprotocol.c:
+  Fix crashes with pconn in ext/mysql
+
+2007-08-06  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  configure.in
+  scripts/phpize.m4:
+  MFH:- Fixed bug #42195 (C++ compiler required always)
+
+* configure.in
+  scripts/phpize.m4:
+  - Fixed bug #42195 (C++ compiler required always)
+
+2007-08-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* sapi/apache/mod_php.c
+  sapi/apache/mod_php5.c
+  sapi/apache2handler/apache_config.c:
+  fix build
+
+2007-08-06  Dmitry Stogov  [EMAIL PROTECTED]
+
+* NEWS
+  ext/openssl/openssl.c:
+  Improved ext/openssl
+. Added support for OpenSSL digest functions
+. Added support for OpenSSL cipher functions
+. Added access to internal values of DSA, RSA and DH keys
+
 2007-08-05  Jani Taskinen  [EMAIL PROTECTED]
 
 * ext/standard/tests/strings/bug42208.phpt:


[PHP-CVS] cvs: CVSROOT / avail

2007-08-06 Thread Pierre-Alain Joye
pajoye  Mon Aug  6 07:21:13 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - gd access for Mattias
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1295r2=1.1296diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1295 CVSROOT/avail:1.1296
--- CVSROOT/avail:1.1295Fri Aug  3 16:50:25 2007
+++ CVSROOT/avail   Mon Aug  6 07:21:13 2007
@@ -307,6 +307,6 @@
 # Please ask [EMAIL PROTECTED] before adding some unknown guys :)
 # gd/libgd is the library itself, other directories are for 
 # the various tools (website, bugs,...)
-avail|pajoye,edink,lhecking,mloskot,nlopess,scottmac,guenter|gd
+avail|pajoye,edink,lhecking,mloskot,nlopess,scottmac,guenter,mattias|gd
 
 # vim:set ft=conf sw=2 ts=2 et:

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



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

2007-08-06 Thread Dmitry Stogov
dmitry  Mon Aug  6 08:43:43 2007 UTC

  Modified files:  
/php-srcNEWS 
/php-src/ext/opensslopenssl.c 
  Log:
  Improved ext/openssl
. Added support for OpenSSL digest functions
. Added support for OpenSSL cipher functions
. Added access to internal values of DSA, RSA and DH keys
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2148r2=1.2149diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2148 php-src/NEWS:1.2149
--- php-src/NEWS:1.2148 Tue Jul 24 23:25:48 2007
+++ php-src/NEWSMon Aug  6 08:43:43 2007
@@ -34,6 +34,10 @@
 - Moved extensions to PECL:
   . ext/ncurses (Hartmut)
 
+- Improved ext/openssl (Dmitry)
+  . Added support for OpenSSL digest functions
+  . Added support for OpenSSL cipher functions
+  . Added access to internal values of DSA, RSA and DH keys
 - Improved and cleaned CGI code. FastCGI is now always enabled and can not be
   disabled. See sapi/cgi/CHANGES for more details. (Dmitry)
 - Improved ext/zlib; re-implemented non-file related functionality. (Mike)
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.145r2=1.146diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.145 php-src/ext/openssl/openssl.c:1.146
--- php-src/ext/openssl/openssl.c:1.145 Wed Jul 11 12:10:28 2007
+++ php-src/ext/openssl/openssl.c   Mon Aug  6 08:43:43 2007
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.145 2007/07/11 12:10:28 dmitry Exp $ */
+/* $Id: openssl.c,v 1.146 2007/08/06 08:43:43 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -33,6 +33,8 @@
 #include ext/standard/file.h
 #include ext/standard/info.h
 #include ext/standard/php_fopen_wrappers.h
+#include ext/standard/md5.h
+#include ext/standard/base64.h
 
 /* OpenSSL includes */
 #include openssl/evp.h
@@ -88,6 +90,15 @@
PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
 };
 
+PHP_FUNCTION(openssl_get_md_methods);
+PHP_FUNCTION(openssl_get_cipher_methods);
+
+PHP_FUNCTION(openssl_digest);
+PHP_FUNCTION(openssl_encrypt);
+PHP_FUNCTION(openssl_decrypt);
+
+PHP_FUNCTION(openssl_dh_compute_key);
+
 /* {{{ openssl_functions[]
  */
 zend_function_entry openssl_functions[] = {
@@ -126,10 +137,13 @@
PHP_FE(openssl_csr_get_subject, NULL)
PHP_FE(openssl_csr_get_public_key,  NULL)
 
-   PHP_FE(openssl_sign,second_arg_force_ref)
-   PHP_FE(openssl_verify,  NULL)
-   PHP_FE(openssl_seal,arg2and3_force_ref)
-   PHP_FE(openssl_open,second_arg_force_ref)
+   PHP_FE(openssl_digest,  NULL)
+   PHP_FE(openssl_encrypt, NULL)
+   PHP_FE(openssl_decrypt, NULL)
+   PHP_FE(openssl_sign,second_arg_force_ref)
+   PHP_FE(openssl_verify,  NULL)
+   PHP_FE(openssl_seal,arg2and3_force_ref)
+   PHP_FE(openssl_open,second_arg_force_ref)
 
 /* for S/MIME handling */
PHP_FE(openssl_pkcs7_verify,NULL)
@@ -142,6 +156,11 @@
PHP_FE(openssl_public_encrypt,  second_arg_force_ref)
PHP_FE(openssl_public_decrypt,  second_arg_force_ref)
 
+   PHP_FE(openssl_get_md_methods,  NULL)
+   PHP_FE(openssl_get_cipher_methods,  NULL)
+
+   PHP_FE(openssl_dh_compute_key,  NULL)
+
PHP_FE(openssl_error_string, NULL)
{NULL, NULL, NULL}
 };
@@ -645,6 +664,34 @@
return mdtype;
 }
 /* }}} */
+
+static const EVP_CIPHER * php_openssl_get_evp_cipher_from_algo(long algo) { /* 
{{{ */
+   switch (algo) {
+#ifndef OPENSSL_NO_RC2
+   case PHP_OPENSSL_CIPHER_RC2_40:
+   return EVP_rc2_40_cbc();
+   break;
+   case PHP_OPENSSL_CIPHER_RC2_64:
+   return EVP_rc2_64_cbc();
+   break;
+   case PHP_OPENSSL_CIPHER_RC2_128:
+   return EVP_rc2_cbc();
+   break;
+#endif
+
+#ifndef OPENSSL_NO_DES
+   case PHP_OPENSSL_CIPHER_DES:
+   return EVP_des_cbc();
+   break;
+   case PHP_OPENSSL_CIPHER_3DES:
+   return EVP_des_ede3_cbc();
+   break;
+#endif
+   default:
+   return NULL;
+   break;
+   }
+}
 /* }}} */
 
 /* {{{ PHP_MINIT_FUNCTION
@@ -2476,6 +2523,25 @@
}
break;
 #endif
+#if !defined(NO_DH)
+   case OPENSSL_KEYTYPE_DH:
+   {
+   DH *dhpar = 
DH_generate_parameters(req-priv_key_bits, 2, NULL, NULL);
+   int 

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

2007-08-06 Thread Pierre
On 8/6/07, Dmitry Stogov [EMAIL PROTECTED] wrote:
 dmitry  Mon Aug  6 08:43:43 2007 UTC

   Modified files:
 /php-srcNEWS
 /php-src/ext/opensslopenssl.c
   Log:
   Improved ext/openssl
 . Added support for OpenSSL digest functions
 . Added support for OpenSSL cipher functions
 . Added access to internal values of DSA, RSA and DH keys

Thanks!

--Pierre

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



[PHP-CVS] cvs: php-src /sapi/apache mod_php.c

2007-08-06 Thread Antony Dovgal
tony2001Mon Aug  6 12:54:35 2007 UTC

  Modified files:  
/php-src/sapi/apachemod_php.c 
  Log:
  fix build
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php.c?r1=1.4r2=1.5diff_format=u
Index: php-src/sapi/apache/mod_php.c
diff -u php-src/sapi/apache/mod_php.c:1.4 php-src/sapi/apache/mod_php.c:1.5
--- php-src/sapi/apache/mod_php.c:1.4   Fri Aug  3 01:40:05 2007
+++ php-src/sapi/apache/mod_php.c   Mon Aug  6 12:54:35 2007
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: mod_php.c,v 1.4 2007/08/03 01:40:05 stas Exp $ */
+/* $Id: mod_php.c,v 1.5 2007/08/06 12:54:35 tony2001 Exp $ */
 
 #include php_apache_http.h
 #include http_conf_globals.h
@@ -541,7 +541,7 @@
  */
 static int php_apache_alter_ini_entries(php_per_dir_entry *per_dir_entry 
TSRMLS_DC)
 {
-   zend_alter_ini_entry(per_dir_entry-key, per_dir_entry-key_length+1, 
per_dir_entry-value, per_dir_entry-value_length, per_dir_entry-type, 
data-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE);
+   zend_alter_ini_entry(per_dir_entry-key, per_dir_entry-key_length+1, 
per_dir_entry-value, per_dir_entry-value_length, per_dir_entry-type, 
per_dir_entry-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE);
return 0;
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/apache mod_php5.c

2007-08-06 Thread Antony Dovgal
tony2001Mon Aug  6 12:54:57 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/apachemod_php5.c 
  Log:
  fix build
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php5.c?r1=1.19.2.7.2.12r2=1.19.2.7.2.13diff_format=u
Index: php-src/sapi/apache/mod_php5.c
diff -u php-src/sapi/apache/mod_php5.c:1.19.2.7.2.12 
php-src/sapi/apache/mod_php5.c:1.19.2.7.2.13
--- php-src/sapi/apache/mod_php5.c:1.19.2.7.2.12Fri Aug  3 09:32:34 2007
+++ php-src/sapi/apache/mod_php5.c  Mon Aug  6 12:54:57 2007
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: mod_php5.c,v 1.19.2.7.2.12 2007/08/03 09:32:34 jani Exp $ */
+/* $Id: mod_php5.c,v 1.19.2.7.2.13 2007/08/06 12:54:57 tony2001 Exp $ */
 
 #include php_apache_http.h
 #include http_conf_globals.h
@@ -548,7 +548,7 @@
  */
 static int php_apache_alter_ini_entries(php_per_dir_entry *per_dir_entry 
TSRMLS_DC)
 {
-   zend_alter_ini_entry(per_dir_entry-key, per_dir_entry-key_length+1, 
per_dir_entry-value, per_dir_entry-value_length, per_dir_entry-type, 
data-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE);
+   zend_alter_ini_entry(per_dir_entry-key, per_dir_entry-key_length+1, 
per_dir_entry-value, per_dir_entry-value_length, per_dir_entry-type, 
per_dir_entry-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE);
return 0;
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src / configure.in /scripts phpize.m4

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 14:33:06 2007 UTC

  Modified files:  
/php-srcconfigure.in 
/php-src/scriptsphpize.m4 
  Log:
  - Fixed bug #42195 (C++ compiler required always)
  
  
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.638r2=1.639diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.638 php-src/configure.in:1.639
--- php-src/configure.in:1.638  Thu Jul 26 22:45:22 2007
+++ php-src/configure.inMon Aug  6 14:33:06 2007
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.638 2007/07/26 22:45:22 jani Exp $ -*- autoconf -*-
+## $Id: configure.in,v 1.639 2007/08/06 14:33:06 jani Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -1156,7 +1156,13 @@
 PHP_CONFIGURE_PART(Configuring libtool)
 
 LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS
+
+dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX)
+dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler
+AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX])
+AC_DEFUN([AC_PROG_CXX], [])])
 AC_PROG_LIBTOOL
+
 if test $enable_debug != yes; then
   PHP_SET_LIBTOOL_VARIABLE([--silent])
 fi
http://cvs.php.net/viewvc.cgi/php-src/scripts/phpize.m4?r1=1.24r2=1.25diff_format=u
Index: php-src/scripts/phpize.m4
diff -u php-src/scripts/phpize.m4:1.24 php-src/scripts/phpize.m4:1.25
--- php-src/scripts/phpize.m4:1.24  Wed Jul 25 09:40:58 2007
+++ php-src/scripts/phpize.m4   Mon Aug  6 14:33:06 2007
@@ -68,6 +68,10 @@
 enable_static=no
 enable_shared=yes
 
+dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX)
+dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler
+AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX])
+AC_DEFUN([AC_PROG_CXX], [])])
 AC_PROG_LIBTOOL
 
 all_targets='$(PHP_MODULES)'

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS configure.in /scripts phpize.m4

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 14:33:52 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcconfigure.in NEWS 
/php-src/scriptsphpize.m4 
  Log:
  MFH:- Fixed bug #42195 (C++ compiler required always)
  
  
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.68r2=1.579.2.52.2.69diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.68 
php-src/configure.in:1.579.2.52.2.69
--- php-src/configure.in:1.579.2.52.2.68Thu Aug  2 22:28:18 2007
+++ php-src/configure.inMon Aug  6 14:33:51 2007
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.579.2.52.2.68 2007/08/02 22:28:18 iliaa Exp $ -*- 
autoconf -*-
+## $Id: configure.in,v 1.579.2.52.2.69 2007/08/06 14:33:51 jani Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -1249,7 +1249,13 @@
 PHP_CONFIGURE_PART(Configuring libtool)
 
 LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS
+
+dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX)
+dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler
+AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX])
+AC_DEFUN([AC_PROG_CXX], [])])
 AC_PROG_LIBTOOL
+
 if test $enable_debug != yes; then
   PHP_SET_LIBTOOL_VARIABLE([--silent])
 fi
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.878r2=1.2027.2.547.2.879diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.878 php-src/NEWS:1.2027.2.547.2.879
--- php-src/NEWS:1.2027.2.547.2.878 Sun Aug  5 14:47:42 2007
+++ php-src/NEWSMon Aug  6 14:33:51 2007
@@ -3,6 +3,7 @@
 ?? Aug 2007, PHP 5.2.4
 - Fixed bug #42208 (substr_replace() crashes when the same array is passed 
   more than once). (crrodriguez at suse dot de, Ilia)
+- Fixed bug #42195 (C++ compiler required always). (Jani)
 - Fixed bug #36492 (Userfilters can leak buckets). (Sara)
 
 02 Aug 2007, PHP 5.2.4RC1
http://cvs.php.net/viewvc.cgi/php-src/scripts/phpize.m4?r1=1.17.2.3.2.3r2=1.17.2.3.2.4diff_format=u
Index: php-src/scripts/phpize.m4
diff -u php-src/scripts/phpize.m4:1.17.2.3.2.3 
php-src/scripts/phpize.m4:1.17.2.3.2.4
--- php-src/scripts/phpize.m4:1.17.2.3.2.3  Wed Jul 25 09:41:06 2007
+++ php-src/scripts/phpize.m4   Mon Aug  6 14:33:51 2007
@@ -68,6 +68,10 @@
 enable_static=no
 enable_shared=yes
 
+dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX)
+dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler
+AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX])
+AC_DEFUN([AC_PROG_CXX], [])])
 AC_PROG_LIBTOOL
 
 all_targets='$(PHP_MODULES)'

-- 
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/mysqlnd mysqlnd.c mysqlnd_priv.h mysqlnd_result.c mysqlnd_statistics.h mysqlnd_wireprotocol.c

2007-08-06 Thread Andrey Hristov
andrey  Mon Aug  6 15:11:46 2007 UTC

  Modified files:  
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqlndmysqlnd.c mysqlnd_priv.h mysqlnd_result.c 
mysqlnd_statistics.h mysqlnd_wireprotocol.c 
  Log:
  Fix crashes with pconn in ext/mysql
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.239r2=1.240diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.239 php-src/ext/mysql/php_mysql.c:1.240
--- php-src/ext/mysql/php_mysql.c:1.239 Tue Jul 24 16:13:25 2007
+++ php-src/ext/mysql/php_mysql.c   Mon Aug  6 15:11:46 2007
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.239 2007/07/24 16:13:25 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.240 2007/08/06 15:11:46 andrey Exp $ */
 
 /* TODO:
  *
@@ -800,6 +800,10 @@
 #endif
mysql_options(mysql-conn, 
MYSQL_OPT_LOCAL_INFILE, (char *)MySG(allow_local_infile));
}
+   } else {
+#ifdef HAVE_MYSQLND
+   mysqlnd_restart_psession(mysql-conn);
+#endif
}
}
ZEND_REGISTER_RESOURCE(return_value, mysql, le_plink);
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.2 php-src/ext/mysqlnd/mysqlnd.c:1.3
--- php-src/ext/mysqlnd/mysqlnd.c:1.2   Fri Aug  3 16:32:26 2007
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Aug  6 15:11:46 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.2 2007/08/03 16:32:26 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.3 2007/08/06 15:11:46 andrey Exp $ */
 
 #include php.h
 #include mysqlnd.h
@@ -27,6 +27,7 @@
 #include mysqlnd_result.h
 #include mysqlnd_statistics.h
 #include mysqlnd_charset.h
+#include php_ini.h
 #include ext/standard/basic_functions.h
 #include ext/standard/php_lcg.h
 #include ext/standard/info.h
@@ -263,7 +264,8 @@
SET_ERROR_AFF_ROWS(conn);
} else {
SET_NEW_MESSAGE(conn-last_message, 
conn-last_message_len,
-   
ok_response.message, ok_response.message_len);
+   
ok_response.message, ok_response.message_len,
+   
conn-persistent);
 
conn-upsert_status.warning_count = 
ok_response.warning_count;
conn-upsert_status.server_status = 
ok_response.server_status;
@@ -389,6 +391,11 @@
 PHPAPI void mysqlnd_restart_psession(MYSQLND *conn) 
 {
MYSQLND_INC_CONN_STATISTIC(conn-stats, STAT_CONNECT_REUSED);
+   /* Free here what should not be seen by the next script */
+   if (conn-last_message) {
+   pefree(conn-last_message, conn-persistent);
+   conn-last_message = NULL;
+   }
 }
 /* }}} */
 
@@ -613,7 +620,8 @@
conn-upsert_status.server_status = greet_packet.server_status;
conn-upsert_status.affected_rows = 0;
SET_NEW_MESSAGE(conn-last_message, conn-last_message_len,
-   ok_packet.message, 
ok_packet.message_len);
+   ok_packet.message, 
ok_packet.message_len,
+   conn-persistent);
 
SET_EMPTY_ERROR(conn-error_info);
 
@@ -1661,7 +1669,7 @@
 
 /* {{{ PHP_MINIT_FUNCTION
  */
-PHP_MINIT_FUNCTION(mysqlnd)
+static PHP_MINIT_FUNCTION(mysqlnd)
 {
REGISTER_INI_ENTRIES();
 
@@ -1673,7 +1681,7 @@
 
 /* {{{ PHP_MSHUTDOWN_FUNCTION
  */
-PHP_MSHUTDOWN_FUNCTION(mysqlnd)
+static PHP_MSHUTDOWN_FUNCTION(mysqlnd)
 {
mysqlnd_library_end();
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_priv.h?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_priv.h
diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.2 
php-src/ext/mysqlnd/mysqlnd_priv.h:1.3
--- php-src/ext/mysqlnd/mysqlnd_priv.h:1.2  Fri Aug  3 16:32:26 2007
+++ php-src/ext/mysqlnd/mysqlnd_priv.h  Mon Aug  6 15:11:46 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_priv.h,v 1.2 2007/08/03 16:32:26 andrey Exp $ */
+/* $Id: mysqlnd_priv.h,v 1.3 2007/08/06 15:11:46 andrey Exp $ */
 
 #ifndef MYSQLND_PRIV_H
 #define MYSQLND_PRIV_H
@@ -109,10 +109,10 @@
 #define SET_ERROR_AFF_ROWS(s)  (s)-upsert_status.affected_rows = 
(mynd_ulonglong) ~0
 
 /* Error handling */
-#define SET_NEW_MESSAGE(buf, buf_len, message, len) \
+#define 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8 package2.xml

2007-08-06 Thread Antony Dovgal
tony2001Mon Aug  6 15:57:27 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/oci8   package2.xml 
  Log:
  update changelog  list of files
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/package2.xml?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/oci8/package2.xml
diff -u php-src/ext/oci8/package2.xml:1.1.2.1 
php-src/ext/oci8/package2.xml:1.1.2.2
--- php-src/ext/oci8/package2.xml:1.1.2.1   Thu Jan 25 16:55:40 2007
+++ php-src/ext/oci8/package2.xml   Mon Aug  6 15:57:27 2007
@@ -27,22 +27,25 @@
   email[EMAIL PROTECTED]/email
   activeyes/active
  /lead
- date2007-01-25/date
- time19:52:26/time
+ date2007-08-08/date
+ time19:00:00/time
  version
-  release1.2.3/release
-  api1.2.3/api
+  release1.2.4/release
+  api1.2.4/api
  /version
  stability
   releasestable/release
   apistable/api
  /stability
  license uri=http://www.php.net/license;PHP/license
- notesFixed possible segfault in ZTS mode when statements containing 
sub-statements are destroyed in wrong order.
-Fixed bug #40078 (ORA-01405 when fetching NULL values using 
oci_bind_array_by_name()).
-Fixed bug #39988 (type argument of oci_define_by_name() is ignored).
-Fixed bug #39732 (oci_bind_array_by_name doesnapos;t work on Solaris 64bit).
-Fixed PECL bug #8816 (issue in php_oci_statement_fetch with more than one 
piecewise column).
+ notesFixed PECL bug #10194 (crash in Oracle client when memory limit 
reached in the callback).
+Fixed bug #42173 (INTERVAL and TIMESTAMP type fixes).
+Fixed bug #42134 (oci_error() returns false after oci_new_collection() fails).
+Fixed bug #41711 (Null temporary lobs not supported).
+Fixed bug #41594 (Statement cache is flushed too frequently).
+Enable statement cache for non-persistent connections.
+Fixed segfault on rebindinging and rexecuting a statement with LOBs.
+Fixed compile failure in ZTS mode when collections support is missing.
 Various minor improvements.
  /notes
  contents
@@ -62,23 +65,23 @@
 file name=array_bind_012.phpt role=test /
 file name=array_bind_013.phpt role=test /
 file name=array_bind_014.phpt role=test /
-file name=array_bind_date.phpt role=test /
 file name=array_bind_date1.phpt role=test /
-file name=array_bind_float.phpt role=test /
+file name=array_bind_date.phpt role=test /
 file name=array_bind_float1.phpt role=test /
-file name=array_bind_int.phpt role=test /
+file name=array_bind_float.phpt role=test /
 file name=array_bind_int1.phpt role=test /
-file name=array_bind_str.phpt role=test /
+file name=array_bind_int.phpt role=test /
 file name=array_bind_str1.phpt role=test /
+file name=array_bind_str.phpt role=test /
 file name=bind_empty.phpt role=test /
 file name=bind_long.phpt role=test /
 file name=bind_long_raw.phpt role=test /
 file name=bind_raw.phpt role=test /
 file name=bug26133.phpt role=test /
-file name=bug27303.phpt role=test /
 file name=bug27303_2.phpt role=test /
 file name=bug27303_3.phpt role=test /
 file name=bug27303_4.phpt role=test /
+file name=bug27303.phpt role=test /
 file name=bug32325.phpt role=test /
 file name=bug35973.phpt role=test /
 file name=bug36010.phpt role=test /
@@ -87,89 +90,99 @@
 file name=bug38161.phpt role=test /
 file name=bug38173.phpt role=test /
 file name=bug40078.phpt role=test /
+file name=bug40415.phpt role=test /
+file name=bug42134.phpt role=test /
+file name=bug42173.phpt role=test /
 file name=close.phpt role=test /
 file name=coll_001.phpt role=test /
-file name=coll_002.phpt role=test /
 file name=coll_002_func.phpt role=test /
-file name=coll_003.phpt role=test /
+file name=coll_002.phpt role=test /
 file name=coll_003_func.phpt role=test /
-file name=coll_004.phpt role=test /
+file name=coll_003.phpt role=test /
 file name=coll_004_func.phpt role=test /
+file name=coll_004.phpt role=test /
 file name=coll_005.phpt role=test /
-file name=coll_006.phpt role=test /
 file name=coll_006_func.phpt role=test /
+file name=coll_006.phpt role=test /
 file name=coll_007.phpt role=test /
 file name=coll_008.phpt role=test /
-file name=coll_009.phpt role=test /
 file name=coll_009_func.phpt role=test /
-file name=coll_010.phpt role=test /
+file name=coll_009.phpt role=test /
 file name=coll_010_func.phpt role=test /
-file name=coll_011.phpt role=test /
+file name=coll_010.phpt role=test /
 file name=coll_011_func.phpt role=test /
-file name=coll_012.phpt role=test /
+file name=coll_011.phpt role=test /
 file name=coll_012_func.phpt role=test /
-file name=coll_013.phpt role=test /
+file name=coll_012.phpt role=test /
 file name=coll_013_func.phpt role=test /
-file name=coll_014.phpt role=test /
+file name=coll_013.phpt role=test /
 file name=coll_014_func.phpt role=test /
-file name=coll_015.phpt 

[PHP-CVS] cvs: php-src /ext/dom php_dom.c /ext/dom/tests bug35342.phpt bug42082.phpt

2007-08-06 Thread Rob Richards
rrichards   Mon Aug  6 16:21:45 2007 UTC

  Added files: 
/php-src/ext/dom/tests  bug42082.phpt 

  Modified files:  
/php-src/ext/domphp_dom.c 
/php-src/ext/dom/tests  bug35342.phpt 
  Log:
  fix bug #42082 (NodeList length zero should be empty). (Hannes)
  add and update tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.103r2=1.104diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.103 php-src/ext/dom/php_dom.c:1.104
--- php-src/ext/dom/php_dom.c:1.103 Tue Apr  3 11:58:24 2007
+++ php-src/ext/dom/php_dom.c   Mon Aug  6 16:21:44 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.103 2007/04/03 11:58:24 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.104 2007/08/06 16:21:44 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -387,7 +387,20 @@
ret = zend_u_hash_find(obj-prop_handler, Z_TYPE_P(member), 
Z_UNIVAL_P(member), Z_UNILEN_P(member)+1, (void **) hnd);
}
if (ret == SUCCESS) {
-   retval = 1;
+   zval *tmp;
+
+   if (check_empty == 2) {
+   retval = 1;
+   } else if (hnd-read_func(obj, tmp TSRMLS_CC) == SUCCESS) {
+   tmp-refcount = 1;
+   tmp-is_ref = 0;
+   if (check_empty == 1) {
+   retval = zend_is_true(tmp);
+   } else if (check_empty == 0) {
+   retval = (Z_TYPE_P(tmp) != IS_NULL);
+   }
+   zval_ptr_dtor(tmp);
+   }
} else {
std_hnd = zend_get_std_object_handlers();
retval = std_hnd-has_property(object, member, check_empty 
TSRMLS_CC);
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug35342.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/dom/tests/bug35342.phpt
diff -u php-src/ext/dom/tests/bug35342.phpt:1.3 
php-src/ext/dom/tests/bug35342.phpt:1.4
--- php-src/ext/dom/tests/bug35342.phpt:1.3 Sat Aug  5 12:35:35 2006
+++ php-src/ext/dom/tests/bug35342.phpt Mon Aug  6 16:21:45 2007
@@ -1,5 +1,5 @@
 --TEST--
-Bug # 35342: isset(DOMNodeList-length) returns false
+Bug #35342 isset(DOMNodeList-length) returns false
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
 --FILE--
@@ -10,8 +10,11 @@
 $nodelist = $dom-getElementsByTagName(foo);
 
 var_dump($nodelist-length, isset($nodelist-length), isset($nodelist-foo));
+var_dump(empty($nodelist-length), empty($nodelist-foo));
 ?
 --EXPECT--
 int(2)
 bool(true)
 bool(false)
+bool(false)
+bool(true)

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug42082.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug42082.phpt
+++ php-src/ext/dom/tests/bug42082.phpt
--TEST--
Bug #42082 (NodeList length zero should be empty)
--FILE--
?php
$doc = new DOMDocument();
$xpath = new DOMXPath($doc);
$nodes = $xpath-query('*');
var_dump($nodes);
var_dump($nodes-length);
$length = $nodes-length;
var_dump(empty($nodes-length), empty($lenght));

$doc-loadXML(element/element);
var_dump($doc-firstChild-nodeValue, empty($doc-firstChild-nodeValue), 
isset($doc-firstChild-nodeValue));
var_dump(empty($doc-nodeType), empty($doc-firstChild-nodeType))
?
--EXPECTF--
object(DOMNodeList)#%d (0) {
}
int(0)
bool(true)
bool(true)
string(0) 
bool(true)
bool(true)
bool(false)
bool(false)
--UEXPECTF--
object(DOMNodeList)#%d (0) {
}
int(0)
bool(true)
bool(true)
unicode(0) 
bool(true)
bool(true)
bool(false)
bool(false)

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom php_dom.c /ext/dom/tests bug35342.phpt bug42082.phpt

2007-08-06 Thread Rob Richards
rrichards   Mon Aug  6 16:22:24 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/dom/tests  bug42082.phpt 

  Modified files:  
/php-src/ext/domphp_dom.c 
/php-src/ext/dom/tests  bug35342.phpt 
  Log:
  MFH: fix bug #42082 (NodeList length zero should be empty). (Hannes)
  add and update tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.10r2=1.73.2.12.2.11diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.10 
php-src/ext/dom/php_dom.c:1.73.2.12.2.11
--- php-src/ext/dom/php_dom.c:1.73.2.12.2.10Tue Apr  3 11:57:04 2007
+++ php-src/ext/dom/php_dom.c   Mon Aug  6 16:22:24 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.73.2.12.2.10 2007/04/03 11:57:04 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.11 2007/08/06 16:22:24 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -411,7 +411,20 @@
ret = zend_hash_find((HashTable *)obj-prop_handler, 
Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) hnd);
}
if (ret == SUCCESS) {
-   retval = 1;
+   zval *tmp;
+
+   if (check_empty == 2) {
+   retval = 1;
+   } else if (hnd-read_func(obj, tmp TSRMLS_CC) == SUCCESS) {
+   tmp-refcount = 1;
+   tmp-is_ref = 0;
+   if (check_empty == 1) {
+   retval = zend_is_true(tmp);
+   } else if (check_empty == 0) {
+   retval = (Z_TYPE_P(tmp) != IS_NULL);
+   }
+   zval_ptr_dtor(tmp);
+   }
} else {
std_hnd = zend_get_std_object_handlers();
retval = std_hnd-has_property(object, member, check_empty 
TSRMLS_CC);
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug35342.phpt?r1=1.1.2.2.2.3r2=1.1.2.2.2.4diff_format=u
Index: php-src/ext/dom/tests/bug35342.phpt
diff -u php-src/ext/dom/tests/bug35342.phpt:1.1.2.2.2.3 
php-src/ext/dom/tests/bug35342.phpt:1.1.2.2.2.4
--- php-src/ext/dom/tests/bug35342.phpt:1.1.2.2.2.3 Fri Jul 27 00:20:43 2007
+++ php-src/ext/dom/tests/bug35342.phpt Mon Aug  6 16:22:24 2007
@@ -10,8 +10,11 @@
 $nodelist = $dom-getElementsByTagName(foo);
 
 var_dump($nodelist-length, isset($nodelist-length), isset($nodelist-foo));
+var_dump(empty($nodelist-length), empty($nodelist-foo));
 ?
 --EXPECT--
 int(2)
 bool(true)
 bool(false)
+bool(false)
+bool(true)

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug42082.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug42082.phpt
+++ php-src/ext/dom/tests/bug42082.phpt
--TEST--
Bug #42082 (NodeList length zero should be empty)
--FILE--
?php
$doc = new DOMDocument();
$xpath = new DOMXPath($doc);
$nodes = $xpath-query('*');
var_dump($nodes);
var_dump($nodes-length);
$length = $nodes-length;
var_dump(empty($nodes-length), empty($lenght));

$doc-loadXML(element/element);
var_dump($doc-firstChild-nodeValue, empty($doc-firstChild-nodeValue), 
isset($doc-firstChild-nodeValue));
var_dump(empty($doc-nodeType), empty($doc-firstChild-nodeType))
?
--EXPECTF--
object(DOMNodeList)#%d (0) {
}
int(0)
bool(true)
bool(true)
string(0) 
bool(true)
bool(true)
bool(false)
bool(false)
--UEXPECTF--
object(DOMNodeList)#%d (0) {
}
int(0)
bool(true)
bool(true)
unicode(0) 
bool(true)
bool(true)
bool(false)
bool(false)

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



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

2007-08-06 Thread Rob Richards
rrichards   Mon Aug  6 16:23:09 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.879r2=1.2027.2.547.2.880diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.879 php-src/NEWS:1.2027.2.547.2.880
--- php-src/NEWS:1.2027.2.547.2.879 Mon Aug  6 14:33:51 2007
+++ php-src/NEWSMon Aug  6 16:23:08 2007
@@ -4,6 +4,7 @@
 - Fixed bug #42208 (substr_replace() crashes when the same array is passed 
   more than once). (crrodriguez at suse dot de, Ilia)
 - Fixed bug #42195 (C++ compiler required always). (Jani)
+- Fixed bug #42082 (NodeList length zero should be empty). (Hannes)
 - Fixed bug #36492 (Userfilters can leak buckets). (Sara)
 
 02 Aug 2007, PHP 5.2.4RC1

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard var_unserializer.re

2007-08-06 Thread Ilia Alshanetsky
iliaa   Mon Aug  6 16:45:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   var_unserializer.re 
  Log:
  
  Fixed compiler warning
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.re?r1=1.52.2.2.2.4r2=1.52.2.2.2.5diff_format=u
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.52.2.2.2.4 
php-src/ext/standard/var_unserializer.re:1.52.2.2.2.5
--- php-src/ext/standard/var_unserializer.re:1.52.2.2.2.4   Mon Jul  9 
14:31:56 2007
+++ php-src/ext/standard/var_unserializer.reMon Aug  6 16:45:23 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.re,v 1.52.2.2.2.4 2007/07/09 14:31:56 dmitry Exp $ */
+/* $Id: var_unserializer.re,v 1.52.2.2.2.5 2007/08/06 16:45:23 iliaa Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -338,7 +338,7 @@
(*p) += 2;
 
if(datalen  0 || (*p) + datalen = max) {
-   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %d present, datalen, max - (*p));
+   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
return 0;
}
 

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



[PHP-CVS] cvs: php-src /sapi/apache2handler apache_config.c

2007-08-06 Thread Antony Dovgal
tony2001Mon Aug  6 17:01:17 2007 UTC

  Modified files:  
/php-src/sapi/apache2handlerapache_config.c 
  Log:
  fix build
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/apache_config.c?r1=1.13r2=1.14diff_format=u
Index: php-src/sapi/apache2handler/apache_config.c
diff -u php-src/sapi/apache2handler/apache_config.c:1.13 
php-src/sapi/apache2handler/apache_config.c:1.14
--- php-src/sapi/apache2handler/apache_config.c:1.13Fri Aug  3 09:38:43 2007
+++ php-src/sapi/apache2handler/apache_config.c Mon Aug  6 17:01:17 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: apache_config.c,v 1.13 2007/08/03 09:38:43 jani Exp $ */
+/* $Id: apache_config.c,v 1.14 2007/08/06 17:01:17 tony2001 Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -172,7 +172,7 @@
zend_hash_move_forward(d-config)) {
zend_hash_get_current_data(d-config, (void **) data);
phpapdebug((stderr, APPLYING (%s)(%s)\n, str.s, data-value));
-   if (zend_alter_ini_entry(str, str_len, data-value, 
data-value_len, data-status, 
data-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
+   if (zend_alter_ini_entry(str.s, str_len, data-value, 
data-value_len, data-status, 
data-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
phpapdebug((stderr, ..FAILED\n));
}   
}

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /tests/lang 041.phpt 042.phpt 043.phpt 044.phpt ZendEngine2 zend_language_parser.y

2007-08-06 Thread Dmitry Stogov
Hi,

I think this feature shouldn't go into 5.2, especially after 5.2.4RC1
release.
May be into 5.3

Thanks. Dmitry.

 -Original Message-
 From: Johannes Schlьter [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 03, 2007 1:55 AM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /tests/lang 
 041.phpt 042.phpt 043.phpt 044.phpt ZendEngine2 
 zend_language_parser.y 
 
 
 johannes  Thu Aug  2 21:55:23 2007 UTC
 
   Added files: (Branch: PHP_5_2)
 /php-src/tests/lang   041.phpt 042.phpt 043.phpt 044.phpt 
 
   Modified files:  
 /php-src  NEWS 
 /ZendEngine2  zend_language_parser.y 
   Log:
   - Add possibility to call static class members using 
 variables (Etienne Kneuss)
   
 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.8
 73r2=1.2027.2.547.2.874diff_format=u
 Index: php-src/NEWS
 diff -u php-src/NEWS:1.2027.2.547.2.873 
 php-src/NEWS:1.2027.2.547.2.874
 --- php-src/NEWS:1.2027.2.547.2.873   Thu Aug  2 20:30:31 2007
 +++ php-src/NEWS  Thu Aug  2 21:55:23 2007
 @@ -37,6 +37,8 @@
  - Added PCRE_VERSION constant. (Tony)
  - Added ReflectionExtension::info() function to print the 
 phpinfo() block for
an extension. (Johannes)
 +- Added possibility to call static class members using variables. 
 +(Etienne
 +  Kneuss)
  
  - Implemented FR #41884 
 (ReflectionClass::getDefaultProperties() does not handle 
static attributes). (Tony) 
 http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_parser
 .y?r1=1.160.2.4.2.6r2=1.160.2.4.2.7diff_format=u
 Index: ZendEngine2/zend_language_parser.y
 diff -u ZendEngine2/zend_language_parser.y:1.160.2.4.2.6 
 ZendEngine2/zend_language_parser.y:1.160.2.4.2.7
 --- ZendEngine2/zend_language_parser.y:1.160.2.4.2.6  Fri May 
 18 18:36:04 2007
 +++ ZendEngine2/zend_language_parser.yThu Aug  2 21:55:23 2007
 @@ -18,7 +18,7 @@
 
 +-
 -+
  */
  
 -/* $Id: zend_language_parser.y,v 1.160.2.4.2.6 2007/05/18 
 18:36:04 stas Exp $ */
 +/* $Id: zend_language_parser.y,v 1.160.2.4.2.7 2007/08/02 21:55:23 
 +johannes Exp $ */
  
  /*
   * LALR shift/reduce conflicts and how they are resolved:
 @@ -630,6 +630,12 @@
   |   fully_qualified_class_name 
 T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' { 
 zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); 
 zend_do_begin_class_member_function_call($1, $3 TSRMLS_CC); }
   function_call_parameter_list
   ')' { zend_do_end_function_call(NULL, 
 $$, $6, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
 + |   variable_class_name T_PAAMAYIM_NEKUDOTAYIM 
 T_STRING '(' { zend_do_begin_class_member_function_call($1, 
 $3 TSRMLS_CC); }
 + function_call_parameter_list
 + ')' { zend_do_end_function_call(NULL, 
 $$, $6, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
 + |   variable_class_name T_PAAMAYIM_NEKUDOTAYIM 
 variable_without_objects '(' { 
 zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); 
 zend_do_begin_class_member_function_call($1, $3 TSRMLS_CC); }
 + function_call_parameter_list
 + ')' { zend_do_end_function_call(NULL, 
 $$, $6, 1, 1 TSRMLS_CC); 
 +zend_do_extended_fcall_end(TSRMLS_C);}
   |   variable_without_objects  '(' { 
 zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); 
 zend_do_begin_dynamic_function_call($1 TSRMLS_CC); }
   function_call_parameter_list ')'
   { zend_do_end_function_call($1, $$, 
 $4, 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
 @@ -781,8 +787,13 @@
  
  static_member:
   fully_qualified_class_name 
 T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { $$ = $3; 
 zend_do_fetch_static_member($$, $1 TSRMLS_CC); }
 + |   variable_class_name T_PAAMAYIM_NEKUDOTAYIM 
 variable_without_objects { $$ = $3; 
 zend_do_fetch_static_member($$, $1 TSRMLS_CC); }
 +
  ;
  
 +variable_class_name:
 + reference_variable { 
 zend_do_end_variable_parse(BP_VAR_R, 0 
 +TSRMLS_CC); zend_do_fetch_class($$, $1 TSRMLS_CC); } ;
  
  base_variable_with_function_calls:
   base_variable   { $$ = $1; }
 @@ -907,6 +918,7 @@
  
  class_constant:
   fully_qualified_class_name 
 T_PAAMAYIM_NEKUDOTAYIM T_STRING { zend_do_fetch_constant($$, 
 $1, $3, ZEND_RT TSRMLS_CC); }
 + |   variable_class_name T_PAAMAYIM_NEKUDOTAYIM 
 T_STRING { zend_do_fetch_constant($$, $1, $3, ZEND_RT TSRMLS_CC); }
  ;
  
  %%
 
 http://cvs.php.net/viewvc.cgi/php-src/tests/lang/041.phpt?view
 =markuprev=1.1
 Index: php-src/tests/lang/041.phpt
 +++ php-src/tests/lang/041.phpt
 --TEST--
 Dynamic access of static members
 --FILE--
 ?php
 class A {
 publicstatic $b = 'foo';
 }
 
 $classname   =  'A';
 $binaryClassname = b'A';
 $wrongClassname  =  'B';
 
 echo $classname::$b.\n;
 echo 

[PHP-CVS] cvs: php-src /sapi/apache2filter apache_config.c

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 18:14:14 2007 UTC

  Modified files:  
/php-src/sapi/apache2filter apache_config.c 
  Log:
  Fix build
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/apache_config.c?r1=1.39r2=1.40diff_format=u
Index: php-src/sapi/apache2filter/apache_config.c
diff -u php-src/sapi/apache2filter/apache_config.c:1.39 
php-src/sapi/apache2filter/apache_config.c:1.40
--- php-src/sapi/apache2filter/apache_config.c:1.39 Fri Aug  3 09:38:43 2007
+++ php-src/sapi/apache2filter/apache_config.c  Mon Aug  6 18:14:13 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: apache_config.c,v 1.39 2007/08/03 09:38:43 jani Exp $ */
+/* $Id: apache_config.c,v 1.40 2007/08/06 18:14:13 jani Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -172,7 +172,7 @@
zend_hash_move_forward(d-config)) {
zend_hash_get_current_data(d-config, (void **) data);
phpapdebug((stderr, APPLYING (%s)(%s)\n, str.s, data-value));
-   if (zend_alter_ini_entry(str, str_len, data-value, 
data-value_len, data-status, 
data-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
+   if (zend_alter_ini_entry(str.s, str_len, data-value, 
data-value_len, data-status, 
data-htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
phpapdebug((stderr, ..FAILED\n));
}   
}

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



[PHP-CVS] cvs: php-src /ext/standard var_unserializer.re

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 18:20:30 2007 UTC

  Modified files:  
/php-src/ext/standard   var_unserializer.re 
  Log:
  MFB: fix compile warning (+ some ws fixes)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.re?r1=1.67r2=1.68diff_format=u
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.67 
php-src/ext/standard/var_unserializer.re:1.68
--- php-src/ext/standard/var_unserializer.re:1.67   Mon Jul  9 15:58:52 2007
+++ php-src/ext/standard/var_unserializer.reMon Aug  6 18:20:30 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.re,v 1.67 2007/07/09 15:58:52 dmitry Exp $ */
+/* $Id: var_unserializer.re,v 1.68 2007/08/06 18:20:30 jani Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -116,7 +116,7 @@
char *str = safe_emalloc(*len, 1, 1);
unsigned char *end = *(unsigned char **)p+maxlen;
 
-   if(end  *p) {
+   if (end  *p) {
efree(str);
return NULL;
}
@@ -366,7 +366,7 @@
zstr buf;
size_t buf_len;
 
-   if(ce-unserialize == NULL) {
+   if (ce-unserialize == NULL) {
zend_error(E_WARNING, Class %v has no unserializer, ce-name);
return 0;
}
@@ -390,8 +390,8 @@
return 0;
}
   
-   if(datalen  0 || (*p) + datalen = max) {
-   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %d present, datalen, max - (*p));
+   if (datalen  0 || (*p) + datalen = max) {
+   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
return 0;
}
 
@@ -403,7 +403,7 @@
buf_len = datalen;
(*p) += datalen;
}
-   if(ce-unserialize(rval, ce, type, buf, buf_len, (zend_unserialize_data 
*)var_hash TSRMLS_CC) != SUCCESS) {
+   if (ce-unserialize(rval, ce, type, buf, buf_len, 
(zend_unserialize_data *)var_hash TSRMLS_CC) != SUCCESS) {
if (type == IS_UNICODE) {
efree(buf.v);
}
@@ -687,7 +687,7 @@
zval **args[1];
zval *arg_func_name;
 
-   if(*start == 'C') {
+   if (*start == 'C') {
custom_object = 1;
}

@@ -770,7 +770,7 @@
 
*p = YYCURSOR;
 
-   if(custom_object) {
+   if (custom_object) {
efree(class_name.v);
return object_custom(UNSERIALIZE_PASSTHRU, ce);
}

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard var_unserializer.re

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 18:23:16 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   var_unserializer.re 
  Log:
  - fix ws
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.re?r1=1.52.2.2.2.5r2=1.52.2.2.2.6diff_format=u
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.52.2.2.2.5 
php-src/ext/standard/var_unserializer.re:1.52.2.2.2.6
--- php-src/ext/standard/var_unserializer.re:1.52.2.2.2.5   Mon Aug  6 
16:45:23 2007
+++ php-src/ext/standard/var_unserializer.reMon Aug  6 18:23:16 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.re,v 1.52.2.2.2.5 2007/08/06 16:45:23 iliaa Exp $ */
+/* $Id: var_unserializer.re,v 1.52.2.2.2.6 2007/08/06 18:23:16 jani Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -144,7 +144,7 @@
char *str = safe_emalloc(*len, 1, 1);
unsigned char *end = *(unsigned char **)p+maxlen;
 
-   if(end  *p) {
+   if (end  *p) {
efree(str);
return NULL;
}
@@ -304,7 +304,7 @@
zval_dtor(key);
FREE_ZVAL(key);
 
-   if (elements  *(*p-1) != ';'   *(*p-1) != '}') {
+   if (elements  *(*p-1) != ';'  *(*p-1) != '}') {
(*p)--;
return 0;
}
@@ -315,7 +315,7 @@
 
 static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
 {
-   if (*((*p)++) == '}') 
+   if (*((*p)++) == '}')
return 1;
 
 #if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE
@@ -328,7 +328,7 @@
 {
long datalen;
 
-   if(ce-unserialize == NULL) {
+   if (ce-unserialize == NULL) {
zend_error(E_WARNING, Class %s has no unserializer, ce-name);
return 0;
}
@@ -337,12 +337,12 @@
 
(*p) += 2;
 
-   if(datalen  0 || (*p) + datalen = max) {
+   if (datalen  0 || (*p) + datalen = max) {
zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
return 0;
}
 
-   if(ce-unserialize(rval, ce, (const unsigned char*)*p, datalen, 
(zend_unserialize_data *)var_hash TSRMLS_CC) != SUCCESS) {
+   if (ce-unserialize(rval, ce, (const unsigned char*)*p, datalen, 
(zend_unserialize_data *)var_hash TSRMLS_CC) != SUCCESS) {
return 0;
}
 
@@ -373,7 +373,7 @@
}
 
if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY 
-   zend_hash_exists(Z_OBJCE_PP(rval)-function_table, __wakeup, 
sizeof(__wakeup))) {
+   zend_hash_exists(Z_OBJCE_PP(rval)-function_table, __wakeup, 
sizeof(__wakeup))) {
INIT_PZVAL(fname);
ZVAL_STRINGL(fname, __wakeup, sizeof(__wakeup) - 1, 0);
call_user_function_ex(CG(function_table), rval, fname, 
retval_ptr, 0, 0, 1, NULL TSRMLS_CC);
@@ -592,7 +592,7 @@
zval **args[1];
zval *arg_func_name;
 
-   if(*start == 'C') {
+   if (*start == 'C') {
custom_object = 1;
}

@@ -674,7 +674,7 @@
 
*p = YYCURSOR;
 
-   if(custom_object) {
+   if (custom_object) {
efree(class_name);
return object_custom(UNSERIALIZE_PASSTHRU, ce);
}

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



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

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 18:30:53 2007 UTC

  Modified files:  
/php-src/ext/standard   var_unserializer.c 
  Log:
  Touch generated file
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.89r2=1.90diff_format=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.89 
php-src/ext/standard/var_unserializer.c:1.90
--- php-src/ext/standard/var_unserializer.c:1.89Mon Jul  9 15:58:52 2007
+++ php-src/ext/standard/var_unserializer.c Mon Aug  6 18:30:53 2007
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.11.2 on Tue Mar 27 13:27:10 2007 */
+/* Generated by re2c 0.12.1 on Mon Aug  6 21:30:07 2007 */
 #line 1 ext/standard/var_unserializer.re
 /*
   +--+
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.c,v 1.89 2007/07/09 15:58:52 dmitry Exp $ */
+/* $Id: var_unserializer.c,v 1.90 2007/08/06 18:30:53 jani Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -118,7 +118,7 @@
char *str = safe_emalloc(*len, 1, 1);
unsigned char *end = *(unsigned char **)p+maxlen;
 
-   if(end  *p) {
+   if (end  *p) {
efree(str);
return NULL;
}
@@ -159,7 +159,7 @@
 {
long i;
var_entries *var_hash = var_hashx-first;
-   
+
while (var_hash) {
for (i = 0; i  var_hash-used_slots; i++) {
if (var_hash-data[i] == ozval) {
@@ -174,7 +174,7 @@
 static int var_access(php_unserialize_data_t *var_hashx, long id, zval 
***store)
 {
var_entries *var_hash = var_hashx-first;
-   
+
while (id = VAR_ENTRIES_MAX  var_hash  var_hash-used_slots == 
VAR_ENTRIES_MAX) {
var_hash = var_hash-next;
id -= VAR_ENTRIES_MAX;
@@ -194,7 +194,7 @@
void *next;
long i;
var_entries *var_hash = var_hashx-first;
-   
+
while (var_hash) {
next = var_hash-next;
efree(var_hash);
@@ -202,7 +202,7 @@
}
 
var_hash = var_hashx-first_dtor;
-   
+
while (var_hash) {
for (i = 0; i  var_hash-used_slots; i++) {
zval_ptr_dtor(var_hash-data[i]);
@@ -222,7 +222,7 @@
 #define YYMARKER marker
 
 
-#line 226 ext/standard/var_unserializer.re
+#line 230 ext/standard/var_unserializer.re
 
 
 
@@ -240,7 +240,7 @@
case '+':
p++;
}
-   
+
while (1) {
cursor = (char)*p;
if (cursor = '0'  cursor = '9') {
@@ -269,7 +269,7 @@
if (*p == '+') {
p++;
}
-   
+
while (1) {
cursor = *p;
if (cursor = '0'  cursor = '9') {
@@ -299,8 +299,9 @@
}
 
if (Z_TYPE_P(key) != IS_LONG 
-   Z_TYPE_P(key) != IS_STRING 
-   Z_TYPE_P(key) != IS_UNICODE) {
+   Z_TYPE_P(key) != IS_STRING 
+   Z_TYPE_P(key) != IS_UNICODE
+   ) {
zval_dtor(key);
FREE_ZVAL(key);
return 0;
@@ -331,11 +332,11 @@
zend_u_hash_update(ht, Z_TYPE_P(key), 
Z_UNIVAL_P(key), Z_UNILEN_P(key) + 1, data, sizeof(data), NULL);
break;
}
-   
+
zval_dtor(key);
FREE_ZVAL(key);
 
-   if (elements  *(*p-1) != ';'   *(*p-1) != '}') {
+   if (elements  *(*p-1) != ';'  *(*p-1) != '}') {
(*p)--;
return 0;
}
@@ -346,7 +347,7 @@
 
 static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
 {
-   if (*((*p)++) == '}') 
+   if (*((*p)++) == '}')
return 1;
 
 #if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE
@@ -362,7 +363,7 @@
zstr buf;
size_t buf_len;
 
-   if(ce-unserialize == NULL) {
+   if (ce-unserialize == NULL) {
zend_error(E_WARNING, Class %v has no unserializer, ce-name);
return 0;
}
@@ -385,9 +386,9 @@
zend_error(E_WARNING, Illegal data for unserializing);
return 0;
}
-  
-   if(datalen  0 || (*p) + datalen = max) {
-   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %d present, datalen, max - (*p));
+
+   if (datalen  0 || (*p) + datalen = max) {
+   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
return 0;
}
 
@@ -399,7 +400,7 @@
buf_len = datalen;
(*p) += datalen;
}
-   if(ce-unserialize(rval, ce, type, buf, 

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

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 18:33:29 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   var_unserializer.c 
  Log:
  Touch generated file
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.70.2.4.2.6r2=1.70.2.4.2.7diff_format=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.70.2.4.2.6 
php-src/ext/standard/var_unserializer.c:1.70.2.4.2.7
--- php-src/ext/standard/var_unserializer.c:1.70.2.4.2.6Mon Jul  9 
14:31:56 2007
+++ php-src/ext/standard/var_unserializer.c Mon Aug  6 18:33:29 2007
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.11.2 on Tue Mar 27 13:17:43 2007 */
+/* Generated by re2c 0.12.1 on Mon Aug  6 21:32:14 2007 */
 #line 1 ext/standard/var_unserializer.re
 /*
   +--+
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.c,v 1.70.2.4.2.6 2007/07/09 14:31:56 dmitry Exp $ */
+/* $Id: var_unserializer.c,v 1.70.2.4.2.7 2007/08/06 18:33:29 jani Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -146,7 +146,7 @@
char *str = safe_emalloc(*len, 1, 1);
unsigned char *end = *(unsigned char **)p+maxlen;
 
-   if(end  *p) {
+   if (end  *p) {
efree(str);
return NULL;
}
@@ -190,7 +190,7 @@
 #define YYMARKER marker
 
 
-#line 194 ext/standard/var_unserializer.re
+#line 198 ext/standard/var_unserializer.re
 
 
 
@@ -300,7 +300,7 @@
zval_dtor(key);
FREE_ZVAL(key);
 
-   if (elements  *(*p-1) != ';'   *(*p-1) != '}') {
+   if (elements  *(*p-1) != ';'  *(*p-1) != '}') {
(*p)--;
return 0;
}
@@ -311,7 +311,7 @@
 
 static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
 {
-   if (*((*p)++) == '}') 
+   if (*((*p)++) == '}')
return 1;
 
 #if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE
@@ -324,7 +324,7 @@
 {
long datalen;
 
-   if(ce-unserialize == NULL) {
+   if (ce-unserialize == NULL) {
zend_error(E_WARNING, Class %s has no unserializer, ce-name);
return 0;
}
@@ -333,12 +333,12 @@
 
(*p) += 2;
 
-   if(datalen  0 || (*p) + datalen = max) {
-   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %d present, datalen, max - (*p));
+   if (datalen  0 || (*p) + datalen = max) {
+   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
return 0;
}
 
-   if(ce-unserialize(rval, ce, (const unsigned char*)*p, datalen, 
(zend_unserialize_data *)var_hash TSRMLS_CC) != SUCCESS) {
+   if (ce-unserialize(rval, ce, (const unsigned char*)*p, datalen, 
(zend_unserialize_data *)var_hash TSRMLS_CC) != SUCCESS) {
return 0;
}
 
@@ -369,7 +369,7 @@
}
 
if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY 
-   zend_hash_exists(Z_OBJCE_PP(rval)-function_table, __wakeup, 
sizeof(__wakeup))) {
+   zend_hash_exists(Z_OBJCE_PP(rval)-function_table, __wakeup, 
sizeof(__wakeup))) {
INIT_PZVAL(fname);
ZVAL_STRINGL(fname, __wakeup, sizeof(__wakeup) - 1, 0);
call_user_function_ex(CG(function_table), rval, fname, 
retval_ptr, 0, 0, 1, NULL TSRMLS_CC);
@@ -433,7 +433,7 @@
  0,   0,   0,   0,   0,   0,   0,   0, 
};
 
-#line 433 ext/standard/var_unserializer.c
+#line 437 ext/standard/var_unserializer.c
{
YYCTYPE yych;
 
@@ -459,9 +459,9 @@
yych = *(YYMARKER = ++YYCURSOR);
if(yych == ':') goto yy95;
 yy3:
-#line 694 ext/standard/var_unserializer.re
+#line 698 ext/standard/var_unserializer.re
{ return 0; }
-#line 461 ext/standard/var_unserializer.c
+#line 465 ext/standard/var_unserializer.c
 yy4:
yych = *(YYMARKER = ++YYCURSOR);
if(yych == ':') goto yy89;
@@ -504,13 +504,13 @@
goto yy3;
 yy14:
++YYCURSOR;
-#line 688 ext/standard/var_unserializer.re
+#line 692 ext/standard/var_unserializer.re
{
/* this is the case where we have less data than planned */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, Unexpected end of 
serialized data);
return 0; /* not sure if it should be 0 or 1 here? */
 }
-#line 510 ext/standard/var_unserializer.c
+#line 514 ext/standard/var_unserializer.c
 yy16:
yych = *++YYCURSOR;
goto yy3;
@@ -540,7 +540,7 @@
yych = *++YYCURSOR;
if(yych != '') goto yy18;
++YYCURSOR;
-#line 576 ext/standard/var_unserializer.re
+#line 580 ext/standard/var_unserializer.re
{
  

[PHP-CVS] cvs: php-src /ext/standard var_unserializer.re

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 18:25:41 2007 UTC

  Modified files:  
/php-src/ext/standard   var_unserializer.re 
  Log:
  ws fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.re?r1=1.68r2=1.69diff_format=u
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.68 
php-src/ext/standard/var_unserializer.re:1.69
--- php-src/ext/standard/var_unserializer.re:1.68   Mon Aug  6 18:20:30 2007
+++ php-src/ext/standard/var_unserializer.reMon Aug  6 18:25:41 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.re,v 1.68 2007/08/06 18:20:30 jani Exp $ */
+/* $Id: var_unserializer.re,v 1.69 2007/08/06 18:25:41 jani Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -157,7 +157,7 @@
 {
long i;
var_entries *var_hash = var_hashx-first;
-   
+
while (var_hash) {
for (i = 0; i  var_hash-used_slots; i++) {
if (var_hash-data[i] == ozval) {
@@ -172,7 +172,7 @@
 static int var_access(php_unserialize_data_t *var_hashx, long id, zval 
***store)
 {
var_entries *var_hash = var_hashx-first;
-   
+
while (id = VAR_ENTRIES_MAX  var_hash  var_hash-used_slots == 
VAR_ENTRIES_MAX) {
var_hash = var_hash-next;
id -= VAR_ENTRIES_MAX;
@@ -192,7 +192,7 @@
void *next;
long i;
var_entries *var_hash = var_hashx-first;
-   
+
while (var_hash) {
next = var_hash-next;
efree(var_hash);
@@ -200,7 +200,7 @@
}
 
var_hash = var_hashx-first_dtor;
-   
+
while (var_hash) {
for (i = 0; i  var_hash-used_slots; i++) {
zval_ptr_dtor(var_hash-data[i]);
@@ -244,7 +244,7 @@
case '+':
p++;
}
-   
+
while (1) {
cursor = (char)*p;
if (cursor = '0'  cursor = '9') {
@@ -273,7 +273,7 @@
if (*p == '+') {
p++;
}
-   
+
while (1) {
cursor = *p;
if (cursor = '0'  cursor = '9') {
@@ -303,8 +303,9 @@
}
 
if (Z_TYPE_P(key) != IS_LONG 
-   Z_TYPE_P(key) != IS_STRING 
-   Z_TYPE_P(key) != IS_UNICODE) {
+   Z_TYPE_P(key) != IS_STRING 
+   Z_TYPE_P(key) != IS_UNICODE
+   ) {
zval_dtor(key);
FREE_ZVAL(key);
return 0;
@@ -335,11 +336,11 @@
zend_u_hash_update(ht, Z_TYPE_P(key), 
Z_UNIVAL_P(key), Z_UNILEN_P(key) + 1, data, sizeof(data), NULL);
break;
}
-   
+
zval_dtor(key);
FREE_ZVAL(key);
 
-   if (elements  *(*p-1) != ';'   *(*p-1) != '}') {
+   if (elements  *(*p-1) != ';'  *(*p-1) != '}') {
(*p)--;
return 0;
}
@@ -350,7 +351,7 @@
 
 static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
 {
-   if (*((*p)++) == '}') 
+   if (*((*p)++) == '}')
return 1;
 
 #if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE
@@ -389,7 +390,7 @@
zend_error(E_WARNING, Illegal data for unserializing);
return 0;
}
-  
+
if (datalen  0 || (*p) + datalen = max) {
zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
return 0;
@@ -419,11 +420,11 @@
 static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
 {
long elements;
-   
+
elements = parse_iv2((*p) + 2, p);
 
(*p) += 2;
-   
+
object_init_ex(*rval, ce);
return elements;
 }
@@ -438,7 +439,7 @@
}
 
if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY 
-   zend_hash_exists(Z_OBJCE_PP(rval)-function_table, __wakeup, 
sizeof(__wakeup))) {
+   zend_hash_exists(Z_OBJCE_PP(rval)-function_table, __wakeup, 
sizeof(__wakeup))) {
INIT_PZVAL(fname);
ZVAL_ASCII_STRINGL(fname, __wakeup, sizeof(__wakeup) - 1, 
1);
call_user_function_ex(CG(function_table), rval, fname, 
retval_ptr, 0, 0, 1, NULL TSRMLS_CC);
@@ -458,15 +459,13 @@
zval **rval_ref;
 
limit = cursor = *p;
-   
+
if (var_hash  cursor[0] != 'R') {
var_push(var_hash, rval);
}
 
start = cursor;
 
-   
-   
 /*!re2c
 
 R: iv ;{
@@ -486,7 +485,7 @@
*rval = *rval_ref;
(*rval)-refcount++;
(*rval)-is_ref = 1;
-   
+
return 1;
 }
 
@@ -509,7 +508,7 @@
*rval = *rval_ref;

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/openssl openssl.c

2007-08-06 Thread Pierre-Alain Joye
pajoye  Mon Aug  6 19:11:20 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/opensslopenssl.c 
  Log:
  - #4, truncate the _default to the buffer size (was 200 since day #1, we 
don't need dynamic alloc here)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.38r2=1.98.2.5.2.39diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.38 
php-src/ext/openssl/openssl.c:1.98.2.5.2.39
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.38 Wed Jul 11 12:18:14 2007
+++ php-src/ext/openssl/openssl.c   Mon Aug  6 19:11:20 2007
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.98.2.5.2.38 2007/07/11 12:18:14 dmitry Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.39 2007/08/06 19:11:20 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1739,7 +1739,9 @@
if (strcmp(_default, type + len) != 0) {
continue;
}
-   
+   if (len  200) {
+   len = 200;
+   }
memcpy(buffer, type, len);
buffer[len] = '\0';
type = buffer;

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



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

2007-08-06 Thread Pierre-Alain Joye
pajoye  Mon Aug  6 19:13:05 2007 UTC

  Modified files:  
/php-src/ext/opensslopenssl.c 
  Log:
  - MFB: #4, truncate the _default to the buffer size (was 200 since day 
#1, we don't need dynamic alloc here)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.146r2=1.147diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.146 php-src/ext/openssl/openssl.c:1.147
--- php-src/ext/openssl/openssl.c:1.146 Mon Aug  6 08:43:43 2007
+++ php-src/ext/openssl/openssl.c   Mon Aug  6 19:13:05 2007
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.146 2007/08/06 08:43:43 dmitry Exp $ */
+/* $Id: openssl.c,v 1.147 2007/08/06 19:13:05 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1814,7 +1814,9 @@
if (strcmp(_default, type + len) != 0) {
continue;
}
-   
+   if (len  200) {
+   len = 200;
+   }
memcpy(buffer, type, len);
buffer[len] = '\0';
type = buffer;

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



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

2007-08-06 Thread Pierre-Alain Joye
pajoye  Mon Aug  6 19:16:40 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - #4 entry
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.880r2=1.2027.2.547.2.881diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.880 php-src/NEWS:1.2027.2.547.2.881
--- php-src/NEWS:1.2027.2.547.2.880 Mon Aug  6 16:23:08 2007
+++ php-src/NEWSMon Aug  6 19:16:40 2007
@@ -79,6 +79,7 @@
 - Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory 
   already exists). (Pierre)
 
+- Fixed bug #4 (possible buffer overflow in php_openssl_make_REQ) (Pierre)
 - Fixed bug #42173 (oci8 INTERVAL and TIMESTAMP type fixes). (Chris)
 - Fixed bug #42151 (__destruct functions not called after catching a SoapFault
   exception). (Dmitry)

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



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

2007-08-06 Thread Jani Taskinen
janiMon Aug  6 19:40:21 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - move entry to right place..
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.881r2=1.2027.2.547.2.882diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.881 php-src/NEWS:1.2027.2.547.2.882
--- php-src/NEWS:1.2027.2.547.2.881 Mon Aug  6 19:16:40 2007
+++ php-src/NEWSMon Aug  6 19:40:21 2007
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? Aug 2007, PHP 5.2.4
+- Fixed bug #4 (possible buffer overflow in php_openssl_make_REQ). (Pierre)
 - Fixed bug #42208 (substr_replace() crashes when the same array is passed 
   more than once). (crrodriguez at suse dot de, Ilia)
 - Fixed bug #42195 (C++ compiler required always). (Jani)
@@ -79,7 +80,6 @@
 - Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory 
   already exists). (Pierre)
 
-- Fixed bug #4 (possible buffer overflow in php_openssl_make_REQ) (Pierre)
 - Fixed bug #42173 (oci8 INTERVAL and TIMESTAMP type fixes). (Chris)
 - Fixed bug #42151 (__destruct functions not called after catching a SoapFault
   exception). (Dmitry)

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/openssl openssl.c

2007-08-06 Thread Pierre-Alain Joye
pajoye  Mon Aug  6 19:49:45 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/opensslopenssl.c 
  Log:
  - #4, forgot this one (thanks mattias)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.39r2=1.98.2.5.2.40diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.39 
php-src/ext/openssl/openssl.c:1.98.2.5.2.40
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.39 Mon Aug  6 19:11:20 2007
+++ php-src/ext/openssl/openssl.c   Mon Aug  6 19:49:45 2007
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.98.2.5.2.39 2007/08/06 19:11:20 pajoye Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.40 2007/08/06 19:49:45 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1743,7 +1743,7 @@
len = 200;
}
memcpy(buffer, type, len);
-   buffer[len] = '\0';
+   buffer[len - 1] = '\0';
type = buffer;

/* Skip past any leading X. X: X, etc to allow for 
multiple

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



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

2007-08-06 Thread Pierre-Alain Joye
pajoye  Mon Aug  6 19:50:16 2007 UTC

  Modified files:  
/php-src/ext/opensslopenssl.c 
  Log:
  - MFB: #4, forgot this one (thanks mattias)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.147r2=1.148diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.147 php-src/ext/openssl/openssl.c:1.148
--- php-src/ext/openssl/openssl.c:1.147 Mon Aug  6 19:13:05 2007
+++ php-src/ext/openssl/openssl.c   Mon Aug  6 19:50:16 2007
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.147 2007/08/06 19:13:05 pajoye Exp $ */
+/* $Id: openssl.c,v 1.148 2007/08/06 19:50:16 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1818,9 +1818,10 @@
len = 200;
}
memcpy(buffer, type, len);
-   buffer[len] = '\0';
+   buffer[len - 1] = '\0';
+
type = buffer;
-   
+
/* Skip past any leading X. X: X, etc to allow for 
multiple
 * instances */
for (str = type; *str; str++) {

-- 
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 php_oci8_int.h

2007-08-06 Thread Christopher Jones
sixdMon Aug  6 20:31:40 2007 UTC

  Modified files:  
/php-src/ext/oci8   oci8.c php_oci8_int.h 
  Log:
  flush persistent connection after password change
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.335r2=1.336diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.335 php-src/ext/oci8/oci8.c:1.336
--- php-src/ext/oci8/oci8.c:1.335   Thu Aug  2 22:49:58 2007
+++ php-src/ext/oci8/oci8.c Mon Aug  6 20:31:40 2007
@@ -26,7 +26,7 @@
+--+
 */
 
-/* $Id: oci8.c,v 1.335 2007/08/02 22:49:58 sixd Exp $ */
+/* $Id: oci8.c,v 1.336 2007/08/06 20:31:40 sixd Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -674,7 +674,7 @@
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
php_info_print_table_row(2, Version, 1.2.2);
-   php_info_print_table_row(2, Revision, $Revision: 1.335 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.336 $);
 
snprintf(buf, sizeof(buf), %ld, OCI_G(num_persistent));
php_info_print_table_row(2, Active Persistent Connections, buf);
@@ -1238,6 +1238,9 @@
connection-next_ping = 0;
}

+   /* mark password as unchanged by PHP during the duration of the 
database session */
+   connection-passwd_changed = 0;
+   
smart_str_free_ex(hashed_details, 0);
 
/* allocate environment handle */
@@ -1609,6 +1612,7 @@
PHP_OCI_HANDLE_ERROR(connection, connection-errcode);
return 1;
}
+   connection-passwd_changed = 1;
return 0;
 } /* }}} */
 
@@ -1848,7 +1852,7 @@
 
if (connection-used_this_request) {
if ((PG(connection_status)  PHP_CONNECTION_TIMEOUT) || 
OCI_G(in_call)) {
-   return 1;
+   return ZEND_HASH_APPLY_REMOVE;
}
 
if (connection-descriptors) {
@@ -1861,6 +1865,18 @@
php_oci_connection_rollback(connection 
TSRMLS_CC);
}

+   /* If oci_password_change() changed the password of a
+* persistent connection, close the connection and 
remove
+* it from the persistent connection cache.  This means
+* subsequent scripts will be prevented from being able 
to
+* present the old (now invalid) password to a usable
+* connection to the database; they must use the new
+* password.
+*/
+   if (connection-passwd_changed) {
+   return ZEND_HASH_APPLY_REMOVE;
+   }
+
if (OCI_G(persistent_timeout)  0) {
connection-idle_expiry = timestamp + 
OCI_G(persistent_timeout);
}
@@ -1876,11 +1892,11 @@
} else if (OCI_G(persistent_timeout) != -1) {
if (connection-idle_expiry  timestamp) {
/* connection has timed out */
-   return 1;
+   return ZEND_HASH_APPLY_REMOVE;
}
}
}
-   return 0;
+   return ZEND_HASH_APPLY_KEEP;
 } /* }}} */
 
 #ifdef ZTS
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.36r2=1.37diff_format=u
Index: php-src/ext/oci8/php_oci8_int.h
diff -u php-src/ext/oci8/php_oci8_int.h:1.36 
php-src/ext/oci8/php_oci8_int.h:1.37
--- php-src/ext/oci8/php_oci8_int.h:1.36Tue Jul 31 19:19:39 2007
+++ php-src/ext/oci8/php_oci8_int.h Mon Aug  6 20:31:40 2007
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: php_oci8_int.h,v 1.36 2007/07/31 19:19:39 tony2001 Exp $ */
+/* $Id: php_oci8_int.h,v 1.37 2007/08/06 20:31:40 sixd Exp $ */
 
 #if HAVE_OCI8
 # ifndef PHP_OCI8_INT_H
@@ -117,6 +117,7 @@
unsigned is_persistent:1;   /* self-descriptive */
unsigned used_this_request:1; /* helps to determine if we should reset 
connection's next ping time and check its timeout */
unsigned needs_commit:1;/* helps to determine if we should 
rollback this connection on close/shutdown */
+   unsigned passwd_changed:1;  /* helps determine if a persistent 
connection hash should be invalidated after a password change */
int rsrc_id;/* resource ID */
time_t idle_expiry; /* time when the connection 
will be considered as expired */
time_t next_ping;   /* time of the next ping */

-- 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8 oci8.c php_oci8_int.h

2007-08-06 Thread Christopher Jones
sixdMon Aug  6 20:32:55 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/oci8   oci8.c php_oci8_int.h 
  Log:
  MFH: oci8: flush persistent connection after password change
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.16.2.36r2=1.269.2.16.2.37diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.16.2.36 
php-src/ext/oci8/oci8.c:1.269.2.16.2.37
--- php-src/ext/oci8/oci8.c:1.269.2.16.2.36 Thu Aug  2 22:39:54 2007
+++ php-src/ext/oci8/oci8.c Mon Aug  6 20:32:54 2007
@@ -26,7 +26,7 @@
+--+
 */
 
-/* $Id: oci8.c,v 1.269.2.16.2.36 2007/08/02 22:39:54 sixd Exp $ */
+/* $Id: oci8.c,v 1.269.2.16.2.37 2007/08/06 20:32:54 sixd Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -674,7 +674,7 @@
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
php_info_print_table_row(2, Version, 1.2.3);
-   php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.36 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.37 $);
 
snprintf(buf, sizeof(buf), %ld, OCI_G(num_persistent));
php_info_print_table_row(2, Active Persistent Connections, buf);
@@ -1203,6 +1203,9 @@
/* -1 means Off */
connection-next_ping = 0;
}
+
+   /* mark password as unchanged by PHP during the duration of the 
database session */
+   connection-passwd_changed = 0;

smart_str_free_ex(hashed_details, 0);
 
@@ -1399,7 +1402,7 @@

/* mark it as open */
connection-is_open = 1;
-
+   
/* add to the appropriate hash */
if (connection-is_persistent) {
new_le.ptr = connection;
@@ -1571,6 +1574,7 @@
PHP_OCI_HANDLE_ERROR(connection, connection-errcode);
return 1;
}
+   connection-passwd_changed = 1;
return 0;
 } /* }}} */
 
@@ -1790,7 +1794,7 @@
 
if (connection-used_this_request) {
if ((PG(connection_status)  PHP_CONNECTION_TIMEOUT) || 
OCI_G(in_call)) {
-   return 1;
+   return ZEND_HASH_APPLY_REMOVE;
}
 
if (connection-descriptors) {
@@ -1803,6 +1807,18 @@
php_oci_connection_rollback(connection 
TSRMLS_CC);
}

+   /* If oci_password_change() changed the password of a
+* persistent connection, close the connection and 
remove
+* it from the persistent connection cache.  This means
+* subsequent scripts will be prevented from being able 
to
+* present the old (now invalid) password to a usable
+* connection to the database; they must use the new
+* password.
+*/
+   if (connection-passwd_changed) {
+   return ZEND_HASH_APPLY_REMOVE;
+   }
+
if (OCI_G(persistent_timeout)  0) {
connection-idle_expiry = timestamp + 
OCI_G(persistent_timeout);
}
@@ -1815,14 +1831,15 @@
}
 
connection-used_this_request = 0;
+
} else if (OCI_G(persistent_timeout) != -1) {
if (connection-idle_expiry  timestamp) {
/* connection has timed out */
-   return 1;
+   return ZEND_HASH_APPLY_REMOVE;
}
}
}
-   return 0;
+   return ZEND_HASH_APPLY_KEEP;
 } /* }}} */
 
 #ifdef ZTS
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.11.2.6.2.20r2=1.11.2.6.2.21diff_format=u
Index: php-src/ext/oci8/php_oci8_int.h
diff -u php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.20 
php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.21
--- php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.20   Tue Jul 31 19:21:08 2007
+++ php-src/ext/oci8/php_oci8_int.h Mon Aug  6 20:32:55 2007
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: php_oci8_int.h,v 1.11.2.6.2.20 2007/07/31 19:21:08 tony2001 Exp $ */
+/* $Id: php_oci8_int.h,v 1.11.2.6.2.21 2007/08/06 20:32:55 sixd Exp $ */
 
 #if HAVE_OCI8
 # ifndef PHP_OCI8_INT_H
@@ -112,6 +112,7 @@
unsigned is_persistent:1;   /* self-descriptive */
unsigned used_this_request:1; /* helps to determine if we should reset 
connection's next ping time and check its timeout */
unsigned needs_commit:1;

[PHP-CVS] cvs: php-src /ext/zip php_zip.c /ext/zip/tests oo_properties.phpt

2007-08-06 Thread Hannes Magnusson
bjori   Mon Aug  6 21:59:11 2007 UTC

  Added files: 
/php-src/ext/zip/tests  oo_properties.phpt 

  Modified files:  
/php-src/ext/zipphp_zip.c 
  Log:
  - Fix isset/empty($ZipArchive-property)
  - Add test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.47r2=1.48diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.47 php-src/ext/zip/php_zip.c:1.48
--- php-src/ext/zip/php_zip.c:1.47  Mon Jun  4 06:38:08 2007
+++ php-src/ext/zip/php_zip.c   Mon Aug  6 21:59:10 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.47 2007/06/04 06:38:08 tony2001 Exp $ */
+/* $Id: php_zip.c,v 1.48 2007/08/06 21:59:10 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -449,6 +449,55 @@
 }
 /* }}} */
 
+static int php_zip_has_property(zval *object, zval *member, int type 
TSRMLS_DC) /* {{{ */
+{
+   ze_zip_object *obj;
+   zval tmp_member;
+   zip_prop_handler *hnd;
+   zend_object_handlers *std_hnd;
+   int ret, retval = 0;
+
+   if (member-type != IS_STRING) {
+   tmp_member = *member;
+   zval_copy_ctor(tmp_member);
+   convert_to_string(tmp_member);
+   member = tmp_member;
+   }
+
+   ret = FAILURE;
+   obj = (ze_zip_object *)zend_objects_get_address(object TSRMLS_CC);
+
+   if (obj-prop_handler != NULL) {
+   ret = zend_hash_find(obj-prop_handler, Z_STRVAL_P(member), 
Z_STRLEN_P(member)+1, (void **) hnd);
+   }
+
+   if (ret == SUCCESS) {
+   zval *tmp;
+
+   if (type == 2) {
+   retval = 1;
+   } else if (php_zip_property_reader(obj, hnd, tmp, 1 TSRMLS_CC) 
== SUCCESS) {
+   tmp-refcount = 1;
+   tmp-is_ref = 0;
+   if (type == 1) {
+   retval = zend_is_true(tmp);
+   } else if (type == 0) {
+   retval = (Z_TYPE_P(tmp) != IS_NULL);
+   }
+   zval_ptr_dtor(tmp);
+   }
+   } else {
+   std_hnd = zend_get_std_object_handlers();
+   retval = std_hnd-has_property(object, member, type TSRMLS_CC);
+   }
+
+   if (member == tmp_member) {
+   zval_dtor(member);
+   }
+   return retval;
+}
+/* }}} */
+
 static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */
 {
ze_zip_object *obj;
@@ -2059,6 +2108,7 @@
 
zip_object_handlers.get_properties = php_zip_get_properties;
zip_object_handlers.read_property   = php_zip_read_property;
+   zip_object_handlers.has_property= php_zip_has_property;
 
INIT_CLASS_ENTRY(ce, ZipArchive, zip_class_functions);
ce.create_object = php_zip_object_new;
@@ -2145,7 +2195,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, Zip, enabled);
-   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.47 
2007/06/04 06:38:08 tony2001 Exp $);
+   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.48 
2007/08/06 21:59:10 bjori Exp $);
php_info_print_table_row(2, Zip version, 2.0.0);
php_info_print_table_row(2, Libzip version, 0.7.1);
 

http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/oo_properties.phpt?view=markuprev=1.1
Index: php-src/ext/zip/tests/oo_properties.phpt
+++ php-src/ext/zip/tests/oo_properties.phpt
--TEST--
ziparchive::properties isset()/empty() checks
--SKIPIF--
?php
/* $Id: oo_properties.phpt,v 1.1 2007/08/06 21:59:11 bjori Exp $ */
if(!extension_loaded('zip')) die('skip');
?
--FILE--
?php

$dirname = dirname(__FILE__) . '/';
$file = $dirname . '__property_test.zip';

copy($dirname . 'test_with_comment.zip', $file);

$zip = new ZipArchive;
if (!$zip-open($file)) {
exit('failed');
}

printf(zip-status (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-status, 
empty($zip-status), isset($zip-status));
printf(zip-numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-numFiles, 
empty($zip-numFiles), isset($zip-numFiles));
printf(zip-bogus (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-bogus, 
empty($zip-bogus), isset($zip-bogus));


$zip-addEmptyDir('emptydir');

printf(zip-status (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-status, 
empty($zip-status), isset($zip-status));
printf(zip-numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-numFiles, 
empty($zip-numFiles), isset($zip-numFiles));
printf(zip-filename (%d):\n\tempty(): %d\n\tisset(): %d\n, 
strlen($zip-filename), empty($zip-filename), isset($zip-filename));
printf(zip-comment (%d):\n\tempty(): %d\n\tisset(): %d\n, 
strlen($zip-comment), empty($zip-comment), isset($zip-comment));

@unlink($file);
?
--EXPECTF--
zip-status (0):
empty(): 1
isset(): 1
zip-numFiles (4):
empty(): 0

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip php_zip.c /ext/zip/tests oo_properties.phpt

2007-08-06 Thread Hannes Magnusson
bjori   Mon Aug  6 22:02:32 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/zip/tests  oo_properties.phpt 

  Modified files:  
/php-src/ext/zipphp_zip.c 
  Log:
  MFH: - Fix isset/empty($ZipArchive-property)
  MFH: - Add test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.37r2=1.1.2.38diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.37 php-src/ext/zip/php_zip.c:1.1.2.38
--- php-src/ext/zip/php_zip.c:1.1.2.37  Mon Jun  4 06:38:22 2007
+++ php-src/ext/zip/php_zip.c   Mon Aug  6 22:02:32 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.37 2007/06/04 06:38:22 tony2001 Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38 2007/08/06 22:02:32 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -449,6 +449,55 @@
 }
 /* }}} */
 
+static int php_zip_has_property(zval *object, zval *member, int type 
TSRMLS_DC) /* {{{ */
+{
+   ze_zip_object *obj;
+   zval tmp_member;
+   zip_prop_handler *hnd;
+   zend_object_handlers *std_hnd;
+   int ret, retval = 0;
+
+   if (member-type != IS_STRING) {
+   tmp_member = *member;
+   zval_copy_ctor(tmp_member);
+   convert_to_string(tmp_member);
+   member = tmp_member;
+   }
+
+   ret = FAILURE;
+   obj = (ze_zip_object *)zend_objects_get_address(object TSRMLS_CC);
+
+   if (obj-prop_handler != NULL) {
+   ret = zend_hash_find(obj-prop_handler, Z_STRVAL_P(member), 
Z_STRLEN_P(member)+1, (void **) hnd);
+   }
+
+   if (ret == SUCCESS) {
+   zval *tmp;
+
+   if (type == 2) {
+   retval = 1;
+   } else if (php_zip_property_reader(obj, hnd, tmp, 1 TSRMLS_CC) 
== SUCCESS) {
+   tmp-refcount = 1;
+   tmp-is_ref = 0;
+   if (type == 1) {
+   retval = zend_is_true(tmp);
+   } else if (type == 0) {
+   retval = (Z_TYPE_P(tmp) != IS_NULL);
+   }
+   zval_ptr_dtor(tmp);
+   }
+   } else {
+   std_hnd = zend_get_std_object_handlers();
+   retval = std_hnd-has_property(object, member, type TSRMLS_CC);
+   }
+
+   if (member == tmp_member) {
+   zval_dtor(member);
+   }
+   return retval;
+}
+/* }}} */
+
 static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */
 {
ze_zip_object *obj;
@@ -1965,6 +2014,7 @@
 
zip_object_handlers.get_properties = php_zip_get_properties;
zip_object_handlers.read_property   = php_zip_read_property;
+   zip_object_handlers.has_property= php_zip_has_property;
 
INIT_CLASS_ENTRY(ce, ZipArchive, zip_class_functions);
ce.create_object = php_zip_object_new;
@@ -2051,7 +2101,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, Zip, enabled);
-   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 
1.1.2.37 2007/06/04 06:38:22 tony2001 Exp $);
+   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 
1.1.2.38 2007/08/06 22:02:32 bjori Exp $);
php_info_print_table_row(2, Zip version, 2.0.0);
php_info_print_table_row(2, Libzip version, 0.7.1);
 

http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/oo_properties.phpt?view=markuprev=1.1
Index: php-src/ext/zip/tests/oo_properties.phpt
+++ php-src/ext/zip/tests/oo_properties.phpt
--TEST--
ziparchive::properties isset()/empty() checks
--SKIPIF--
?php
/* $Id: oo_properties.phpt,v 1.1 2007/08/06 21:59:11 bjori Exp $ */
if(!extension_loaded('zip')) die('skip');
?
--FILE--
?php

$dirname = dirname(__FILE__) . '/';
$file = $dirname . '__property_test.zip';

copy($dirname . 'test_with_comment.zip', $file);

$zip = new ZipArchive;
if (!$zip-open($file)) {
exit('failed');
}

printf(zip-status (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-status, 
empty($zip-status), isset($zip-status));
printf(zip-numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-numFiles, 
empty($zip-numFiles), isset($zip-numFiles));
printf(zip-bogus (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-bogus, 
empty($zip-bogus), isset($zip-bogus));


$zip-addEmptyDir('emptydir');

printf(zip-status (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-status, 
empty($zip-status), isset($zip-status));
printf(zip-numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n, $zip-numFiles, 
empty($zip-numFiles), isset($zip-numFiles));
printf(zip-filename (%d):\n\tempty(): %d\n\tisset(): %d\n, 
strlen($zip-filename), empty($zip-filename), isset($zip-filename));
printf(zip-comment (%d):\n\tempty(): %d\n\tisset(): %d\n, 
strlen($zip-comment), empty($zip-comment), isset($zip-comment));

@unlink($file);
?
--EXPECTF--
zip-status (0):
empty(): 1

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip/tests oo_properties.phpt

2007-08-06 Thread Hannes Magnusson
bjori   Mon Aug  6 23:35:46 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/zip/tests  oo_properties.phpt 
  Log:
  Fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/oo_properties.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/zip/tests/oo_properties.phpt
diff -u php-src/ext/zip/tests/oo_properties.phpt:1.1.2.2 
php-src/ext/zip/tests/oo_properties.phpt:1.1.2.3
--- php-src/ext/zip/tests/oo_properties.phpt:1.1.2.2Mon Aug  6 22:02:32 2007
+++ php-src/ext/zip/tests/oo_properties.phptMon Aug  6 23:35:46 2007
@@ -2,7 +2,7 @@
 ziparchive::properties isset()/empty() checks
 --SKIPIF--
 ?php
-/* $Id: oo_properties.phpt,v 1.1.2.2 2007/08/06 22:02:32 bjori Exp $ */
+/* $Id: oo_properties.phpt,v 1.1.2.3 2007/08/06 23:35:46 bjori Exp $ */
 if(!extension_loaded('zip')) die('skip');
 ?
 --FILE--
@@ -30,7 +30,7 @@
 printf(zip-filename (%d):\n\tempty(): %d\n\tisset(): %d\n, 
strlen($zip-filename), empty($zip-filename), isset($zip-filename));
 printf(zip-comment (%d):\n\tempty(): %d\n\tisset(): %d\n, 
strlen($zip-comment), empty($zip-comment), isset($zip-comment));
 
-var_dump(unlink($file));
[EMAIL PROTECTED]($file);
 ?
 --EXPECTF--
 zip-status (0):

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