[PHP-CVS] cvs: php-src /ext/standard/tests/strings join_variation1.phpt

2007-11-09 Thread Raghubansh Kumar
kraghubaFri Nov  9 08:49:29 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings join_variation1.phpt 
  Log:
  fix test : better float values
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/join_variation1.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/join_variation1.phpt
diff -u php-src/ext/standard/tests/strings/join_variation1.phpt:1.2 
php-src/ext/standard/tests/strings/join_variation1.phpt:1.3
--- php-src/ext/standard/tests/strings/join_variation1.phpt:1.2 Tue Oct  9 
11:51:48 2007
+++ php-src/ext/standard/tests/strings/join_variation1.phpt Fri Nov  9 
08:49:28 2007
@@ -1,171 +1,171 @@
---TEST--
-Test join() function : usage variations - unexpected values for 'glue' argument
---FILE--
-?php
-/* Prototype  : string join( string $glue, array $pieces )
- * Description: Join array elements with a string
- * Source code: ext/standard/string.c
- * Alias of function: implode()
-*/
-
-/*
- * testing join() by passing different unexpected values for glue argument
-*/
-
-echo *** Testing join() : usage variations ***\n;
-// initialize all required variables
-$pieces = array(element1, element2);
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// get a resource variable
-$fp = fopen(__FILE__, r);
-
-// define a class
-class test
-{
-   var $t = 10;
-   function __toString() {
- return  testObject;
-   }
-}
-
-// array with different values
-$values =  array (
-
-  // integer values
-  0,
-  1,
-  12345,
-  -2345,
-
-  // float values
-  10.5,
-  -10.5,
-  10.5e10,
-  10.6E-10,
-  .5,
-
-  // array values
-  array(),
-  array(0),
-  array(1),
-  array(1, 2),
-  array('color' = 'red', 'item' = 'pen'),
-
-  // boolean values
-  true,
-  false,
-  TRUE,
-  FALSE,
-
-  // objects
-  new test(),
-
-  // empty string
-  ,
-  '',
-
-  // null vlaues
-  NULL,
-  null,
-  
-  // resource variable
-  $fp,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$unset_var
-);
-
-
-// loop through each element of the array and check the working of join()
-// when $glue arugment is supplied with different values
-echo \n--- Testing join() by supplying different values for 'glue' argument 
---\n;
-$counter = 1;
-for($index = 0; $index  count($values); $index ++) {
-  echo -- Iteration $counter --\n;
-  $glue = $values [$index];
-
-  var_dump( join($glue, $pieces) );
-
-  $counter ++;
-}
-
-echo Done\n;
-?
---EXPECTF--
-*** Testing join() : usage variations ***
-
 Testing join() by supplying different values for 'glue' argument ---
--- Iteration 1 --
-string(17) element10element2
--- Iteration 2 --
-string(17) element11element2
--- Iteration 3 --
-string(21) element112345element2
--- Iteration 4 --
-string(21) element1-2345element2
--- Iteration 5 --
-string(20) element110.5element2
--- Iteration 6 --
-string(21) element1-10.5element2
--- Iteration 7 --
-string(28) element11050element2
--- Iteration 8 --
-string(23) element11.06E-9element2
--- Iteration 9 --
-string(19) element10.5element2
--- Iteration 10 --
-
-Notice: Array to string conversion in %s on line %d
-string(0) 
--- Iteration 11 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) 0
--- Iteration 12 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) 1
--- Iteration 13 --
-
-Notice: Array to string conversion in %s on line %d
-string(7) 1Array2
--- Iteration 14 --
-
-Notice: Array to string conversion in %s on line %d
-string(11) redArraypen
--- Iteration 15 --
-string(17) element11element2
--- Iteration 16 --
-string(16) element1element2
--- Iteration 17 --
-string(17) element11element2
--- Iteration 18 --
-string(16) element1element2
--- Iteration 19 --
-string(26) element1testObjectelement2
--- Iteration 20 --
-string(16) element1element2
--- Iteration 21 --
-string(16) element1element2
--- Iteration 22 --
-string(16) element1element2
--- Iteration 23 --
-string(16) element1element2
--- Iteration 24 --
-string(%d) element1Resource id #%delement2
--- Iteration 25 --
-string(16) element1element2
--- Iteration 26 --
-string(16) element1element2
-Done
---UEXPECTF--
+--TEST--
+Test join() function : usage variations - unexpected values for 'glue' argument
+--FILE--
+?php
+/* Prototype  : string join( string $glue, array $pieces )
+ * Description: Join array elements with a string
+ * Source code: ext/standard/string.c
+ * Alias of function: implode()
+*/
+
+/*
+ * testing join() by passing different unexpected value for glue argument
+*/
+
+echo *** Testing join() : usage variations ***\n;
+// initialize all required variables
+$pieces = array(element1, element2);
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, r);
+
+// define a class
+class test
+{
+   var $t = 10;
+   function __toString() {
+ return  testObject;
+   }
+}
+
+// array with different values
+$values =  array (
+
+  // integer 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings join_variation1.phpt

2007-11-09 Thread Raghubansh Kumar
kraghubaFri Nov  9 08:52:28 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings join_variation1.phpt 
  Log:
  fix test : better float values
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/join_variation1.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u
Index: php-src/ext/standard/tests/strings/join_variation1.phpt
diff -u php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.4.3 
php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.4.4
--- php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.4.3 Tue Oct 
 9 11:04:17 2007
+++ php-src/ext/standard/tests/strings/join_variation1.phpt Fri Nov  9 
08:52:27 2007
@@ -1,167 +1,167 @@
---TEST--
-Test join() function : usage variations - unexpected values for 'glue' argument
---FILE--
-?php
-/* Prototype  : string join( string $glue, array $pieces )
- * Description: Join array elements with a string
- * Source code: ext/standard/string.c
- * Alias of function: implode()
-*/
-
-/*
- * testing join() by passing different unexpected value for glue argument
-*/
-
-echo *** Testing join() : usage variations ***\n;
-// initialize all required variables
-$pieces = array(element1, element2);
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// get a resource variable
-$fp = fopen(__FILE__, r);
-
-// define a class
-class test
-{
-   var $t = 10;
-   function __toString() {
- return  testObject;
-   }
-}
-
-// array with different values
-$values =  array (
-
-  // integer values
-  0,
-  1,
-  12345,
-  -2345,
-
-  // float values
-  10.5,
-  -10.5,
-  10.5e10,
-  10.6E-10,
-  .5,
-
-  // array values
-  array(),
-  array(0),
-  array(1),
-  array(1, 2),
-  array('color' = 'red', 'item' = 'pen'),
-
-  // boolean values
-  true,
-  false,
-  TRUE,
-  FALSE,
-
-  // objects
-  new test(),
-
-  // empty string
-  ,
-  '',
-
-  // null vlaues
-  NULL,
-  null,
-  
-  // resource variable
-  $fp,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$unset_var
-);
-
-
-// loop through each element of the array and check the working of join()
-// when $glue arugment is supplied with different values
-echo \n--- Testing join() by supplying different values for 'glue' argument 
---\n;
-$counter = 1;
-for($index = 0; $index  count($values); $index ++) {
-  echo -- Iteration $counter --\n;
-  $glue = $values [$index];
-
-  var_dump( join($glue, $pieces) );
-
-  $counter ++;
-}
-
-echo Done\n;
-?
---EXPECTF--
-*** Testing join() : usage variations ***
-
 Testing join() by supplying different values for 'glue' argument ---
--- Iteration 1 --
-string(17) element10element2
--- Iteration 2 --
-string(17) element11element2
--- Iteration 3 --
-string(21) element112345element2
--- Iteration 4 --
-string(21) element1-2345element2
--- Iteration 5 --
-string(20) element110.5element2
--- Iteration 6 --
-string(21) element1-10.5element2
--- Iteration 7 --
-string(28) element11050element2
--- Iteration 8 --
-string(23) element11.06E-9element2
--- Iteration 9 --
-string(19) element10.5element2
--- Iteration 10 --
-
-Notice: Array to string conversion in %s on line %d
-string(0) 
--- Iteration 11 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) 0
--- Iteration 12 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) 1
--- Iteration 13 --
-
-Notice: Array to string conversion in %s on line %d
-string(7) 1Array2
--- Iteration 14 --
-
-Notice: Array to string conversion in %s on line %d
-string(11) redArraypen
--- Iteration 15 --
-string(17) element11element2
--- Iteration 16 --
-string(16) element1element2
--- Iteration 17 --
-string(17) element11element2
--- Iteration 18 --
-string(16) element1element2
--- Iteration 19 --
-string(26) element1testObjectelement2
--- Iteration 20 --
-string(16) element1element2
--- Iteration 21 --
-string(16) element1element2
--- Iteration 22 --
-string(16) element1element2
--- Iteration 23 --
-string(16) element1element2
--- Iteration 24 --
-string(%d) element1Resource id #%delement2
--- Iteration 25 --
-string(16) element1element2
--- Iteration 26 --
-string(16) element1element2
-Done
+--TEST--
+Test join() function : usage variations - unexpected values for 'glue' argument
+--FILE--
+?php
+/* Prototype  : string join( string $glue, array $pieces )
+ * Description: Join array elements with a string
+ * Source code: ext/standard/string.c
+ * Alias of function: implode()
+*/
+
+/*
+ * testing join() by passing different unexpected value for glue argument
+*/
+
+echo *** Testing join() : usage variations ***\n;
+// initialize all required variables
+$pieces = array(element1, element2);
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, r);
+
+// define a class
+class test
+{
+   var $t = 10;
+   function __toString() {
+ return  testObject;
+   }
+}
+
+// array with different values
+$values 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings join_variation1.phpt

2007-11-09 Thread Raghubansh Kumar
kraghubaFri Nov  9 08:57:18 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings join_variation1.phpt 
  Log:
  fix test: better float values
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/join_variation1.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/standard/tests/strings/join_variation1.phpt
diff -u php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.2.3 
php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.2.4
--- php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.2.3 Tue Oct 
 9 10:56:45 2007
+++ php-src/ext/standard/tests/strings/join_variation1.phpt Fri Nov  9 
08:57:18 2007
@@ -1,167 +1,167 @@
---TEST--
-Test join() function : usage variations - unexpected values for 'glue' argument
---FILE--
-?php
-/* Prototype  : string join( string $glue, array $pieces )
- * Description: Join array elements with a string
- * Source code: ext/standard/string.c
- * Alias of function: implode()
-*/
-
-/*
- * testing join() by passing different unexpected value for glue argument
-*/
-
-echo *** Testing join() : usage variations ***\n;
-// initialize all required variables
-$pieces = array(element1, element2);
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// get a resource variable
-$fp = fopen(__FILE__, r);
-
-// define a class
-class test
-{
-   var $t = 10;
-   function __toString() {
- return  testObject;
-   }
-}
-
-// array with different values
-$values =  array (
-
-  // integer values
-  0,
-  1,
-  12345,
-  -2345,
-
-  // float values
-  10.5,
-  -10.5,
-  10.5e10,
-  10.6E-10,
-  .5,
-
-  // array values
-  array(),
-  array(0),
-  array(1),
-  array(1, 2),
-  array('color' = 'red', 'item' = 'pen'),
-
-  // boolean values
-  true,
-  false,
-  TRUE,
-  FALSE,
-
-  // objects
-  new test(),
-
-  // empty string
-  ,
-  '',
-
-  // null vlaues
-  NULL,
-  null,
-  
-  // resource variable
-  $fp,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$unset_var
-);
-
-
-// loop through each element of the array and check the working of join()
-// when $glue arugment is supplied with different values
-echo \n--- Testing join() by supplying different values for 'glue' argument 
---\n;
-$counter = 1;
-for($index = 0; $index  count($values); $index ++) {
-  echo -- Iteration $counter --\n;
-  $glue = $values [$index];
-
-  var_dump( join($glue, $pieces) );
-
-  $counter ++;
-}
-
-echo Done\n;
-?
---EXPECTF--
-*** Testing join() : usage variations ***
-
 Testing join() by supplying different values for 'glue' argument ---
--- Iteration 1 --
-string(17) element10element2
--- Iteration 2 --
-string(17) element11element2
--- Iteration 3 --
-string(21) element112345element2
--- Iteration 4 --
-string(21) element1-2345element2
--- Iteration 5 --
-string(20) element110.5element2
--- Iteration 6 --
-string(21) element1-10.5element2
--- Iteration 7 --
-string(28) element11050element2
--- Iteration 8 --
-string(23) element11.06E-9element2
--- Iteration 9 --
-string(19) element10.5element2
--- Iteration 10 --
-
-Notice: Array to string conversion in %s on line %d
-string(0) 
--- Iteration 11 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) 0
--- Iteration 12 --
-
-Notice: Array to string conversion in %s on line %d
-string(1) 1
--- Iteration 13 --
-
-Notice: Array to string conversion in %s on line %d
-string(7) 1Array2
--- Iteration 14 --
-
-Notice: Array to string conversion in %s on line %d
-string(11) redArraypen
--- Iteration 15 --
-string(17) element11element2
--- Iteration 16 --
-string(16) element1element2
--- Iteration 17 --
-string(17) element11element2
--- Iteration 18 --
-string(16) element1element2
--- Iteration 19 --
-string(26) element1testObjectelement2
--- Iteration 20 --
-string(16) element1element2
--- Iteration 21 --
-string(16) element1element2
--- Iteration 22 --
-string(16) element1element2
--- Iteration 23 --
-string(16) element1element2
--- Iteration 24 --
-string(%d) element1Resource id #%delement2
--- Iteration 25 --
-string(16) element1element2
--- Iteration 26 --
-string(16) element1element2
-Done
+--TEST--
+Test join() function : usage variations - unexpected values for 'glue' argument
+--FILE--
+?php
+/* Prototype  : string join( string $glue, array $pieces )
+ * Description: Join array elements with a string
+ * Source code: ext/standard/string.c
+ * Alias of function: implode()
+*/
+
+/*
+ * testing join() by passing different unexpected value for glue argument
+*/
+
+echo *** Testing join() : usage variations ***\n;
+// initialize all required variables
+$pieces = array(element1, element2);
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// get a resource variable
+$fp = fopen(__FILE__, r);
+
+// define a class
+class test
+{
+   var $t = 10;
+   function __toString() {
+ return  testObject;
+   }
+}
+
+// array with different values
+$values 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard streamsfuncs.c /ext/standard/tests/file bug43216.phpt

2007-11-09 Thread Dmitry Stogov
dmitry  Fri Nov  9 09:37:42 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filebug43216.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/standard   streamsfuncs.c 
  Log:
  Fixed bug #43216 (stream_is_local() returns false on file://)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1002r2=1.2027.2.547.2.1003diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1002 php-src/NEWS:1.2027.2.547.2.1003
--- php-src/NEWS:1.2027.2.547.2.1002Fri Nov  9 09:28:17 2007
+++ php-src/NEWSFri Nov  9 09:37:42 2007
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? 2008, PHP 5.2.6
+- Fixed bug #43216 (stream_is_local() returns false on file://). (Dmitry)
 - Fixed bug #43201 (Crash on using unitialized vals and __get/__set). (Dmitry)
 - Fixed bug #43175 (__destruct() throwing an exception with __call() causes
   segfault). (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.16r2=1.58.2.6.2.17diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.16 
php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.17
--- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.16   Thu Oct  4 13:31:11 2007
+++ php-src/ext/standard/streamsfuncs.c Fri Nov  9 09:37:42 2007
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: streamsfuncs.c,v 1.58.2.6.2.16 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.6.2.17 2007/11/09 09:37:42 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -1361,7 +1361,7 @@
wrapper = stream-wrapper;
} else {
convert_to_string_ex(zstream);
-   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), 
NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC);
+   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), 
NULL, 0 TSRMLS_CC);
}
 
if(!wrapper) {

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug43216.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/bug43216.phpt
+++ php-src/ext/standard/tests/file/bug43216.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/mysqli mysqli_nonapi.c

2007-11-09 Thread Andrey Hristov
andrey  Fri Nov  9 11:06:07 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqli mysqli_nonapi.c 
  Log:
  Fix build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.5.2.2r2=1.54.2.7.2.5.2.3diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.2 
php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.3
--- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.2 Fri Nov  9 10:56:28 2007
+++ php-src/ext/mysqli/mysqli_nonapi.c  Fri Nov  9 11:06:07 2007
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.2 2007/11/09 10:56:28 andrey Exp $ 
+  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.3 2007/11/09 11:06:07 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -148,7 +148,7 @@
le.type = php_le_pmysqli();
le.ptr = plist = calloc(1, 
sizeof(mysqli_plist_entry));
 
-   zend_ptr_stack_init(plist-free_links, 1);
+   zend_ptr_stack_init_ex(plist-free_links, 1);
zend_hash_update(EG(persistent_list), 
hash_key, hash_len + 1, (void *)le, sizeof(le), NULL);
}
}

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

2007-11-09 Thread Dmitry Stogov
dmitry  Fri Nov  9 11:08:23 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   file.c 
  Log:
  Conditions optimization
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.3r2=1.409.2.6.2.28.2.4diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.3 
php-src/ext/standard/file.c:1.409.2.6.2.28.2.4
--- php-src/ext/standard/file.c:1.409.2.6.2.28.2.3  Tue Nov  6 17:11:56 2007
+++ php-src/ext/standard/file.c Fri Nov  9 11:08:22 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.409.2.6.2.28.2.3 2007/11/06 17:11:56 jani Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.28.2.4 2007/11/09 11:08:22 dmitry Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -2244,11 +2244,10 @@
state = 0;
break;
default:
-   if 
((escape_char == enclosure  *bptr == escape_char  *(bptr+1) == escape_char)
-   || 
(escape_char != enclosure  *bptr == escape_char)) {
-   state = 
1;
-   } else if 
(*bptr == enclosure) {
+   if (*bptr == 
enclosure) {
state = 
2;
+   } else if 
(*bptr == escape_char) {
+   state = 
1;
}
bptr++;
break;

-- 
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/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c php_mysqli_structs.h

2007-11-09 Thread Andrey Hristov
andrey  Fri Nov  9 10:56:28 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c 
php_mysqli_structs.h 
  Log:
  Fix crash with pconnect
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.17.2.6r2=1.72.2.16.2.17.2.7diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.6 
php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.7
--- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.6  Wed Oct 17 08:18:09 2007
+++ php-src/ext/mysqli/mysqli.c Fri Nov  9 10:56:28 2007
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli.c,v 1.72.2.16.2.17.2.6 2007/10/17 08:18:09 tony2001 Exp $ 
+  $Id: mysqli.c,v 1.72.2.16.2.17.2.7 2007/11/09 10:56:28 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -70,50 +70,25 @@
 
 static int le_pmysqli;
 
-static int php_mysqli_persistent_on_rshut(zend_rsrc_list_entry *le TSRMLS_DC)
-{
-   if (le-type == le_pmysqli) {
-   mysqli_plist_entry *plist = (mysqli_plist_entry *) le-ptr;
-   HashPosition pos;
-   MYSQL **mysql;
-   ulong idx;
-   dtor_func_t pDestructor = plist-used_links.pDestructor;
-   plist-used_links.pDestructor = NULL; /* Don't call pDestructor 
now */
-
-   zend_hash_internal_pointer_reset_ex(plist-used_links, pos);
-   while (SUCCESS == 
zend_hash_get_current_data_ex(plist-used_links, (void **)mysql, pos)) {
-   zend_hash_get_current_key_ex(plist-used_links, NULL, 
NULL, idx, FALSE, pos);
-   /* Make it free */
-   zend_hash_next_index_insert(plist-free_links, mysql, 
sizeof(MYSQL *), NULL);
-   /* First move forward */
-   zend_hash_move_forward_ex(plist-used_links, pos);
-   /* The delete, because del will free memory, but we 
need it's -nextItem */
-   zend_hash_index_del(plist-used_links, idx);
-   }
-
-   /* restore pDestructor, which should be 
php_mysqli_dtor_p_elements() */
-   plist-used_links.pDestructor = pDestructor;
-   }
-   return ZEND_HASH_APPLY_KEEP;
-}
 
 /* Destructor for mysqli entries in free_links/used_links */
 void php_mysqli_dtor_p_elements(void *data)
 {
-   MYSQL **mysql = (MYSQL **) data;
+   MYSQL *mysql = (MYSQL *) data;
TSRMLS_FETCH();
 #if defined(HAVE_MYSQLND)
-   mysqlnd_end_psession(*mysql);
+   mysqlnd_end_psession(mysql);
 #endif
-   mysqli_close(*mysql, MYSQLI_CLOSE_IMPLICIT);
+   mysqli_close(mysql, MYSQLI_CLOSE_IMPLICIT);
 }
 
+/* le_pmysqli dtor*/
 ZEND_RSRC_DTOR_FUNC(php_mysqli_dtor)
 {
if (rsrc-ptr) {
mysqli_plist_entry *plist = (mysqli_plist_entry *) rsrc-ptr;
-   zend_hash_destroy(plist-free_links);
-   zend_hash_destroy(plist-used_links);
+   zend_ptr_stack_clean(plist-free_links, 
php_mysqli_dtor_p_elements, 0);
+   zend_ptr_stack_destroy(plist-free_links);
free(plist);
}
 }
@@ -222,6 +197,8 @@
 }
 /* }}} */
 
+/* mysqli_link_free_storage partly doubles the work of 
PHP_FUNCTION(mysqli_close) */
+
 /* {{{ mysqli_link_free_storage
  */
 static void mysqli_link_free_storage(void *object TSRMLS_DC)
@@ -235,6 +212,19 @@
if (mysql-mysql) {
if (!mysql-persistent) {
mysqli_close(mysql-mysql, 
MYSQLI_CLOSE_IMPLICIT);
+   } else {
+   zend_rsrc_list_entry *le;
+   if (zend_hash_find(EG(persistent_list), 
mysql-hash_key, strlen(mysql-hash_key) + 1, (void **)le) == SUCCESS) {
+   if (Z_TYPE_P(le) == php_le_pmysqli()) {
+   mysqli_plist_entry *plist = 
(mysqli_plist_entry *) le-ptr;
+   
+   
zend_ptr_stack_push(plist-free_links, mysql-mysql);
+
+   MyG(num_links)--;
+   MyG(num_active_persistent)--;
+   MyG(num_inactive_persistent)++;
+   }
+   }
}
}
php_clear_mysql(mysql);
@@ -854,7 +844,6 @@
 PHP_RSHUTDOWN_FUNCTION(mysqli)
 {
/* check persistent connections, move used to free */
-   zend_hash_apply(EG(persistent_list), (apply_func_t) 
php_mysqli_persistent_on_rshut TSRMLS_CC);
 
 #if !defined(HAVE_MYSQLND)  defined(ZTS)  MYSQL_VERSION_ID = 4

[PHP-CVS] cvs: CVSROOT / avail

2007-11-09 Thread Derick Rethans
derick  Fri Nov  9 12:13:47 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give Vadym pecl/intl access.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1322r2=1.1323diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1322 CVSROOT/avail:1.1323
--- CVSROOT/avail:1.1322Tue Nov  6 02:03:38 2007
+++ CVSROOT/avail   Fri Nov  9 12:13:47 2007
@@ -282,7 +282,7 @@
 avail|tias|pear/PEAR_Frontend_Web,peardoc
 avail|va|pecl/yami
 avail|msaraujo,mansion|pecl/lua
-avail|merletenney,kirtig,harveyrd,kuntakinte14,ebatutis,tex|pecl/intl,pecl/unicode
+avail|merletenney,kirtig,harveyrd,kuntakinte14,ebatutis,tex,vsavchuk|pecl/intl,pecl/unicode
 avail|lucas|pecl/apd
 avail|rotsenmarcello|pecl/puno
 avail|lwe|pecl/pdo_firebird,php-src/ext/pdo_firebird

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings str_replace.phpt stripos_variation10.phpt strrchr_variation10.phpt strrchr_variation11.phpt strrpos_variation10.phpt

2007-11-09 Thread Raghubansh Kumar
kraghubaFri Nov  9 12:06:08 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings strrchr_variation10.phpt 
stripos_variation10.phpt 
strrchr_variation11.phpt 
strrpos_variation10.phpt 
str_replace.phpt 
  Log:
  fix tests
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrchr_variation10.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/strrchr_variation10.phpt
diff -u php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2 
php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.3
--- php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2 Sat Sep 
29 09:24:27 2007
+++ php-src/ext/standard/tests/strings/strrchr_variation10.phpt Fri Nov  9 
12:06:07 2007
@@ -180,7 +180,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
@@ -243,7 +243,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripos_variation10.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/stripos_variation10.phpt
diff -u php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2 
php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.3
--- php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2 Sat Sep 
29 09:22:42 2007
+++ php-src/ext/standard/tests/strings/stripos_variation10.phpt Fri Nov  9 
12:06:08 2007
@@ -165,7 +165,7 @@
 bool(false)
 
 -- Iteration 24 --
-bool(false)
+%s
 
 -- Iteration 25 --
 bool(false)
@@ -254,7 +254,7 @@
 bool(false)
 
 -- Iteration 24 --
-bool(false)
+%s
 
 -- Iteration 25 --
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrchr_variation11.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/strrchr_variation11.phpt
diff -u php-src/ext/standard/tests/strings/strrchr_variation11.phpt:1.2 
php-src/ext/standard/tests/strings/strrchr_variation11.phpt:1.3
--- php-src/ext/standard/tests/strings/strrchr_variation11.phpt:1.2 Sat Sep 
29 09:24:27 2007
+++ php-src/ext/standard/tests/strings/strrchr_variation11.phpt Fri Nov  9 
12:06:08 2007
@@ -80,8 +80,6 @@
 $counter = 1;
 for($index = 0; $index  count($values); $index ++) {
   echo -- Iteration $counter --\n;
-  $haystack = $values[$index];
-
   var_dump( strrchr($values[$index], $values[$index]) );
   $counter ++;
 }
@@ -151,7 +149,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
@@ -224,7 +222,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrpos_variation10.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/strrpos_variation10.phpt
diff -u php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.2 
php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.3
--- php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.2 Fri Oct 
 5 18:35:49 2007
+++ php-src/ext/standard/tests/strings/strrpos_variation10.phpt Fri Nov  9 
12:06:08 2007
@@ -142,7 +142,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
@@ -205,7 +205,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_replace.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/standard/tests/strings/str_replace.phpt
diff -u php-src/ext/standard/tests/strings/str_replace.phpt:1.4 
php-src/ext/standard/tests/strings/str_replace.phpt:1.5
--- php-src/ext/standard/tests/strings/str_replace.phpt:1.4 Mon May 14 
13:05:29 2007
+++ php-src/ext/standard/tests/strings/str_replace.phpt Fri Nov  9 12:06:08 2007
@@ -27,8 +27,9 @@
 var_dump( $count );
 
 $fp = fopen( __FILE__, r );
-var_dump( str_replace($fp, $fp, $fp, $fp) );
-var_dump( $fp );
+$fp_copy = $fp;
+var_dump( str_replace($fp_copy, $fp_copy, $fp_copy, $fp_copy) );
+var_dump( $fp_copy );
 
 echo \n*** Testing str_replace() with various search values ***;
 $search_arr = array( TRUE, FALSE, 1, 0, -1, 1, 0, -1,  NULL, 
@@ -230,12 +231,11 @@
 var_dump( str_replace(1, 2) );
 var_dump( str_replace(1,2,3,$var,5) );
 
-echo Done\n;
[EMAIL PROTECTED]($fp);
[EMAIL PROTECTED]($resource1);
[EMAIL PROTECTED]($resource2);
 
---CLEAN--
-fclose($fp);
-fclose($resource1);
-closedir($resource2);
+echo Done\n;
 
 ?
 --EXPECTF--
@@ -956,721 +956,3 @@
 Warning: str_replace() expects at most 4 parameters, 5 given in %s on line 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings str_replace.phpt stripos_variation10.phpt strpos.phpt strrchr_variation10.phpt strrchr_variation11.phpt strrpos_variation10.phpt strstr.phpt

2007-11-09 Thread Raghubansh Kumar
kraghubaFri Nov  9 12:02:42 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings strrpos_variation10.phpt 
str_replace.phpt strstr.phpt 
strrchr_variation10.phpt 
stripos_variation10.phpt 
strrchr_variation11.phpt 
strpos.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrpos_variation10.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/strings/strrpos_variation10.phpt
diff -u php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.1.4.2 
php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.1.4.3
--- php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.1.4.2 Fri Oct 
 5 18:33:23 2007
+++ php-src/ext/standard/tests/strings/strrpos_variation10.phpt Fri Nov  9 
12:02:42 2007
@@ -41,8 +41,8 @@
   // float values
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array values
@@ -142,7 +142,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_replace.phpt?r1=1.1.2.6r2=1.1.2.6.2.1diff_format=u
Index: php-src/ext/standard/tests/strings/str_replace.phpt
diff -u php-src/ext/standard/tests/strings/str_replace.phpt:1.1.2.6 
php-src/ext/standard/tests/strings/str_replace.phpt:1.1.2.6.2.1
--- php-src/ext/standard/tests/strings/str_replace.phpt:1.1.2.6 Fri May 18 
11:29:55 2007
+++ php-src/ext/standard/tests/strings/str_replace.phpt Fri Nov  9 12:02:42 2007
@@ -27,8 +27,10 @@
 var_dump( $count );
 
 $fp = fopen( __FILE__, r );
-var_dump( str_replace($fp, $fp, $fp, $fp) );
-var_dump( $fp );
+$fp_copy = $fp; 
+var_dump( str_replace($fp_copy, $fp_copy, $fp_copy, $fp_copy) );
+var_dump( $fp_copy );
+fclose($fp);
 
 echo \n*** Testing str_replace() with various search values ***;
 $search_arr = array( TRUE, FALSE, 1, 0, -1, 1, 0, -1,  NULL, 
@@ -230,12 +232,9 @@
 var_dump( str_replace(1, 2) );
 var_dump( str_replace(1,2,3,$var,5) );
 
-echo Done\n;
-
---CLEAN--
-fclose($fp);
 fclose($resource1);
 closedir($resource2);
+echo Done\n;
 
 ?
 --EXPECTF--
@@ -248,7 +247,7 @@
 int(1)
 string(0) 
 int(0)
-string(14) Resource id #5
+string(%d) Resource id #%d
 int(1)
 
 *** Testing str_replace() with various search values ***
@@ -910,9 +909,9 @@
 int(1)
 
 -- Testing Resources --
-string(14) Resource id #6
+string(%d) Resource id #%d
 int(0)
-string(14) Resource id #7
+string(%d) Resource id #%d
 int(0)
 
 -- Testing a longer and heredoc string --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strstr.phpt?r1=1.2.6.1.2.1r2=1.2.6.1.2.2diff_format=u
Index: php-src/ext/standard/tests/strings/strstr.phpt
diff -u php-src/ext/standard/tests/strings/strstr.phpt:1.2.6.1.2.1 
php-src/ext/standard/tests/strings/strstr.phpt:1.2.6.1.2.2
--- php-src/ext/standard/tests/strings/strstr.phpt:1.2.6.1.2.1  Sun Sep 30 
14:37:33 2007
+++ php-src/ext/standard/tests/strings/strstr.phpt  Fri Nov  9 12:02:42 2007
@@ -337,8 +337,8 @@
 string(20) !$%**()%**[][[[@#~!
 
 -- passing Resources as string and needle --
-bool(false)
-bool(false)
+%s
+%s
 
 -- Posiibilities with null --
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrchr_variation10.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u
Index: php-src/ext/standard/tests/strings/strrchr_variation10.phpt
diff -u php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2.2.2 
php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2.2.3
--- php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2.2.2 Sat Sep 
29 16:59:07 2007
+++ php-src/ext/standard/tests/strings/strrchr_variation10.phpt Fri Nov  9 
12:02:42 2007
@@ -79,8 +79,8 @@
   // float values
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array values
@@ -180,7 +180,7 @@
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripos_variation10.phpt?r1=1.2.2.3r2=1.2.2.4diff_format=u
Index: php-src/ext/standard/tests/strings/stripos_variation10.phpt
diff -u php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2.2.3 
php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2.2.4
--- php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2.2.3 Sun Sep 
30 14:37:33 2007
+++ php-src/ext/standard/tests/strings/stripos_variation10.phpt Fri Nov  9 
12:02:42 2007
@@ -41,8 +41,8 @@
   // float values
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array values
@@ -182,7 +182,7 @@
 -- Iteration 24 --
 
 Warning: 

[PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c php_mysqli_structs.h

2007-11-09 Thread Andrey Hristov
andrey  Fri Nov  9 12:13:15 2007 UTC

  Modified files:  
/php-src/ext/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c 
php_mysqli_structs.h 
  Log:
  Fix crashes with pconn (merge from 5_3)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.112r2=1.113diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.112 php-src/ext/mysqli/mysqli.c:1.113
--- php-src/ext/mysqli/mysqli.c:1.112   Wed Oct 17 08:17:34 2007
+++ php-src/ext/mysqli/mysqli.c Fri Nov  9 12:13:15 2007
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli.c,v 1.112 2007/10/17 08:17:34 tony2001 Exp $ 
+  $Id: mysqli.c,v 1.113 2007/11/09 12:13:15 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -73,42 +73,16 @@
 static int le_pmysqli;
 
 
-static int php_mysqli_persistent_on_rshut(zend_rsrc_list_entry *le TSRMLS_DC)
-{
-   if (le-type == le_pmysqli) {
-   mysqli_plist_entry *plist = (mysqli_plist_entry *) le-ptr;
-   HashPosition pos;
-   MYSQL **mysql;
-   ulong idx;
-   dtor_func_t pDestructor = plist-used_links.pDestructor;
-   plist-used_links.pDestructor = NULL; /* Don't call pDestructor 
now */
-
-   zend_hash_internal_pointer_reset_ex(plist-used_links, pos);
-   while (SUCCESS == 
zend_hash_get_current_data_ex(plist-used_links, (void **)mysql, pos)) {
-   zend_hash_get_current_key_ex(plist-used_links, NULL, 
NULL, idx, FALSE, pos);
-   /* Make it free */
-   zend_hash_next_index_insert(plist-free_links, mysql, 
sizeof(MYSQL *), NULL);
-   /* First move forward */
-   zend_hash_move_forward_ex(plist-used_links, pos);
-   /* The delete, because del will free memory, but we 
need it's -nextItem */
-   zend_hash_index_del(plist-used_links, idx);
-   }
-
-   /* restore pDestructor, which should be 
php_mysqli_dtor_p_elements() */
-   plist-used_links.pDestructor = pDestructor;
-   }
-   return ZEND_HASH_APPLY_KEEP;
-}
 
 /* Destructor for mysqli entries in free_links/used_links */
 void php_mysqli_dtor_p_elements(void *data)
 {
-   MYSQL **mysql = (MYSQL **) data;
+   MYSQL *mysql = (MYSQL *) data;
TSRMLS_FETCH();
 #if defined(HAVE_MYSQLND)
-   mysqlnd_end_psession(*mysql);
+   mysqlnd_end_psession(mysql);
 #endif
-   mysqli_close(*mysql, MYSQLI_CLOSE_IMPLICIT);
+   mysqli_close(mysql, MYSQLI_CLOSE_IMPLICIT);
 }
 
 
@@ -116,8 +90,8 @@
 {
if (rsrc-ptr) {
mysqli_plist_entry *plist = (mysqli_plist_entry *) rsrc-ptr;
-   zend_hash_destroy(plist-free_links);
-   zend_hash_destroy(plist-used_links);
+   zend_ptr_stack_clean(plist-free_links, 
php_mysqli_dtor_p_elements, 0);
+   zend_ptr_stack_destroy(plist-free_links);
free(plist);
}
 }
@@ -225,6 +199,8 @@
 }
 /* }}} */
 
+/* mysqli_link_free_storage partly doubles the work of 
PHP_FUNCTION(mysqli_close) */
+
 /* {{{ mysqli_link_free_storage
  */
 static void mysqli_link_free_storage(void *object TSRMLS_DC)
@@ -238,6 +214,19 @@
if (mysql-mysql) {
if (!mysql-persistent) {
mysqli_close(mysql-mysql, 
MYSQLI_CLOSE_IMPLICIT);
+   } else {
+   zend_rsrc_list_entry *le;
+   if (zend_hash_find(EG(persistent_list), 
mysql-hash_key, strlen(mysql-hash_key) + 1, (void **)le) == SUCCESS) {
+   if (Z_TYPE_P(le) == php_le_pmysqli()) {
+   mysqli_plist_entry *plist = 
(mysqli_plist_entry *) le-ptr;
+   
+   
zend_ptr_stack_push(plist-free_links, mysql-mysql);
+
+   MyG(num_links)--;
+   MyG(num_active_persistent)--;
+   MyG(num_inactive_persistent)++;
+   }
+   }
}
}
php_clear_mysql(mysql);
@@ -851,9 +840,6 @@
  */
 PHP_RSHUTDOWN_FUNCTION(mysqli)
 {
-   /* check persistent connections, move used to free */
-   zend_hash_apply(EG(persistent_list), (apply_func_t) 
php_mysqli_persistent_on_rshut TSRMLS_CC);
-
 #if !defined(HAVE_MYSQLND)  defined(ZTS)  MYSQL_VERSION_ID = 4
mysql_thread_end();
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.154r2=1.155diff_format=u
Index: 

Re: [PHP-CVS] cvs: php-src(PHP_5_3)

2007-11-09 Thread Antony Dovgal
The tests below do not pass anymore after the update (on Linux 64bit):

ext/standard/tests/strings/strcspn_variation3.phpt
# cat ext/standard/tests/strings/strcspn_variation3.diff
012+ bool(false)
013+ bool(false)
012- int(0)

ext/standard/tests/strings/strspn_variation3.phpt
# cat ext/standard/tests/strings/strspn_variation3.diff
012+ bool(false)
013+ bool(false)
012- int(2)
013- int(2)

ext/standard/tests/strings/strspn_variation4.phpt
# cat ext/standard/tests/strings/strspn_variation4.diff
010+ int(2)
010- int(0)

On 09.11.2007 10:19, Raghubansh Kumar wrote:
 kraghuba  Fri Nov  9 07:19:00 2007 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/standard/tests/strings   strspn_variation2.phpt 
   chunk_split_variation1.phpt 
   crc32_variation1.phpt 
   strcspn_variation4.phpt 
   strcspn_variation1.phpt 
   strtok_variation1.phpt 
   strspn_variation1.phpt 
   chunk_split_variation2.phpt 
   strspn_variation4.phpt 
   strcspn_variation2.phpt 
   chunk_split_variation3.phpt 
   strspn_variation3.phpt 
   strcspn_variation3.phpt 
   ucwords_variation1.phpt 
   Log:
   fix tests: better float values
   
 


-- 
Wbr, 
Antony Dovgal

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



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

2007-11-09 Thread Jani Taskinen
janiFri Nov  9 13:49:06 2007 UTC

  Modified files:  
/php-src/ext/standard   dl.c 
  Log:
  ws + cs
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.120r2=1.121diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.120 php-src/ext/standard/dl.c:1.121
--- php-src/ext/standard/dl.c:1.120 Thu Sep 27 18:28:42 2007
+++ php-src/ext/standard/dl.c   Fri Nov  9 13:49:06 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dl.c,v 1.120 2007/09/27 18:28:42 dmitry Exp $ */
+/* $Id: dl.c,v 1.121 2007/11/09 13:49:06 jani Exp $ */
 
 #include php.h
 #include dl.h
@@ -32,7 +32,6 @@
 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H
 #include stdlib.h
 #include stdio.h
-
 #ifdef HAVE_STRING_H
 #include string.h
 #else
@@ -49,10 +48,8 @@
 #include sys/param.h
 #define GET_DL_ERROR() DL_ERROR()
 #endif
-
 #endif /* defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H */
 
-
 /* {{{ proto int dl(string extension_filename) U
Load a PHP extension at runtime */
 PHP_FUNCTION(dl)
@@ -71,10 +68,8 @@
php_dl(filename, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
EG(full_tables_cleanup) = 1;
 }
-
 /* }}} */
 
-
 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H
 
 #ifdef ZTS
@@ -153,14 +148,13 @@
 
get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, 
get_module);
 
-   /*
-* some OS prepend _ to symbol names while their dynamic linker
+   /* Some OS prepend _ to symbol names while their dynamic linker
 * does not do that automatically. Thus we check manually for
-* _get_module.
-*/
+* _get_module. */
 
-   if (!get_module)
+   if (!get_module) {
get_module = (zend_module_entry *(*)(void)) 
DL_FETCH_SYMBOL(handle, _get_module);
+   }
 
if (!get_module) {
DL_UNLOAD(handle);
@@ -168,27 +162,29 @@
RETURN_FALSE;
}
module_entry = get_module();
-   if ((module_entry-zend_debug != ZEND_DEBUG) || (module_entry-zts != 
USING_ZTS)
-   || (module_entry-zend_api != ZEND_MODULE_API_NO)) {
+   if ((module_entry-zend_debug != ZEND_DEBUG) ||
+   (module_entry-zts != USING_ZTS) ||
+   (module_entry-zend_api != ZEND_MODULE_API_NO)
+   ) {
/* Check for pre-4.1.0 module which has a slightly different 
module_entry structure :( */
struct pre_4_1_0_module_entry {
- char *name;
- zend_function_entry *functions;
- int (*module_startup_func)(INIT_FUNC_ARGS);
- int 
(*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
- int (*request_startup_func)(INIT_FUNC_ARGS);
- int 
(*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
- void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
- int (*global_startup_func)(void);
- int (*global_shutdown_func)(void);
- int globals_id;
- int module_started;
- unsigned char type;
- void *handle;
- int module_number;
- unsigned char zend_debug;
- unsigned char zts;
- unsigned int zend_api;
+   char *name;
+   zend_function_entry *functions;
+   int (*module_startup_func)(INIT_FUNC_ARGS);
+   int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
+   int (*request_startup_func)(INIT_FUNC_ARGS);
+   int 
(*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
+   void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
+   int (*global_startup_func)(void);
+   int (*global_shutdown_func)(void);
+   int globals_id;
+   int module_started;
+   unsigned char type;
+   void *handle;
+   int module_number;
+   unsigned char zend_debug;
+   unsigned char zts;
+   unsigned int zend_api;
};
 
const char *name;
@@ -198,24 +194,24 @@
if struct pre_4_1_0_module_entry 
*)module_entry)-zend_api  2000) 
(((struct pre_4_1_0_module_entry 
*)module_entry)-zend_api  20010901)
) {
-  

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

2007-11-09 Thread Jani Taskinen
janiFri Nov  9 13:49:15 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   dl.c 
  Log:
  MFH: ws + cs + sync
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.106.2.1.2.5.2.1r2=1.106.2.1.2.5.2.2diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.106.2.1.2.5.2.1 
php-src/ext/standard/dl.c:1.106.2.1.2.5.2.2
--- php-src/ext/standard/dl.c:1.106.2.1.2.5.2.1 Thu Sep 27 18:00:45 2007
+++ php-src/ext/standard/dl.c   Fri Nov  9 13:49:15 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dl.c,v 1.106.2.1.2.5.2.1 2007/09/27 18:00:45 dmitry Exp $ */
+/* $Id: dl.c,v 1.106.2.1.2.5.2.2 2007/11/09 13:49:15 jani Exp $ */
 
 #include php.h
 #include dl.h
@@ -31,7 +31,6 @@
 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H
 #include stdlib.h
 #include stdio.h
-
 #ifdef HAVE_STRING_H
 #include string.h
 #else
@@ -48,23 +47,18 @@
 #include sys/param.h
 #define GET_DL_ERROR() DL_ERROR()
 #endif
-
 #endif /* defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H */
 
-
 /* {{{ proto int dl(string extension_filename)
Load a PHP extension at runtime */
 PHP_FUNCTION(dl)
 {
-   zval **file;
+   zval *filename;
 
-   /* obtain arguments */
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, file) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, filename) == 
FAILURE) {
+   return;
}
 
-   convert_to_string_ex(file);
-
if (!PG(enable_dl)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Dynamically loaded 
extensions aren't enabled);
RETURN_FALSE;
@@ -73,14 +67,15 @@
RETURN_FALSE;
}
 
-   if (Z_STRLEN_PP(file) = MAXPATHLEN) {
+   if (Z_STRLEN_P(filename) = MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, File name exceeds 
the maximum allowed length of %d characters, MAXPATHLEN);
RETURN_FALSE;
}
 
-   if ((strncmp(sapi_module.name, cgi, 3)!=0)  
-   (strcmp(sapi_module.name, cli)!=0) 
-   (strncmp(sapi_module.name, embed, 5)!=0)) {
+   if ((strncmp(sapi_module.name, cgi, 3) != 0) 
+   (strcmp(sapi_module.name, cli) != 0) 
+   (strncmp(sapi_module.name, embed, 5) != 0)
+   ) {
 #ifdef ZTS
php_error_docref(NULL TSRMLS_CC, E_WARNING, Not supported in 
multithreaded Web servers - use extension=%s in your php.ini, 
Z_STRVAL_PP(file));
RETURN_FALSE;
@@ -89,13 +84,11 @@
 #endif
}
 
-   php_dl(*file, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
+   php_dl(filename, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
EG(full_tables_cleanup) = 1;
 }
-
 /* }}} */
 
-
 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H
 
 #ifdef ZTS
@@ -114,6 +107,8 @@
zend_module_entry *(*get_module)(void);
int error_type;
char *extension_dir;
+   char *filename;
+   int filename_len;
 
if (type == MODULE_PERSISTENT) {
extension_dir = INI_STR(extension_dir);
@@ -127,23 +122,26 @@
error_type = E_CORE_WARNING;
}
 
+   filename = Z_STRVAL_P(file);
+   filename_len = Z_STRLEN_P(file);
+
if (extension_dir  extension_dir[0]){
int extension_dir_len = strlen(extension_dir);
 
if (type == MODULE_TEMPORARY) {
-   if (strchr(Z_STRVAL_P(file), '/') != NULL || 
strchr(Z_STRVAL_P(file), DEFAULT_SLASH) != NULL) {
+   if (strchr(filename, '/') != NULL || strchr(filename, 
DEFAULT_SLASH) != NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Temporary module name should contain only filename);
RETURN_FALSE;
}
}
 
if (IS_SLASH(extension_dir[extension_dir_len-1])) {
-   spprintf(libpath, 0, %s%s, extension_dir, 
Z_STRVAL_P(file));
+   spprintf(libpath, 0, %s%s, extension_dir, filename); 
/* SAFE */
} else {
-   spprintf(libpath, 0, %s%c%s, extension_dir, 
DEFAULT_SLASH, Z_STRVAL_P(file));
+   spprintf(libpath, 0, %s%c%s, extension_dir, 
DEFAULT_SLASH, filename); /* SAFE */
}
} else {
-   libpath = estrndup(Z_STRVAL_P(file), Z_STRLEN_P(file));
+   libpath = estrndup(filename, filename_len);
}
 
/* load dynamic symbol */
@@ -159,42 +157,43 @@
 
get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, 
get_module);
 
-   /*
-* some OS prepend _ to symbol names while their dynamic linker
+   /* Some OS prepend _ to symbol names while their dynamic linker
 * does not do that automatically. Thus we check manually for
-* 

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

2007-11-09 Thread Jani Taskinen
janiFri Nov  9 16:02:50 2007 UTC

  Modified files:  
/php-src/main   php_ini.c php_ini.h 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  - Added support for [HOST=www.example.com] sections 
  # Works the same way as PATH, just the SERVER_NAME is matched with these
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.160r2=1.161diff_format=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.160 php-src/main/php_ini.c:1.161
--- php-src/main/php_ini.c:1.160Sun Oct  7 05:15:07 2007
+++ php-src/main/php_ini.c  Fri Nov  9 16:02:50 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_ini.c,v 1.160 2007/10/07 05:15:07 davidw Exp $ */
+/* $Id: php_ini.c,v 1.161 2007/11/09 16:02:50 jani Exp $ */
 
 #include php.h
 #include ext/standard/info.h
@@ -760,6 +760,21 @@
 }
 /* }}} */
 
+/* {{{ php_ini_activate_per_host_config
+ */
+PHPAPI void php_ini_activate_per_host_config(char *host, uint host_len 
TSRMLS_DC)
+{
+   zval *tmp;
+
+   if (host  host_len) {
+   /* Search for source array matching the host from 
configuration_hash */
+   if (zend_hash_find(configuration_hash, host, host_len, (void 
**) tmp) == SUCCESS) {
+   php_ini_activate_config(Z_ARRVAL_P(tmp), 
PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE TSRMLS_CC);
+   }
+   }
+}
+/* }}} */
+
 /* {{{ cfg_get_entry
  */
 PHPAPI zval *cfg_get_entry(char *name, uint name_length)
http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.h?r1=1.53r2=1.54diff_format=u
Index: php-src/main/php_ini.h
diff -u php-src/main/php_ini.h:1.53 php-src/main/php_ini.h:1.54
--- php-src/main/php_ini.h:1.53 Fri Sep 28 10:23:14 2007
+++ php-src/main/php_ini.h  Fri Nov  9 16:02:50 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_ini.h,v 1.53 2007/09/28 10:23:14 jani Exp $ */
+/* $Id: php_ini.h,v 1.54 2007/11/09 16:02:50 jani Exp $ */
 
 #ifndef PHP_INI_H
 #define PHP_INI_H
@@ -35,6 +35,7 @@
 PHPAPI int php_parse_user_ini_file(char *dirname, char *ini_filename, 
HashTable *target_hash TSRMLS_DC);
 PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, 
int stage TSRMLS_DC);
 PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len 
TSRMLS_DC);
+PHPAPI void php_ini_activate_per_host_config(char *host, uint host_len 
TSRMLS_DC);
 #if ZEND_DEBUG
 PHPAPI HashTable get_configuration_hash(void);
 #endif
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.345r2=1.346diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.345 php-src/sapi/cgi/cgi_main.c:1.346
--- php-src/sapi/cgi/cgi_main.c:1.345   Thu Nov  1 11:49:27 2007
+++ php-src/sapi/cgi/cgi_main.c Fri Nov  9 16:02:50 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.345 2007/11/01 11:49:27 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.346 2007/11/09 16:02:50 jani Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -700,7 +700,7 @@
 
 static int sapi_cgi_activate(TSRMLS_D)
 {
-   char *path, *doc_root;
+   char *path, *doc_root, *server_name;
uint path_len, doc_root_len;
 
/* PATH_TRANSLATED should be defined at this stage but better safe than 
sorry :) */
@@ -709,9 +709,10 @@
}
 
doc_root = sapi_cgibin_getenv(DOCUMENT_ROOT, sizeof(DOCUMENT_ROOT) 
- 1 TSRMLS_CC);
+   server_name = sapi_cgibin_getenv(SERVER_NAME, sizeof(SERVER_NAME) - 
1 TSRMLS_CC);
 
-   /* DOCUMENT_ROOT should also be defined at this stage..but better check 
it anyway */
-   if (!doc_root) {
+   /* DOCUMENT_ROOT and SERVER_NAME should also be defined at this 
stage..but better check it anyway */
+   if (!doc_root || !server_name) {
return FAILURE;
}
doc_root_len = strlen(doc_root);
@@ -734,6 +735,9 @@
/* Activate per-dir-system-configuration defined in php.ini and stored 
into configuration_hash during startup */
php_ini_activate_per_dir_config(path, path_len TSRMLS_CC); /* Note: for 
global settings sake we check from root to path */
 
+   /* Activate per-host-system-configuration defined in php.ini and stored 
into configuration_hash during startup */
+   php_ini_activate_per_host_config(server_name, strlen(server_name) + 1 
TSRMLS_CC);
+
/* Load and activate user ini files in path starting from DOCUMENT_ROOT 
*/
if (strlen(PG(user_ini_filename))) {
php_cgi_ini_activate_user_config(path, path_len, doc_root_len - 
1 TSRMLS_CC);

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



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

2007-11-09 Thread Jani Taskinen
janiFri Nov  9 16:26:55 2007 UTC

  Modified files:  
/php-src/ext/standard   dl.c dl.h 
/php-src/main   php_ini.c 
  Log:
  - Allow using full path to load modules using extension directive
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.121r2=1.122diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.121 php-src/ext/standard/dl.c:1.122
--- php-src/ext/standard/dl.c:1.121 Fri Nov  9 13:49:06 2007
+++ php-src/ext/standard/dl.c   Fri Nov  9 16:26:55 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dl.c,v 1.121 2007/11/09 13:49:06 jani Exp $ */
+/* $Id: dl.c,v 1.122 2007/11/09 16:26:55 jani Exp $ */
 
 #include php.h
 #include dl.h
@@ -80,7 +80,7 @@
 
 /* {{{ php_dl
  */
-void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC)
+PHPAPI int php_load_extension(char *filename, int type, int start_now 
TSRMLS_DC) /* {{{ */
 {
void *handle;
char *libpath;
@@ -88,8 +88,6 @@
zend_module_entry *(*get_module)(void);
int error_type;
char *extension_dir;
-   char *filename;
-   int filename_len;
 
if (type == MODULE_PERSISTENT) {
extension_dir = INI_STR(extension_dir);
@@ -103,24 +101,16 @@
error_type = E_CORE_WARNING;
}
 
-   if (Z_TYPE_P(file) == IS_UNICODE) {
-   if (FAILURE == php_stream_path_encode(NULL, filename, 
filename_len, Z_USTRVAL_P(file), Z_USTRLEN_P(file), REPORT_ERRORS, 
FG(default_context))) {
-   return;
-   }
-   } else {
-   filename = Z_STRVAL_P(file);
-   filename_len = Z_STRLEN_P(file);
-   }
-
-   if (extension_dir  extension_dir[0]){
-   int extension_dir_len = strlen(extension_dir);
-
+   /* Check if passed filename contains directory separators */
+   if (strchr(filename, '/') != NULL || strchr(filename, DEFAULT_SLASH) != 
NULL) {
+   /* Passing modules with full path is not supported for 
dynamically loaded extensions */
if (type == MODULE_TEMPORARY) {
-   if (strchr(filename, '/') != NULL || strchr(filename, 
DEFAULT_SLASH) != NULL) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Temporary module name should contain only filename);
-   RETURN_FALSE;
-   }
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Temporary 
module name should contain only filename);
+   return FAILURE;
}
+   libpath = estrdup(filename);
+   } else if (extension_dir  extension_dir[0]) {
+   int extension_dir_len = strlen(extension_dir);
 
if (IS_SLASH(extension_dir[extension_dir_len-1])) {
spprintf(libpath, 0, %s%s, extension_dir, filename); 
/* SAFE */
@@ -128,11 +118,7 @@
spprintf(libpath, 0, %s%c%s, extension_dir, 
DEFAULT_SLASH, filename); /* SAFE */
}
} else {
-   libpath = estrndup(filename, filename_len);
-   }
-
-   if (Z_TYPE_P(file) == IS_UNICODE) {
-   efree(filename);
+   return FAILURE; /* Not full path given or extension_dir is not 
set */
}
 
/* load dynamic symbol */
@@ -141,9 +127,8 @@
php_error_docref(NULL TSRMLS_CC, error_type, Unable to load 
dynamic library '%s' - %s, libpath, GET_DL_ERROR());
GET_DL_ERROR(); /* free the buffer storing the error */
efree(libpath);
-   RETURN_FALSE;
+   return FAILURE;
}
-
efree(libpath);
 
get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, 
get_module);
@@ -158,8 +143,8 @@
 
if (!get_module) {
DL_UNLOAD(handle);
-   php_error_docref(NULL TSRMLS_CC, error_type, Invalid library 
(maybe not a PHP library) '%R', Z_TYPE_P(file), Z_UNIVAL_P(file));
-   RETURN_FALSE;
+   php_error_docref(NULL TSRMLS_CC, error_type, Invalid library 
(maybe not a PHP library) '%s', filename);
+   return FAILURE;
}
module_entry = get_module();
if ((module_entry-zend_debug != ZEND_DEBUG) ||
@@ -213,7 +198,7 @@
name, zend_api, zend_debug, zts,
ZEND_MODULE_API_NO, ZEND_DEBUG, 
USING_ZTS);
DL_UNLOAD(handle);
-   RETURN_FALSE;
+   return FAILURE;
}
module_entry-type = type;
module_entry-module_number = zend_next_free_module();
@@ -221,22 +206,50 @@
 
if ((module_entry = zend_register_module_ex(module_entry TSRMLS_CC)) == 
NULL) {
DL_UNLOAD(handle);
-   RETURN_FALSE;
+   

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard dl.c dl.h /main php_ini.c php_ini.h /sapi/cgi cgi_main.c

2007-11-09 Thread Jani Taskinen
janiFri Nov  9 16:27:43 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/standard   dl.c dl.h 
/php-src/main   php_ini.c php_ini.h 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  MFH:- Added support for [HOST=www.example.com] special sections
  MFH:- Allowed using full path to load modules using extension directive
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.45r2=1.2027.2.547.2.965.2.46diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.45 
php-src/NEWS:1.2027.2.547.2.965.2.46
--- php-src/NEWS:1.2027.2.547.2.965.2.45Thu Nov  8 19:54:19 2007
+++ php-src/NEWSFri Nov  9 16:27:42 2007
@@ -25,10 +25,11 @@
 
 - Improved php.ini handling: (Jani)
   . Added .htaccess style user-defined php.ini files support for CGI/FastCGI
-  . Added support for special [PATH=/opt/httpd/www.example.com/] sections
-All directives set in these sections will not be able to be overridden
-in user-defined ini-files or during runtime in the specified path
+  . Added support for special [PATH=/opt/httpd/www.example.com/] and 
+[HOST=www.example.com] sections. Directives set in these sections can
+not be overridden by user-defined ini-files or during runtime.
   . Added better error reporting for php.ini syntax errors
+  . Allowed using full path to load modules using extension directive
   . Allowed ini-variables to be used almost everywhere ini php.ini files
   . Allowed using alphanumeric/variable indexes in array ini options
   . Added 3rd optional parameter to parse_ini_file() to specify the scanning
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.106.2.1.2.5.2.2r2=1.106.2.1.2.5.2.3diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.106.2.1.2.5.2.2 
php-src/ext/standard/dl.c:1.106.2.1.2.5.2.3
--- php-src/ext/standard/dl.c:1.106.2.1.2.5.2.2 Fri Nov  9 13:49:15 2007
+++ php-src/ext/standard/dl.c   Fri Nov  9 16:27:42 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dl.c,v 1.106.2.1.2.5.2.2 2007/11/09 13:49:15 jani Exp $ */
+/* $Id: dl.c,v 1.106.2.1.2.5.2.3 2007/11/09 16:27:42 jani Exp $ */
 
 #include php.h
 #include dl.h
@@ -77,10 +77,10 @@
(strncmp(sapi_module.name, embed, 5) != 0)
) {
 #ifdef ZTS
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Not supported in 
multithreaded Web servers - use extension=%s in your php.ini, 
Z_STRVAL_PP(file));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Not supported in 
multithreaded Web servers - use extension=%s in your php.ini, 
Z_STRVAL_P(filename));
RETURN_FALSE;
 #else
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, dl() is deprecated 
- use extension=%s in your php.ini, Z_STRVAL_PP(file));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, dl() is deprecated 
- use extension=%s in your php.ini, Z_STRVAL_P(filename));
 #endif
}
 
@@ -97,9 +97,7 @@
 #define USING_ZTS 0
 #endif
 
-/* {{{ php_dl
- */
-void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC)
+PHPAPI int php_load_extension(char *filename, int type, int start_now 
TSRMLS_DC) /* {{{ */
 {
void *handle;
char *libpath;
@@ -107,8 +105,6 @@
zend_module_entry *(*get_module)(void);
int error_type;
char *extension_dir;
-   char *filename;
-   int filename_len;
 
if (type == MODULE_PERSISTENT) {
extension_dir = INI_STR(extension_dir);
@@ -122,18 +118,16 @@
error_type = E_CORE_WARNING;
}
 
-   filename = Z_STRVAL_P(file);
-   filename_len = Z_STRLEN_P(file);
-
-   if (extension_dir  extension_dir[0]){
-   int extension_dir_len = strlen(extension_dir);
-
+   /* Check if passed filename contains directory separators */
+   if (strchr(filename, '/') != NULL || strchr(filename, DEFAULT_SLASH) != 
NULL) {
+   /* Passing modules with full path is not supported for 
dynamically loaded extensions */
if (type == MODULE_TEMPORARY) {
-   if (strchr(filename, '/') != NULL || strchr(filename, 
DEFAULT_SLASH) != NULL) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Temporary module name should contain only filename);
-   RETURN_FALSE;
-   }
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Temporary 
module name should contain only filename);
+   return FAILURE;
}
+   libpath = estrdup(filename);
+   } else if (extension_dir  extension_dir[0]) {
+   int extension_dir_len = strlen(extension_dir);
 
if (IS_SLASH(extension_dir[extension_dir_len-1])) {
spprintf(libpath, 0, %s%s, extension_dir, filename); 
/* SAFE 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard dl.c dl.h /main php_ini.c php_ini.h /sapi/cgi cgi_main.c

2007-11-09 Thread Stanislav Malyshev

This would need [DOC] too, I guess - or manually telling the phpdoc team :)

Jani Taskinen wrote:

janiFri Nov  9 16:27:43 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src	NEWS 
/php-src/ext/standard	dl.c dl.h 
/php-src/main	php_ini.c php_ini.h 
/php-src/sapi/cgi	cgi_main.c 
  Log:

  MFH:- Added support for [HOST=www.example.com] special sections
  MFH:- Allowed using full path to load modules using extension directive
  
  



--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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