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

2008-02-15 Thread changelog
changelog   Sat Feb 16 01:31:33 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2959r2=1.2960diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2959 php-src/ChangeLog:1.2960
--- php-src/ChangeLog:1.2959Fri Feb 15 01:31:27 2008
+++ php-src/ChangeLog   Sat Feb 16 01:31:32 2008
@@ -1,3 +1,204 @@
+2008-02-15  Christopher Jones  [EMAIL PROTECTED]
+
+* ext/oci8/oci8_collection.c
+  ext/oci8/oci8_collection.c
+  ext/oci8/tests/bug44113.phpt
+  ext/oci8/tests/bug44113.phpt:
+  MHB: Bug #44113 (New collection creation can fail with OCI-22303)
+
+* (PHP_5_2)
+  ext/oci8/oci8_collection.c
+  ext/oci8/tests/bug44113.phpt
+  ext/oci8/tests/bug44113.phpt
+  ext/oci8/tests/bug44113.phpt:
+  Bug #44113 (New collection creation can fail with OCI-22303)
+
+2008-02-15  Felipe Pena  [EMAIL PROTECTED]
+
+* ext/pcre/tests/bug42298.phpt
+  ext/standard/tests/array/count_variation3.phpt:
+  Fix tests
+
+2008-02-15  Josie Messa  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/standard/tests/array/rsort_basic.phpt
+  ext/standard/tests/array/rsort_basic.phpt
+  ext/standard/tests/array/rsort_error.phpt
+  ext/standard/tests/array/rsort_error.phpt
+  ext/standard/tests/array/rsort_object1.phpt
+  ext/standard/tests/array/rsort_object1.phpt
+  ext/standard/tests/array/rsort_object2.phpt
+  ext/standard/tests/array/rsort_object2.phpt
+  ext/standard/tests/array/rsort_variation1.phpt
+  ext/standard/tests/array/rsort_variation1.phpt
+  ext/standard/tests/array/rsort_variation10.phpt
+  ext/standard/tests/array/rsort_variation10.phpt
+  ext/standard/tests/array/rsort_variation11.phpt
+  ext/standard/tests/array/rsort_variation11.phpt
+  ext/standard/tests/array/rsort_variation2.phpt
+  ext/standard/tests/array/rsort_variation2.phpt
+  ext/standard/tests/array/rsort_variation3.phpt
+  ext/standard/tests/array/rsort_variation3.phpt
+  ext/standard/tests/array/rsort_variation4.phpt
+  ext/standard/tests/array/rsort_variation4.phpt
+  ext/standard/tests/array/rsort_variation5.phpt
+  ext/standard/tests/array/rsort_variation5.phpt
+  ext/standard/tests/array/rsort_variation6.phpt
+  ext/standard/tests/array/rsort_variation6.phpt
+  ext/standard/tests/array/rsort_variation7.phpt
+  ext/standard/tests/array/rsort_variation7.phpt
+  ext/standard/tests/array/rsort_variation8.phpt
+  ext/standard/tests/array/rsort_variation8.phpt
+  ext/standard/tests/array/rsort_variation9.phpt
+  ext/standard/tests/array/rsort_variation9.phpt:
+  - New tests for rsort() function
+
+* ext/standard/tests/array/rsort_basic.phpt
+  ext/standard/tests/array/rsort_basic.phpt
+  ext/standard/tests/array/rsort_basic.phpt
+  ext/standard/tests/array/rsort_error.phpt
+  ext/standard/tests/array/rsort_error.phpt
+  ext/standard/tests/array/rsort_error.phpt
+  ext/standard/tests/array/rsort_object1.phpt
+  ext/standard/tests/array/rsort_object1.phpt
+  ext/standard/tests/array/rsort_object1.phpt
+  ext/standard/tests/array/rsort_object2.phpt
+  ext/standard/tests/array/rsort_object2.phpt
+  ext/standard/tests/array/rsort_object2.phpt
+  ext/standard/tests/array/rsort_variation1.phpt
+  ext/standard/tests/array/rsort_variation1.phpt
+  ext/standard/tests/array/rsort_variation1.phpt
+  ext/standard/tests/array/rsort_variation10.phpt
+  ext/standard/tests/array/rsort_variation10.phpt
+  ext/standard/tests/array/rsort_variation10.phpt
+  ext/standard/tests/array/rsort_variation11.phpt
+  ext/standard/tests/array/rsort_variation11.phpt
+  ext/standard/tests/array/rsort_variation11.phpt
+  ext/standard/tests/array/rsort_variation2.phpt
+  ext/standard/tests/array/rsort_variation2.phpt
+  ext/standard/tests/array/rsort_variation2.phpt
+  ext/standard/tests/array/rsort_variation3.phpt
+  ext/standard/tests/array/rsort_variation3.phpt
+  ext/standard/tests/array/rsort_variation3.phpt
+  ext/standard/tests/array/rsort_variation4.phpt
+  ext/standard/tests/array/rsort_variation4.phpt
+  ext/standard/tests/array/rsort_variation4.phpt
+  ext/standard/tests/array/rsort_variation5.phpt
+  ext/standard/tests/array/rsort_variation5.phpt
+  ext/standard/tests/array/rsort_variation5.phpt
+  ext/standard/tests/array/rsort_variation6.phpt
+  ext/standard/tests/array/rsort_variation6.phpt
+  ext/standard/tests/array/rsort_variation6.phpt
+  ext/standard/tests/array/rsort_variation7.phpt
+  ext/standard/tests/array/rsort_variation7.phpt
+  ext/standard/tests/array/rsort_variation7.phpt
+  ext/standard/tests/array/rsort_variation8.phpt
+  ext/standard/tests/array/rsort_variation8.phpt
+  

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

2008-02-15 Thread changelog
changelog   Sat Feb 16 01:31:36 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1242r2=1.1243diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1242 ZendEngine2/ChangeLog:1.1243
--- ZendEngine2/ChangeLog:1.1242Fri Feb 15 01:31:30 2008
+++ ZendEngine2/ChangeLog   Sat Feb 16 01:31:36 2008
@@ -1,3 +1,15 @@
+2008-02-15  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  zend.h
+  zend_API.c
+  zend_builtin_functions.c
+  zend_compile.c
+  zend_execute_API.c
+  zend_object_handlers.c
+  tests/bug43128.phpt:
+  MFH: Fixed bug #43128 (Very long class name causes segfault)
+
 2008-02-14  Dmitry Stogov  [EMAIL PROTECTED]
 
 * zend_alloc.c
@@ -21458,7 +21470,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1242 2008/02/15 01:31:30 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1243 2008/02/16 01:31:36 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -23182,7 +23194,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1242 2008/02/15 01:31:30 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1243 2008/02/16 01:31:36 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src /ext/json/tests bug42090.phpt

2008-02-15 Thread Antony Dovgal
tony2001Fri Feb 15 09:20:19 2008 UTC

  Modified files:  
/php-src/ext/json/tests bug42090.phpt 
  Log:
  cosmetic fix
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug42090.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/json/tests/bug42090.phpt
diff -u php-src/ext/json/tests/bug42090.phpt:1.1 
php-src/ext/json/tests/bug42090.phpt:1.2
--- php-src/ext/json/tests/bug42090.phpt:1.1Tue Jul 24 22:54:26 2007
+++ php-src/ext/json/tests/bug42090.phptFri Feb 15 09:20:19 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug#42090 (json_decode causes segmentation fault)
+Bug #42090 (json_decode causes segmentation fault)
 --SKIPIF--
 ?php if (!extension_loaded(json)) print skip; ?
 --FILE--

-- 
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/json/tests bug42090.phpt

2008-02-15 Thread Antony Dovgal
tony2001Fri Feb 15 09:20:26 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/json/tests bug42090.phpt 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug42090.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u
Index: php-src/ext/json/tests/bug42090.phpt
diff -u php-src/ext/json/tests/bug42090.phpt:1.1.2.2 
php-src/ext/json/tests/bug42090.phpt:1.1.2.2.2.1
--- php-src/ext/json/tests/bug42090.phpt:1.1.2.2Tue Jul 24 22:57:13 2007
+++ php-src/ext/json/tests/bug42090.phptFri Feb 15 09:20:25 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug#42090 (json_decode causes segmentation fault)
+Bug #42090 (json_decode causes segmentation fault)
 --SKIPIF--
 ?php if (!extension_loaded(json)) print skip; ?
 --FILE--

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



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

2008-02-15 Thread Antony Dovgal
tony2001Fri Feb 15 09:33:00 2008 UTC

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  recursion protection in count()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.445r2=1.446diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.445 php-src/ext/standard/array.c:1.446
--- php-src/ext/standard/array.c:1.445  Thu Feb 14 14:17:32 2008
+++ php-src/ext/standard/array.cFri Feb 15 09:33:00 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.445 2008/02/14 14:17:32 felipe Exp $ */
+/* $Id: array.c,v 1.446 2008/02/15 09:33:00 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -281,6 +281,11 @@
zval **element;
 
if (Z_TYPE_P(array) == IS_ARRAY) {
+   if (Z_ARRVAL_P(array)-nApplyCount  1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, recursion 
detected);
+   return 0;
+   }
+
cnt = zend_hash_num_elements(Z_ARRVAL_P(array));
if (mode == COUNT_RECURSIVE) {
HashPosition pos;
@@ -289,7 +294,9 @@

zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **) element, pos) == 
SUCCESS;
zend_hash_move_forward_ex(Z_ARRVAL_P(array), 
pos)
) {
+   Z_ARRVAL_P(array)-nApplyCount++;
cnt += php_count_recursive(*element, 
COUNT_RECURSIVE TSRMLS_CC);
+   Z_ARRVAL_P(array)-nApplyCount--;
}
}
}

-- 
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/standard array.c

2008-02-15 Thread Antony Dovgal
tony2001Fri Feb 15 09:33:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   array.c 
  Log:
  MFH: recursion protection in count()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.24r2=1.308.2.21.2.37.2.25diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.24 
php-src/ext/standard/array.c:1.308.2.21.2.37.2.25
--- php-src/ext/standard/array.c:1.308.2.21.2.37.2.24   Thu Feb 14 14:08:22 2008
+++ php-src/ext/standard/array.cFri Feb 15 09:33:09 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.37.2.24 2008/02/14 14:08:22 felipe Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.37.2.25 2008/02/15 09:33:09 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -275,6 +275,11 @@
zval **element;
 
if (Z_TYPE_P(array) == IS_ARRAY) {
+   if (Z_ARRVAL_P(array)-nApplyCount  1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, recursion 
detected);
+   return 0;
+   }
+
cnt = zend_hash_num_elements(Z_ARRVAL_P(array));
if (mode == COUNT_RECURSIVE) {
HashPosition pos;
@@ -283,7 +288,9 @@

zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **) element, pos) == 
SUCCESS;
zend_hash_move_forward_ex(Z_ARRVAL_P(array), 
pos)
) {
+   Z_ARRVAL_P(array)-nApplyCount++;
cnt += php_count_recursive(*element, 
COUNT_RECURSIVE TSRMLS_CC);
+   Z_ARRVAL_P(array)-nApplyCount--;
}
}
}

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

2008-02-15 Thread Antony Dovgal
tony2001Fri Feb 15 09:33:26 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   array.c 
  Log:
  MFH: recursion protection in count()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.52r2=1.308.2.21.2.53diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.52 
php-src/ext/standard/array.c:1.308.2.21.2.53
--- php-src/ext/standard/array.c:1.308.2.21.2.52Thu Feb 14 14:02:02 2008
+++ php-src/ext/standard/array.cFri Feb 15 09:33:26 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.52 2008/02/14 14:02:02 felipe Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.53 2008/02/15 09:33:26 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -283,6 +283,11 @@
zval **element;
 
if (Z_TYPE_P(array) == IS_ARRAY) {
+   if (Z_ARRVAL_P(array)-nApplyCount  1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, recursion 
detected);
+   return 0;
+   }
+
cnt = zend_hash_num_elements(Z_ARRVAL_P(array));
if (mode == COUNT_RECURSIVE) {
HashPosition pos;
@@ -290,7 +295,9 @@
for 
(zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(array), pos);
 
zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **) element, pos) == 
SUCCESS;
 zend_hash_move_forward_ex(Z_ARRVAL_P(array), 
pos)) {
+   Z_ARRVAL_P(array)-nApplyCount++;
cnt += php_count_recursive(*element, 
COUNT_RECURSIVE TSRMLS_CC);
+   Z_ARRVAL_P(array)-nApplyCount--;
}
}
}

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



[PHP-CVS] cvs: php-src /ext/reflection/tests bug38465.phpt bug43926.phpt /ext/soap/tests/bugs bug42151.phpt /ext/standard/tests/array bug33382.phpt bug42838.phpt bug42850.phpt /ext/standard/tests/f

2008-02-15 Thread Antony Dovgal
tony2001Fri Feb 15 09:35:48 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   bug42272.phpt 
/php-src/ext/standard/tests/filebug43248.phpt 
/php-src/ext/standard/tests/array   bug42850.phpt bug42838.phpt 
bug33382.phpt 
/php-src/ext/soap/tests/bugsbug42151.phpt 
/php-src/ext/reflection/tests   bug43926.phpt bug38465.phpt 
  Log:
  more cosmetics
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug42272.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug42272.phpt
diff -u php-src/ext/standard/tests/general_functions/bug42272.phpt:1.1 
php-src/ext/standard/tests/general_functions/bug42272.phpt:1.2
--- php-src/ext/standard/tests/general_functions/bug42272.phpt:1.1  Sun Dec 
 9 16:54:30 2007
+++ php-src/ext/standard/tests/general_functions/bug42272.phpt  Fri Feb 15 
09:35:46 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug #42272: var_export() incorrectly escapes char(0).
+Bug #42272 (var_export() incorrectly escapes char(0))
 --FILE--
 ?php
 $foo = var_export(\0, true );
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug43248.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/bug43248.phpt
diff -u php-src/ext/standard/tests/file/bug43248.phpt:1.2 
php-src/ext/standard/tests/file/bug43248.phpt:1.3
--- php-src/ext/standard/tests/file/bug43248.phpt:1.2   Tue Nov 13 09:47:19 2007
+++ php-src/ext/standard/tests/file/bug43248.phpt   Fri Feb 15 09:35:47 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug #43248 backward compatibility break in realpath() 
+Bug #43248 (backward compatibility break in realpath())
 --FILE--
 ?php
 echo realpath(dirname(__FILE__) . '/../file/');
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug42850.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/array/bug42850.phpt
diff -u php-src/ext/standard/tests/array/bug42850.phpt:1.1 
php-src/ext/standard/tests/array/bug42850.phpt:1.2
--- php-src/ext/standard/tests/array/bug42850.phpt:1.1  Mon Jan 14 22:08:00 2008
+++ php-src/ext/standard/tests/array/bug42850.phpt  Fri Feb 15 09:35:47 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug #42850 array_walk_recursive() leaves references, #34982 
array_walk_recursive() modifies elements outside function scope 
+Bug #42850 (array_walk_recursive() leaves references)
 --FILE--
 ?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug42838.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/array/bug42838.phpt
diff -u php-src/ext/standard/tests/array/bug42838.phpt:1.2 
php-src/ext/standard/tests/array/bug42838.phpt:1.3
--- php-src/ext/standard/tests/array/bug42838.phpt:1.2  Thu Feb 14 13:51:15 2008
+++ php-src/ext/standard/tests/array/bug42838.phpt  Fri Feb 15 09:35:47 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug#42838 - Wrong results in array_diff_uassoc
+Bug #42838 (Wrong results in array_diff_uassoc)
 --FILE--
 ?php
 
@@ -21,4 +21,4 @@
 --EXPECT--
 Array
 (
-)
\ No newline at end of file
+)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug33382.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/array/bug33382.phpt
diff -u php-src/ext/standard/tests/array/bug33382.phpt:1.2 
php-src/ext/standard/tests/array/bug33382.phpt:1.3
--- php-src/ext/standard/tests/array/bug33382.phpt:1.2  Tue Dec  5 23:03:42 2006
+++ php-src/ext/standard/tests/array/bug33382.phpt  Fri Feb 15 09:35:47 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug #33382 ( array_reverse() fails after *sort() )
+Bug #33382 (array_reverse() fails after *sort())
 --FILE--
 ?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug42151.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/soap/tests/bugs/bug42151.phpt
diff -u php-src/ext/soap/tests/bugs/bug42151.phpt:1.2 
php-src/ext/soap/tests/bugs/bug42151.phpt:1.3
--- php-src/ext/soap/tests/bugs/bug42151.phpt:1.2   Wed Aug  1 10:39:49 2007
+++ php-src/ext/soap/tests/bugs/bug42151.phpt   Fri Feb 15 09:35:47 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug #42151 __destruct functions not called after catching a SoapFault exception
+Bug #42151 (__destruct functions not called after catching a SoapFault 
exception)
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug43926.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/reflection/tests/bug43926.phpt
diff -u php-src/ext/reflection/tests/bug43926.phpt:1.4 
php-src/ext/reflection/tests/bug43926.phpt:1.5
--- php-src/ext/reflection/tests/bug43926.phpt:1.4  Wed Jan 30 15:23:41 2008
+++ php-src/ext/reflection/tests/bug43926.phpt  Fri Feb 15 09:35:47 2008
@@ -1,5 +1,5 @@
 --TEST--
-Bug#43926 - isInstance() isn't equivalent to instanceof operator
+Bug #43926 (isInstance() isn't equivalent to instanceof operator)
 --FILE--
 ?php
 

[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:37:38 2008 UTC

  Added files: 
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  - Add the ReflectionProperty::setAccesible() method that allows non-public
property's values to be read through ::getValue().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.292r2=1.293diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.292 
php-src/ext/reflection/php_reflection.c:1.293
--- php-src/ext/reflection/php_reflection.c:1.292   Wed Jan 30 12:50:49 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:37:37 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.292 2008/01/30 12:50:49 tony2001 Exp $ */
+/* $Id: php_reflection.c,v 1.293 2008/02/15 12:37:37 derick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -175,6 +175,7 @@
 typedef struct _property_reference {
zend_class_entry *ce;
zend_property_info prop;
+   unsigned int ignore_visibility:1;
 } property_reference;
 
 /* Struct for parameters */
@@ -1196,6 +1197,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference-ce = ce;
reference-prop = *prop;
+   reference-ignore_visibility = 0;
intern-ptr = reference;
intern-free_ptr = 1;
intern-ce = ce;
@@ -3939,6 +3941,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference-ce = ce;
reference-prop = *property_info;
+   reference-ignore_visibility = 0;
intern-ptr = reference;
intern-free_ptr = 1;
intern-ce = ce;
@@ -4078,7 +4081,7 @@
METHOD_NOTSTATIC(reflection_property_ptr);
GET_REFLECTION_OBJECT_PTR(ref);
 
-   if (!(ref-prop.flags  ZEND_ACC_PUBLIC)) {
+   if (!(ref-prop.flags  ZEND_ACC_PUBLIC)  ref-ignore_visibility == 
0) {
_default_get_entry(getThis(), name, sizeof(name), name 
TSRMLS_CC);
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 
Cannot access non-public member %v::%v, 
intern-ce-name, Z_UNIVAL(name));
@@ -4226,6 +4229,24 @@
 }
 /* }}} */
 
+/* {{{ proto public int ReflectionProperty::setAccesible() U
+   Sets whether non-public properties can be requested */
+ZEND_METHOD(reflection_property, setAccesible)
+{
+   reflection_object *intern;
+   property_reference *ref;
+   zend_bool visible;
+
+   METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 1);
+   GET_REFLECTION_OBJECT_PTR(ref);
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, b, visible) == 
FAILURE) {
+   return;
+   }
+   ref-ignore_visibility = visible;
+}
+/* }}} */
+
 /* {{{ proto public static mixed ReflectionExtension::export(string name [, 
bool return]) throws ReflectionException U
Exports a reflection object. Returns the output if TRUE is specified for 
return, printing it otherwise. */
 ZEND_METHOD(reflection_extension, export)
@@ -4837,6 +4858,11 @@
ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO()
 
+static
+ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccesible, 0)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
 static const zend_function_entry reflection_property_functions[] = {
ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_property, export, 
arginfo_reflection_property_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
@@ -4854,6 +4880,7 @@
ZEND_ME(reflection_property, getDefaultValue, NULL, 0)
ZEND_ME(reflection_property, getDeclaringClass, NULL, 0)
ZEND_ME(reflection_property, getDocComment, NULL, 0)
+   ZEND_ME(reflection_property, setAccesible, 
arginfo_reflection_property_setAccesible, 0)
{NULL, NULL, NULL}
 };
 
@@ -5032,7 +5059,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.292 
2008/01/30 12:50:49 tony2001 Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.293 
2008/02/15 12:37:37 derick Exp $);
 
php_info_print_table_end();
 } /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_setAccesible.phpt?view=markuprev=1.1
Index: php-src/ext/reflection/tests/reflectionProperty_setAccesible.phpt
+++ php-src/ext/reflection/tests/reflectionProperty_setAccesible.phpt
--TEST--
Test ReflectionProperty::setAccesible().
--SKIPIF--
?php extension_loaded('reflection') or die('skip'); ?
--FILE--
?php

class TestClass {
public $pub;
public $pub2 = 5;
static public $stat = static property;
protected $prot = 4;
private $priv = keepOut;
}


[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:38:53 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/reflection php_reflection.c 
  Log:
  - Add the ReflectionProperty::setAccesible() method that allows non-public
property's values to be read through ::getValue().
  #- [DOC]
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.111r2=1.2027.2.547.2.965.2.112diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.111 
php-src/NEWS:1.2027.2.547.2.965.2.112
--- php-src/NEWS:1.2027.2.547.2.965.2.111   Tue Feb 12 09:27:45 2008
+++ php-src/NEWSFri Feb 15 12:38:52 2008
@@ -40,6 +40,8 @@
   . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
   . Added FilesystemIterator. (Marcus)
   . Added GlobIterator. (Marcus)
+- Add the ReflectionProperty::setAccesible() method that allows non-public
+  property's values to be read through ::getValue().
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
 - Added stream_supports_lock() function. (Benjamin Schulz)
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.11r2=1.164.2.33.2.45.2.12diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.11 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.12
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.11Wed Jan 
30 14:45:20 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:38:53 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.11 2008/01/30 14:45:20 felipe Exp 
$ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.12 2008/02/15 12:38:53 derick Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -180,6 +180,7 @@
 typedef struct _property_reference {
zend_class_entry *ce;
zend_property_info prop;
+   unsigned int ignore_visibility:1;
 } property_reference;
 
 /* Struct for parameters */
@@ -1176,6 +1177,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference-ce = ce;
reference-prop = *prop;
+   reference-ignore_visibility = 0;
intern-ptr = reference;
intern-free_ptr = 1;
intern-ce = ce;
@@ -3856,6 +3858,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference-ce = ce;
reference-prop = *property_info;
+   reference-ignore_visibility = 0;
intern-ptr = reference;
intern-free_ptr = 1;
intern-ce = ce;
@@ -3963,7 +3966,7 @@
METHOD_NOTSTATIC(reflection_property_ptr);
GET_REFLECTION_OBJECT_PTR(ref);
 
-   if (!(ref-prop.flags  ZEND_ACC_PUBLIC)) {
+   if (!(ref-prop.flags  ZEND_ACC_PUBLIC)  ref-ignore_visibility == 
0) {
_default_get_entry(getThis(), name, sizeof(name), name 
TSRMLS_CC);
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 
Cannot access non-public member %s::%s, 
intern-ce-name, Z_STRVAL(name));
@@ -3981,10 +3984,13 @@
zval_copy_ctor(return_value);
INIT_PZVAL(return_value);
} else {
+   char *class_name, *prop_name;
+   
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o, 
object) == FAILURE) {
return;
}
-   member_p = zend_read_property(Z_OBJCE_P(object), object, 
ref-prop.name, ref-prop.name_length, 1 TSRMLS_CC);
+   zend_unmangle_property_name(ref-prop.name, 
ref-prop.name_length, class_name, prop_name);
+   member_p = zend_read_property(Z_OBJCE_P(object), object, 
prop_name, strlen(prop_name), 1 TSRMLS_CC);
*return_value= *member_p;
zval_copy_ctor(return_value);
INIT_PZVAL(return_value);
@@ -4113,6 +4119,24 @@
 }
 /* }}} */
 
+/* {{{ proto public int ReflectionProperty::setAccesible()
+   Sets whether non-public properties can be requested */
+ZEND_METHOD(reflection_property, setAccesible)
+{
+   reflection_object *intern;
+   property_reference *ref;
+   zend_bool visible;
+
+   METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 1);
+   GET_REFLECTION_OBJECT_PTR(ref);
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, b, visible) == 
FAILURE) {
+   return;
+   }
+   ref-ignore_visibility = visible;
+}
+/* }}} */
+
 /* {{{ proto public static mixed ReflectionExtension::export(string name [, 
bool return]) throws ReflectionException
Exports a reflection object. Returns the output if TRUE is specified for 
return, printing it otherwise. */
 

[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt reflectionProperty_setAccessible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:47:21 2008 UTC

  Added files: 
/php-src/ext/reflection/tests   reflectionProperty_setAccessible.phpt 

  Removed files:   
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  - Fixed typo
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.293r2=1.294diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.293 
php-src/ext/reflection/php_reflection.c:1.294
--- php-src/ext/reflection/php_reflection.c:1.293   Fri Feb 15 12:37:37 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:47:21 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.293 2008/02/15 12:37:37 derick Exp $ */
+/* $Id: php_reflection.c,v 1.294 2008/02/15 12:47:21 derick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -4229,9 +4229,9 @@
 }
 /* }}} */
 
-/* {{{ proto public int ReflectionProperty::setAccesible() U
+/* {{{ proto public int ReflectionProperty::setAccessible() U
Sets whether non-public properties can be requested */
-ZEND_METHOD(reflection_property, setAccesible)
+ZEND_METHOD(reflection_property, setAccessible)
 {
reflection_object *intern;
property_reference *ref;
@@ -4859,7 +4859,7 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccesible, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccessible, 0)
ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO()
 
@@ -4880,7 +4880,7 @@
ZEND_ME(reflection_property, getDefaultValue, NULL, 0)
ZEND_ME(reflection_property, getDeclaringClass, NULL, 0)
ZEND_ME(reflection_property, getDocComment, NULL, 0)
-   ZEND_ME(reflection_property, setAccesible, 
arginfo_reflection_property_setAccesible, 0)
+   ZEND_ME(reflection_property, setAccessible, 
arginfo_reflection_property_setAccessible, 0)
{NULL, NULL, NULL}
 };
 
@@ -5059,7 +5059,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.293 
2008/02/15 12:37:37 derick Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.294 
2008/02/15 12:47:21 derick Exp $);
 
php_info_print_table_end();
 } /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt?view=markuprev=1.1
Index: php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
+++ php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
--TEST--
Test ReflectionProperty::setAccessible().
--SKIPIF--
?php extension_loaded('reflection') or die('skip'); ?
--FILE--
?php

class TestClass {
public $pub;
public $pub2 = 5;
static public $stat = static property;
protected $prot = 4;
private $priv = keepOut;
}

class AnotherClass {
}

$instance = new TestClass();

echo \nProtected property:\n;
$propInfo = new ReflectionProperty('TestClass', 'prot');
try {
var_dump($propInfo-getValue($instance));
}
catch(Exception $exc) {
echo $exc-getMessage(), \n;
}

$propInfo-setAccessible(true);
var_dump($propInfo-getValue($instance));

$propInfo-setAccessible(false);
try {
var_dump($propInfo-getValue($instance));
}
catch(Exception $exc) {
echo $exc-getMessage(), \n;
}
?
--EXPECTF--

Protected property:
Cannot access non-public member TestClass::prot
int(4)
Cannot access non-public member TestClass::prot

-- 
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) / NEWS /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt reflectionProperty_setAccessible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:48:13 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/reflection/tests   reflectionProperty_setAccessible.phpt 

  Removed files:   
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/reflection php_reflection.c 
  Log:
  - Fixed speling.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.112r2=1.2027.2.547.2.965.2.113diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.112 
php-src/NEWS:1.2027.2.547.2.965.2.113
--- php-src/NEWS:1.2027.2.547.2.965.2.112   Fri Feb 15 12:38:52 2008
+++ php-src/NEWSFri Feb 15 12:48:13 2008
@@ -40,7 +40,7 @@
   . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
   . Added FilesystemIterator. (Marcus)
   . Added GlobIterator. (Marcus)
-- Add the ReflectionProperty::setAccesible() method that allows non-public
+- Add the ReflectionProperty::setAccessible() method that allows non-public
   property's values to be read through ::getValue().
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.12r2=1.164.2.33.2.45.2.13diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.12 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.13
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.12Fri Feb 
15 12:38:53 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:48:13 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.12 2008/02/15 12:38:53 derick Exp 
$ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.13 2008/02/15 12:48:13 derick Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -4119,9 +4119,9 @@
 }
 /* }}} */
 
-/* {{{ proto public int ReflectionProperty::setAccesible()
+/* {{{ proto public int ReflectionProperty::setAccessible()
Sets whether non-public properties can be requested */
-ZEND_METHOD(reflection_property, setAccesible)
+ZEND_METHOD(reflection_property, setAccessible)
 {
reflection_object *intern;
property_reference *ref;
@@ -4744,7 +4744,7 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccesible, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccessible, 0)
ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO()
 
@@ -4764,7 +4764,7 @@
ZEND_ME(reflection_property, getModifiers, NULL, 0)
ZEND_ME(reflection_property, getDeclaringClass, NULL, 0)
ZEND_ME(reflection_property, getDocComment, NULL, 0)
-   ZEND_ME(reflection_property, setAccesible, 
arginfo_reflection_property_setAccesible, 0)
+   ZEND_ME(reflection_property, setAccessible, 
arginfo_reflection_property_setAccessible, 0)
{NULL, NULL, NULL}
 };
 
@@ -4943,7 +4943,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.164.2.33.2.45.2.12 2008/02/15 12:38:53 derick Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.164.2.33.2.45.2.13 2008/02/15 12:48:13 derick Exp $);
 
php_info_print_table_end();
 } /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt?view=markuprev=1.1
Index: php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
+++ php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
--TEST--
Test ReflectionProperty::setAccessible().
--SKIPIF--
?php extension_loaded('reflection') or die('skip'); ?
--FILE--
?php

class TestClass {
public $pub;
public $pub2 = 5;
static public $stat = static property;
protected $prot = 4;
private $priv = keepOut;
}

class AnotherClass {
}

$instance = new TestClass();

echo \nProtected property:\n;
$propInfo = new ReflectionProperty('TestClass', 'prot');
try {
var_dump($propInfo-getValue($instance));
}
catch(Exception $exc) {
echo $exc-getMessage(), \n;
}

$propInfo-setAccessible(true);
var_dump($propInfo-getValue($instance));

$propInfo-setAccessible(false);
try {
var_dump($propInfo-getValue($instance));
}
catch(Exception $exc) {
echo $exc-getMessage(), \n;
}
?
--EXPECTF--

Protected property:
Cannot access non-public member TestClass::prot
int(4)
Cannot access non-public member TestClass::prot

-- 
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) /sapi/cgi cgi_main.c fastcgi.c

2008-02-15 Thread Dmitry Stogov
dmitry  Fri Feb 15 14:45:42 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/sapi/cgi   cgi_main.c fastcgi.c 
  Log:
  optimization
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.50.2.11r2=1.267.2.15.2.50.2.12diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.11 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.12
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.11Mon Dec 31 07:17:18 2007
+++ php-src/sapi/cgi/cgi_main.c Fri Feb 15 14:45:42 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.11 2007/12/31 07:17:18 sebastian Exp $ 
*/
+/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.12 2008/02/15 14:45:42 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -756,7 +756,17 @@
2. When the first call occurs and the request is not set up, 
flush fails on FastCGI.
*/
if (SG(sapi_started)) {
-   sapi_cgibin_flush(SG(server_context));
+   if (fcgi_is_fastcgi()) {
+   if (
+#ifndef PHP_WIN32
+   !parent 
+#endif
+   
!fcgi_finish_request((fcgi_request*)SG(server_context))) {
+   php_handle_aborted_connection();
+   }
+   } else {
+   sapi_cgibin_flush(SG(server_context));
+   }
}
return SUCCESS;
 }
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.28.2.1r2=1.4.2.13.2.28.2.2diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.28.2.1 
php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.28.2.2
--- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.28.2.1Mon Dec 31 07:17:18 2007
+++ php-src/sapi/cgi/fastcgi.c  Fri Feb 15 14:45:42 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.4.2.13.2.28.2.1 2007/12/31 07:17:18 sebastian Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.28.2.2 2008/02/15 14:45:42 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -632,7 +632,7 @@
}
memcpy(tmp, p, name_len);
tmp[name_len] = 0;
-   s = zend_strndup((char*)p + name_len, val_len);
+   s = estrndup((char*)p + name_len, val_len);
zend_hash_update(req-env, tmp, name_len+1, s, sizeof(char*), 
NULL);
p += name_len + val_len;
}
@@ -644,7 +644,7 @@
 
 static void fcgi_free_var(char **s)
 {
-   free(*s);
+   efree(*s);
 }
 
 static int fcgi_read_request(fcgi_request *req)
@@ -657,7 +657,7 @@
req-in_len = 0;
req-out_hdr = NULL;
req-out_pos = req-out_buf;
-   zend_hash_init(req-env, 0, NULL, (void (*)(void *)) fcgi_free_var, 1);
+   zend_hash_init(req-env, 0, NULL, (void (*)(void *)) fcgi_free_var, 0);
 
if (safe_read(req, hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) ||
hdr.version  FCGI_VERSION_1) {
@@ -693,15 +693,15 @@
req-keep = (((fcgi_begin_request*)buf)-flags  
FCGI_KEEP_CONN);
switch fcgi_begin_request*)buf)-roleB1  8) + 
((fcgi_begin_request*)buf)-roleB0) {
case FCGI_RESPONDER:
-   val = strdup(RESPONDER);
+   val = estrdup(RESPONDER);
zend_hash_update(req-env, FCGI_ROLE, 
sizeof(FCGI_ROLE), val, sizeof(char*), NULL);
break;
case FCGI_AUTHORIZER:
-   val = strdup(AUTHORIZER);
+   val = estrdup(AUTHORIZER);
zend_hash_update(req-env, FCGI_ROLE, 
sizeof(FCGI_ROLE), val, sizeof(char*), NULL);
break;
case FCGI_FILTER:
-   val = strdup(FILTER);
+   val = estrdup(FILTER);
zend_hash_update(req-env, FCGI_ROLE, 
sizeof(FCGI_ROLE), val, sizeof(char*), NULL);
break;
default:
@@ -1168,11 +1168,13 @@
 
 int fcgi_finish_request(fcgi_request *req)
 {
+   int ret = 1;
+
if (req-fd = 0) {
-   fcgi_flush(req, 1);
+   ret = fcgi_flush(req, 1);
fcgi_close(req, 0, 1);
}
-   return 1;
+   return ret;
 }
 
 char* fcgi_getenv(fcgi_request *req, const char* var, int var_len)
@@ -1195,7 +1197,7 @@
} else {
char **ret;
 
-   val = strdup(val);
+   val = estrdup(val);
if (zend_hash_update(req-env, var, var_len+1, val, 
sizeof(char*), (void**)ret) == SUCCESS) {

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /main main.c

2008-02-15 Thread Pierre-Alain Joye
pajoye  Fri Feb 15 14:51:39 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/main   main.c 
  Log:
  - [DOC] add PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.113r2=1.2027.2.547.2.965.2.114diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.113 
php-src/NEWS:1.2027.2.547.2.965.2.114
--- php-src/NEWS:1.2027.2.547.2.965.2.113   Fri Feb 15 12:48:13 2008
+++ php-src/NEWSFri Feb 15 14:51:39 2008
@@ -11,6 +11,8 @@
 (Etienne Kneuss)
   . Improved checks for callbacks. (Marcus)
   . Added __DIR__ constant. (Lars Strojny)
+  . Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
+PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants (Pierre)
 
 - Added new date/time functionality: (Derick)
   . date_parse_from_format(): Parse date/time strings according to a format.
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.8r2=1.640.2.23.2.57.2.9diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.8 
php-src/main/main.c:1.640.2.23.2.57.2.9
--- php-src/main/main.c:1.640.2.23.2.57.2.8 Mon Feb  4 20:39:21 2008
+++ php-src/main/main.c Fri Feb 15 14:51:39 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.8 2008/02/04 20:39:21 jani Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.9 2008/02/15 14:51:39 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1743,6 +1743,17 @@
 
/* Register constants */
REGISTER_MAIN_STRINGL_CONSTANT(PHP_VERSION, PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MAJOR_VERSION, PHP_MAJOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MINOR_VERSION, PHP_MINOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_RELEASE_VERSION, PHP_RELEASE_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTRA_VERSION, PHP_EXTRA_VERSION, 
sizeof(PHP_EXTRA_VERSION) - 1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_VERSION_ID, PHP_VERSION_ID, 
CONST_PERSISTENT | CONST_CS);
+#ifdef ZTS
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 1, CONST_PERSISTENT | CONST_CS);
+#else
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 0, CONST_PERSISTENT | CONST_CS);
+#endif
+   REGISTER_MAIN_LONG_CONSTANT(PHP_DEBUG, PHP_DEBUG, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_OS, php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_SAPI, sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(DEFAULT_INCLUDE_PATH, 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);

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



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

2008-02-15 Thread Dmitry Stogov
dmitry  Fri Feb 15 14:51:53 2008 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c fastcgi.c 
  Log:
  optimization
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.348r2=1.349diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.348 php-src/sapi/cgi/cgi_main.c:1.349
--- php-src/sapi/cgi/cgi_main.c:1.348   Mon Dec 31 07:12:19 2007
+++ php-src/sapi/cgi/cgi_main.c Fri Feb 15 14:51:52 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.348 2007/12/31 07:12:19 sebastian Exp $ */
+/* $Id: cgi_main.c,v 1.349 2008/02/15 14:51:52 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -754,7 +754,17 @@
2. When the first call occurs and the request is not set up, 
flush fails on FastCGI.
*/
if (SG(sapi_started)) {
-   sapi_cgibin_flush(SG(server_context));
+   if (fcgi_is_fastcgi()) {
+   if (
+#ifndef PHP_WIN32
+   !parent 
+#endif
+   
!fcgi_finish_request((fcgi_request*)SG(server_context))) {
+   php_handle_aborted_connection();
+   }
+   } else {
+   sapi_cgibin_flush(SG(server_context));
+   }
}
return SUCCESS;
 }
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.43r2=1.44diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.43 php-src/sapi/cgi/fastcgi.c:1.44
--- php-src/sapi/cgi/fastcgi.c:1.43 Mon Dec 31 07:12:19 2007
+++ php-src/sapi/cgi/fastcgi.c  Fri Feb 15 14:51:52 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.43 2007/12/31 07:12:19 sebastian Exp $ */
+/* $Id: fastcgi.c,v 1.44 2008/02/15 14:51:52 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -632,7 +632,7 @@
}
memcpy(tmp, p, name_len);
tmp[name_len] = 0;
-   s = zend_strndup((char*)p + name_len, val_len);
+   s = estrndup((char*)p + name_len, val_len);
zend_hash_update(req-env, tmp, name_len+1, s, sizeof(char*), 
NULL);
p += name_len + val_len;
}
@@ -644,7 +644,7 @@
 
 static void fcgi_free_var(char **s)
 {
-   free(*s);
+   efree(*s);
 }
 
 static int fcgi_read_request(fcgi_request *req)
@@ -657,7 +657,7 @@
req-in_len = 0;
req-out_hdr = NULL;
req-out_pos = req-out_buf;
-   zend_hash_init(req-env, 0, NULL, (void (*)(void *)) fcgi_free_var, 1);
+   zend_hash_init(req-env, 0, NULL, (void (*)(void *)) fcgi_free_var, 0);
 
if (safe_read(req, hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) ||
hdr.version  FCGI_VERSION_1) {
@@ -693,15 +693,15 @@
req-keep = (((fcgi_begin_request*)buf)-flags  
FCGI_KEEP_CONN);
switch fcgi_begin_request*)buf)-roleB1  8) + 
((fcgi_begin_request*)buf)-roleB0) {
case FCGI_RESPONDER:
-   val = strdup(RESPONDER);
+   val = estrdup(RESPONDER);
zend_hash_update(req-env, FCGI_ROLE, 
sizeof(FCGI_ROLE), val, sizeof(char*), NULL);
break;
case FCGI_AUTHORIZER:
-   val = strdup(AUTHORIZER);
+   val = estrdup(AUTHORIZER);
zend_hash_update(req-env, FCGI_ROLE, 
sizeof(FCGI_ROLE), val, sizeof(char*), NULL);
break;
case FCGI_FILTER:
-   val = strdup(FILTER);
+   val = estrdup(FILTER);
zend_hash_update(req-env, FCGI_ROLE, 
sizeof(FCGI_ROLE), val, sizeof(char*), NULL);
break;
default:
@@ -1168,11 +1168,13 @@
 
 int fcgi_finish_request(fcgi_request *req)
 {
+   int ret = 1;
+
if (req-fd = 0) {
-   fcgi_flush(req, 1);
+   ret = fcgi_flush(req, 1);
fcgi_close(req, 0, 1);
}
-   return 1;
+   return ret;
 }
 
 char* fcgi_getenv(fcgi_request *req, const char* var, int var_len)
@@ -1195,7 +1197,7 @@
} else {
char **ret;
 
-   val = strdup(val);
+   val = estrdup(val);
if (zend_hash_update(req-env, var, var_len+1, val, 
sizeof(char*), (void**)ret) == SUCCESS) {
return *ret;
}

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



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

2008-02-15 Thread Pierre-Alain Joye
pajoye  Fri Feb 15 15:09:57 2008 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  - [DOC] MFB: add PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.757r2=1.758diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.757 php-src/main/main.c:1.758
--- php-src/main/main.c:1.757   Mon Feb  4 20:38:42 2008
+++ php-src/main/main.c Fri Feb 15 15:09:56 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.757 2008/02/04 20:38:42 jani Exp $ */
+/* $Id: main.c,v 1.758 2008/02/15 15:09:56 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1743,6 +1743,17 @@
 /* {{{ php_module_startup
  */
 int php_module_startup(sapi_module_struct *sf, zend_module_entry 
*additional_modules, uint num_additional_modules)
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MAJOR_VERSION, PHP_MAJOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MINOR_VERSION, PHP_MINOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_RELEASE_VERSION, PHP_RELEASE_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTRA_VERSION, PHP_EXTRA_VERSION, 
sizeof(PHP_EXTRA_VERSION) - 1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_VERSION_ID, PHP_VERSION_ID, 
CONST_PERSISTENT | CONST_CS);
+#ifdef ZTS
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 1, CONST_PERSISTENT | CONST_CS);
+#else
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 0, CONST_PERSISTENT | CONST_CS);
+#endif
+   REGISTER_MAIN_LONG_CONSTANT(PHP_DEBUG, PHP_DEBUG, CONST_PERSISTENT | 
CONST_CS);
 {
zend_utility_functions zuf;
zend_utility_values zuv;

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



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

2008-02-15 Thread Felipe Pena
felipe  Fri Feb 15 16:55:12 2008 UTC

  Modified files:  
/php-src/ext/pcre/tests bug42298.phpt 
/php-src/ext/standard/tests/array   count_variation3.phpt 
  Log:
  Fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug42298.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/pcre/tests/bug42298.phpt
diff -u php-src/ext/pcre/tests/bug42298.phpt:1.2 
php-src/ext/pcre/tests/bug42298.phpt:1.3
--- php-src/ext/pcre/tests/bug42298.phpt:1.2Sat Sep  1 18:01:44 2007
+++ php-src/ext/pcre/tests/bug42298.phptFri Feb 15 16:55:11 2008
@@ -44,3 +44,36 @@
 string(4) € 
   }
 }
+--UEXPECT--
+array(1) {
+  [0]=
+  array(2) {
+[0]=
+unicode(3) A£
+[1]=
+unicode(2) BC
+  }
+}
+array(1) {
+  [0]=
+  array(2) {
+[0]=
+unicode(3) A£
+[1]=
+unicode(2) BC
+  }
+}
+array(1) {
+  [0]=
+  array(1) {
+[0]=
+unicode(4) € 
+  }
+}
+array(1) {
+  [0]=
+  array(1) {
+[0]=
+unicode(4) € 
+  }
+}
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/count_variation3.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/array/count_variation3.phpt
diff -u php-src/ext/standard/tests/array/count_variation3.phpt:1.1 
php-src/ext/standard/tests/array/count_variation3.phpt:1.2
--- php-src/ext/standard/tests/array/count_variation3.phpt:1.1  Thu Feb 14 
16:48:27 2008
+++ php-src/ext/standard/tests/array/count_variation3.phpt  Fri Feb 15 
16:55:11 2008
@@ -33,10 +33,18 @@
 int(4)
 
 -- $mode = 1: --
+
+Warning: count(): recursion detected in %s on line %d
+int(12)
+Done
 --UEXPECTF--
 *** Testing count() : usage variations ***
 
 -- $mode not set: --
 int(4)
 
--- $mode = 1: --
\ No newline at end of file
+-- $mode = 1: --
+
+Warning: count(): recursion detected in %s on line %d
+int(12)
+Done

-- 
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/oci8 oci8_collection.c /ext/oci8/tests bug44113.phpt

2008-02-15 Thread Christopher Jones
sixdFri Feb 15 23:05:19 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/oci8/tests bug44113.phpt 

  Modified files:  
/php-src/ext/oci8   oci8_collection.c 
  Log:
  Bug #44113 (New collection creation can fail with OCI-22303)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_collection.c?r1=1.5.2.3.2.8r2=1.5.2.3.2.9diff_format=u
Index: php-src/ext/oci8/oci8_collection.c
diff -u php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.8 
php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.9
--- php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.8  Mon Dec 31 07:20:09 2007
+++ php-src/ext/oci8/oci8_collection.c  Fri Feb 15 23:05:19 2008
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: oci8_collection.c,v 1.5.2.3.2.8 2007/12/31 07:20:09 sebastian Exp $ */
+/* $Id: oci8_collection.c,v 1.5.2.3.2.9 2008/02/15 23:05:19 sixd Exp $ */
 
 
 
@@ -44,9 +44,9 @@
 
 /* {{{ php_oci_collection_create() 
  Create and return connection handle */
-php_oci_collection * php_oci_collection_create(php_oci_connection* connection, 
char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
+php_oci_collection * php_oci_collection_create(php_oci_connection *connection, 
char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
 {  
-   dvoid *dschp1;
+   dvoid *dschp1 = NULL;
dvoid *parmp1;
dvoid *parmp2;
php_oci_collection *collection;
@@ -219,11 +219,17 @@
goto CLEANUP;
}
 
+   /* free the describe handle (Bug #44113) */
+   PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, OCI_HTYPE_DESCRIBE));
PHP_OCI_REGISTER_RESOURCE(collection, le_collection);
return collection;

 CLEANUP:
 
+   if (dschp1) {
+   /* free the describe handle (Bug #44113) */
+   PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, 
OCI_HTYPE_DESCRIBE));
+   }
php_oci_error(connection-err, connection-errcode TSRMLS_CC);
php_oci_collection_close(collection TSRMLS_CC); 
return NULL;

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

-- 
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/oci8 oci8_collection.c /ext/oci8/tests bug44113.phpt

2008-02-15 Thread Christopher Jones
sixdFri Feb 15 23:24:45 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/oci8/tests bug44113.phpt 

  Modified files:  
/php-src/ext/oci8   oci8_collection.c 
  Log:
  MHB: Bug #44113 (New collection creation can fail with OCI-22303)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_collection.c?r1=1.5.2.3.2.7.2.1r2=1.5.2.3.2.7.2.2diff_format=u
Index: php-src/ext/oci8/oci8_collection.c
diff -u php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.7.2.1 
php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.7.2.2
--- php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.7.2.1  Mon Dec 31 07:17:11 2007
+++ php-src/ext/oci8/oci8_collection.c  Fri Feb 15 23:24:45 2008
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: oci8_collection.c,v 1.5.2.3.2.7.2.1 2007/12/31 07:17:11 sebastian Exp 
$ */
+/* $Id: oci8_collection.c,v 1.5.2.3.2.7.2.2 2008/02/15 23:24:45 sixd Exp $ */
 
 
 
@@ -44,9 +44,9 @@
 
 /* {{{ php_oci_collection_create() 
  Create and return connection handle */
-php_oci_collection * php_oci_collection_create(php_oci_connection* connection, 
char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
+php_oci_collection * php_oci_collection_create(php_oci_connection *connection, 
char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
 {  
-   dvoid *dschp1;
+   dvoid *dschp1 = NULL;
dvoid *parmp1;
dvoid *parmp2;
php_oci_collection *collection;
@@ -219,11 +219,17 @@
goto CLEANUP;
}
 
+   /* free the describe handle (Bug #44113) */
+   PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, OCI_HTYPE_DESCRIBE));
PHP_OCI_REGISTER_RESOURCE(collection, le_collection);
return collection;

 CLEANUP:
 
+   if (dschp1) {
+   /* free the describe handle (Bug #44113) */
+   PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, 
OCI_HTYPE_DESCRIBE));
+   }
php_oci_error(connection-err, connection-errcode TSRMLS_CC);
php_oci_collection_close(collection TSRMLS_CC); 
return NULL;

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

-- 
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_collection.c /ext/oci8/tests bug44113.phpt

2008-02-15 Thread Christopher Jones
sixdFri Feb 15 23:49:21 2008 UTC

  Modified files:  
/php-src/ext/oci8   oci8_collection.c 
/php-src/ext/oci8/tests bug44113.phpt 
  Log:
  MHB: Bug #44113 (New collection creation can fail with OCI-22303)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_collection.c?r1=1.16r2=1.17diff_format=u
Index: php-src/ext/oci8/oci8_collection.c
diff -u php-src/ext/oci8/oci8_collection.c:1.16 
php-src/ext/oci8/oci8_collection.c:1.17
--- php-src/ext/oci8/oci8_collection.c:1.16 Mon Dec 31 07:12:12 2007
+++ php-src/ext/oci8/oci8_collection.c  Fri Feb 15 23:49:21 2008
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: oci8_collection.c,v 1.16 2007/12/31 07:12:12 sebastian Exp $ */
+/* $Id: oci8_collection.c,v 1.17 2008/02/15 23:49:21 sixd Exp $ */
 
 
 
@@ -44,9 +44,9 @@
 
 /* {{{ php_oci_collection_create() 
  Create and return connection handle */
-php_oci_collection * php_oci_collection_create(php_oci_connection* connection, 
zstr tdo, int tdo_len, zstr schema, int schema_len TSRMLS_DC)
+php_oci_collection * php_oci_collection_create(php_oci_connection *connection, 
zstr tdo, int tdo_len, zstr schema, int schema_len TSRMLS_DC)
 {  
-   dvoid *dschp1;
+   dvoid *dschp1 = NULL;
dvoid *parmp1;
dvoid *parmp2;
php_oci_collection *collection;
@@ -219,11 +219,17 @@
goto CLEANUP;
}
 
+   /* free the describe handle (Bug #44113) */
+   PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, OCI_HTYPE_DESCRIBE));
PHP_OCI_REGISTER_RESOURCE(collection, le_collection);
return collection;

 CLEANUP:
 
+   if (dschp1) {
+   /* free the describe handle (Bug #44113) */
+   PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, 
OCI_HTYPE_DESCRIBE));
+   }
php_oci_error(connection-err, connection-errcode TSRMLS_CC);
php_oci_collection_close(collection TSRMLS_CC); 
return NULL;
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/bug44113.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/oci8/tests/bug44113.phpt
diff -u /dev/null php-src/ext/oci8/tests/bug44113.phpt:1.2
--- /dev/null   Fri Feb 15 23:49:21 2008
+++ php-src/ext/oci8/tests/bug44113.phptFri Feb 15 23:49:21 2008
@@ -0,0 +1,53 @@
+--TEST--
+Bug #44113 (New collection creation can fail with OCI-22303)
+--SKIPIF--
+?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ?
+--FILE--
+?php
+
+require dirname(__FILE__).'/connect.inc';
+
+// Initialization
+
+$stmtarray = array(
+   create or replace type bug44113_list_t as table of number
+);
+
+foreach ($stmtarray as $stmt) {
+   $s = oci_parse($c, $stmt);
+   @oci_execute($s);
+}
+
+// Run Test
+// The test can take some time to complete and can exceed PHP's test
+// timout limit on slow networks.
+
+for ($x = 0; $x  7; $x++)
+{
+   if (!($var = oci_new_collection($c, 'BUG44113_LIST_T'))) {
+   print Failed new collection creation on $x\n;
+   break;
+   }
+}
+
+print Completed $x\n;
+
+// Cleanup
+
+$stmtarray = array(
+   drop type bug44113_list_t
+);
+
+foreach ($stmtarray as $stmt) {
+   $s = oci_parse($c, $stmt);
+   oci_execute($s);
+}
+
+oci_close($c);
+
+echo Done\n;
+
+?
+--EXPECT--
+Completed 7
+Done

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



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

2008-02-15 Thread Felipe Pena
felipe  Sat Feb 16 02:28:11 2008 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  Fix build
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.758r2=1.759diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.758 php-src/main/main.c:1.759
--- php-src/main/main.c:1.758   Fri Feb 15 15:09:56 2008
+++ php-src/main/main.c Sat Feb 16 02:28:11 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.758 2008/02/15 15:09:56 pajoye Exp $ */
+/* $Id: main.c,v 1.759 2008/02/16 02:28:11 felipe Exp $ */
 
 /* {{{ includes
  */
@@ -1743,17 +1743,6 @@
 /* {{{ php_module_startup
  */
 int php_module_startup(sapi_module_struct *sf, zend_module_entry 
*additional_modules, uint num_additional_modules)
-   REGISTER_MAIN_LONG_CONSTANT(PHP_MAJOR_VERSION, PHP_MAJOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_LONG_CONSTANT(PHP_MINOR_VERSION, PHP_MINOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_LONG_CONSTANT(PHP_RELEASE_VERSION, PHP_RELEASE_VERSION, 
CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTRA_VERSION, PHP_EXTRA_VERSION, 
sizeof(PHP_EXTRA_VERSION) - 1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_LONG_CONSTANT(PHP_VERSION_ID, PHP_VERSION_ID, 
CONST_PERSISTENT | CONST_CS);
-#ifdef ZTS
-   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 1, CONST_PERSISTENT | CONST_CS);
-#else
-   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 0, CONST_PERSISTENT | CONST_CS);
-#endif
-   REGISTER_MAIN_LONG_CONSTANT(PHP_DEBUG, PHP_DEBUG, CONST_PERSISTENT | 
CONST_CS);
 {
zend_utility_functions zuf;
zend_utility_values zuv;
@@ -1874,6 +1863,17 @@
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, index 
pointer, 0);
 
/* Register constants */
+#ifdef ZTS
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 1, CONST_PERSISTENT | CONST_CS);
+#else
+   REGISTER_MAIN_LONG_CONSTANT(PHP_ZTS, 0, CONST_PERSISTENT | CONST_CS);
+#endif
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MAJOR_VERSION, PHP_MAJOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MINOR_VERSION, PHP_MINOR_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_RELEASE_VERSION, PHP_RELEASE_VERSION, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTRA_VERSION, PHP_EXTRA_VERSION, 
sizeof(PHP_EXTRA_VERSION) - 1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_VERSION_ID, PHP_VERSION_ID, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_DEBUG, PHP_DEBUG, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_VERSION, PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_OS, php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_SAPI, sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);

-- 
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/oci8/tests lob_042.phpt

2008-02-15 Thread Christopher Jones
sixdSat Feb 16 03:01:16 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/oci8/tests lob_042.phpt 
  Log:
  Test existing LOB error messages
  
  

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

-- 
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/oci8/tests lob_042.phpt

2008-02-15 Thread Christopher Jones
sixdSat Feb 16 03:01:53 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/oci8/tests lob_042.phpt 
  Log:
  MFB: Test existing LOB error messages
  
  

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

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



[PHP-CVS] cvs: php-src /ext/oci8/tests lob_042.phpt

2008-02-15 Thread Christopher Jones
sixdSat Feb 16 03:02:25 2008 UTC

  Modified files:  
/php-src/ext/oci8/tests lob_042.phpt 
  Log:
  MFB: Test existing LOB error messages
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/lob_042.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/oci8/tests/lob_042.phpt
diff -u /dev/null php-src/ext/oci8/tests/lob_042.phpt:1.2
--- /dev/null   Sat Feb 16 03:02:25 2008
+++ php-src/ext/oci8/tests/lob_042.phpt Sat Feb 16 03:02:24 2008
@@ -0,0 +1,98 @@
+--TEST--
+Check various LOB error messages
+--SKIPIF--
+?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ?
+--FILE--
+?php
+
+// test some LOB error messages
+   
+require(dirname(__FILE__).'/connect.inc');
+require(dirname(__FILE__).'/create_table.inc');
+
+$ora_sql = INSERT INTO
+   .$schema.$table_name. (blob)
+  VALUES (empty_blob())
+  RETURNING
+   blob
+  INTO :v_blob ;
+
+$statement = oci_parse($c,$ora_sql);
+$blob = oci_new_descriptor($c,OCI_D_LOB);
+oci_bind_by_name($statement,:v_blob, $blob,-1,OCI_B_BLOB);
+oci_execute($statement, OCI_DEFAULT);
+
+var_dump($blob);
+
+var_dump($blob-writeTemporary(test, OCI_D_LOB));
+
+$str = string;
+var_dump($blob-write($str));
+var_dump($blob-truncate(1));
+var_dump($blob-truncate(1));
+var_dump($blob-truncate(2));
+var_dump($blob-truncate(-1));
+var_dump($blob-read(2));
+
+var_dump($blob-import(does_not_exist));
+var_dump($blob-saveFile(does_not_exist));
+
+require(dirname(__FILE__).'/drop_table.inc');
+
+echo Done\n;
+
+?
+--UEXPECTF--
+object(OCI-Lob)#%d (1) {
+  [udescriptor]=
+  resource(%d) of type (oci8 descriptor)
+}
+
+Warning: OCI-Lob::writetemporary(): Invalid temporary lob type: %d in %s on 
line %d
+bool(false)
+int(12)
+bool(true)
+bool(true)
+
+Warning: OCI-Lob::truncate(): Size must be less than or equal to the current 
LOB size in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::truncate(): Length must be greater than or equal to zero in 
%s on line %d
+bool(false)
+
+Warning: OCI-Lob::read(): Offset must be less than size of the LOB in %s on 
line %d
+bool(false)
+
+Warning: OCI-Lob::import(): Can't open file %s in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::savefile(): Can't open file %s in %s on line %d
+bool(false)
+Done
+--EXPECTF--
+object(OCI-Lob)#%d (1) {
+  [descriptor]=
+  resource(%d) of type (oci8 descriptor)
+}
+
+Warning: OCI-Lob::writetemporary(): Invalid temporary lob type: %d in %s on 
line %d
+bool(false)
+int(6)
+bool(true)
+bool(true)
+
+Warning: OCI-Lob::truncate(): Size must be less than or equal to the current 
LOB size in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::truncate(): Length must be greater than or equal to zero in 
%s on line %d
+bool(false)
+
+Warning: OCI-Lob::read(): Offset must be less than size of the LOB in %s on 
line %d
+bool(false)
+
+Warning: OCI-Lob::import(): Can't open file %s in %s on line %d
+bool(false)
+
+Warning: OCI-Lob::savefile(): Can't open file %s in %s on line %d
+bool(false)
+Done

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



[PHP-CVS] cvs: CVSROOT / avail

2008-02-15 Thread Philip Olson
philip  Sat Feb 16 05:10:35 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  php-src karma for philip (bad idea?!)
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1356r2=1.1357diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1356 CVSROOT/avail:1.1357
--- CVSROOT/avail:1.1356Mon Feb  4 14:24:42 2008
+++ CVSROOT/avail   Sat Feb 16 05:10:35 2008
@@ -17,7 +17,7 @@
 # The PHP Developers have full access to the full source trees for
 # PHP, as well as the documentation.
 
-avail|dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjor!
 
i,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
+avail|dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjor!
 
i,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
 
 # Some people have access to tests in the Engine
 avail|magnus,michael,zoe,robinf,jmessa,felipe|Zend/tests,ZendEngine2/tests

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