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

2008-07-15 Thread changelog
changelog   Wed Jul 16 01:31:46 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3108r2=1.3109diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3108 php-src/ChangeLog:1.3109
--- php-src/ChangeLog:1.3108Tue Jul 15 01:32:01 2008
+++ php-src/ChangeLog   Wed Jul 16 01:31:45 2008
@@ -1,3 +1,218 @@
+2008-07-15  Moriyoshi Koizumi  [EMAIL PROTECTED]
+
+* ext/mbstring/config.m4:
+  - indentation fix  reenable mbregex again.
+
+2008-07-15  Derick Rethans  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/date/lib/dow.c
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/lib/timelib.h:
+  - MFH: Also add the warnings for times. This does not make sense for the
+english text parser, as invalid times are never allowed in there.
+
+* ext/date/lib/dow.c
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/lib/timelib.h:
+  - Also add the warnings for times. This does not make sense for the 
english
+text parser, as invalid times are never allowed in there.
+
+2008-07-15  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/mcrypt/config.w32
+  ext/mcrypt/mcrypt.c:
+  - MFH: Port mcrypt_create_iv to windows (aka fix it on windows)
+
+* ext/mcrypt/config.w32
+  ext/mcrypt/mcrypt.c:
+  - Port mcrypt_create_iv to windows (aka fix it on windows)
+
+* ext/dom/config.w32
+  ext/libxml/config.w32:
+  - MFB: do not enable libxml or dom when a dep/header/lib is missing
+
+2008-07-15  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  main/streams/streams.c:
+  MFH: Fixed potentially confusing error message on failure when no errors
+  are logged
+
+2008-07-15  Scott MacVicar  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/string.c
+  ext/standard/string.c
+  ext/standard/tests/strings/strip_tags_variation11.phpt
+  ext/standard/tests/strings/strip_tags_variation11.phpt:
+  MFH: Fix bug when  is used within attribute.
+
+* ext/standard/string.c
+  ext/standard/tests/strings/strip_tags_variation11.phpt
+  ext/standard/tests/strings/strip_tags_variation11.phpt
+  ext/standard/tests/strings/strip_tags_variation11.phpt:
+  Fix bug when  is used within attribute.
+
+2008-07-15  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  sapi/cgi/cgi_main.c
+  sapi/cgi/cgi_main.c
+  sapi/cgi/cgi_main.c:
+  Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots))
+
+2008-07-15  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  Fix news
+
+2008-07-15  Andrey Hristov  [EMAIL PROTECTED]
+
+* ext/mysql/php_mysql.c
+  ext/mysql/php_mysql.c
+  ext/mysqli/mysqli.c
+  ext/mysqli/mysqli.c
+  ext/mysqlnd/mysqlnd.c
+  ext/mysqlnd/mysqlnd.c
+  ext/mysqlnd/mysqlnd_palloc.c
+  ext/mysqlnd/mysqlnd_palloc.c
+  ext/mysqlnd/mysqlnd_ps.c
+  ext/mysqlnd/mysqlnd_ps.c
+  ext/mysqlnd/mysqlnd_wireprotocol.c
+  ext/mysqlnd/mysqlnd_wireprotocol.c:
+  Sync with bzr
+
+2008-07-15  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  sapi/cgi/cgi_main.c
+  sapi/cgi/cgi_main.c
+  sapi/cgi/cgi_main.c
+  sapi/cgi/fastcgi.c
+  sapi/cgi/fastcgi.c
+  sapi/cgi/fastcgi.c:
+  Fixed bug #45423 (fastcgi parent process doesn't invoke 
php_module_shutdown
+  before shutdown) (basant dot kukreja at sun dot com)
+
+2008-07-15  Felipe Pena  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/sockets/sockets.c:
+  - Reverted fix for #44197 (unsuitable for minor versions)
+
+2008-07-15  Felix De Vliegher  [EMAIL PROTECTED]
+
+* ext/standard/tests/strings/strpbrk_basic.phpt
+  ext/standard/tests/strings/strpbrk_error.phpt:
+  MFB: Tests for strpbrk(), testfest.php.net task #91 and #92.
+
+* ext/standard/tests/strings/strpbrk_basic.phpt
+  ext/standard/tests/strings/strpbrk_basic.phpt
+  ext/standard/tests/strings/strpbrk_error.phpt
+  ext/standard/tests/strings/strpbrk_error.phpt:
+  
+  file strpbrk_basic.phpt was initially added on branch PHP_5_3.
+
+2008-07-15  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/openssl/tests/002.phpt
+  ext/openssl/tests/002.phpt:
+  fix test
+
+2008-07-15  Lars Strojny  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  main/output.c:
+  Return null on when param parsing errors occur
+
+* (PHP_5_3)
+  main/output.c:
+  New parameter parsing API
+
+* tests/lang/033.phpt:
+  Merging from 5_3
+
+* (PHP_5_3)
+  tests/lang/033.phpt:
+  Reenabling the test but removing the test cases for old_function as the
+  alternative syntaxes are still there
+
+2008-07-15  Henrique do Nascimento Angelo  [EMAIL PROTECTED]
+
+* ext/openssl/openssl.c
+  ext/openssl/openssl.c
+  

[PHP-CVS] cvs: php-src(PHP_5_3) /tests/lang 033.phpt

2008-07-15 Thread Lars Strojny
lstrojnyTue Jul 15 08:34:18 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/tests/lang 033.phpt 
  Log:
  Reenabling the test but removing the test cases for old_function as the 
alternative syntaxes are still there
  
  
http://cvs.php.net/viewvc.cgi/php-src/tests/lang/033.phpt?r1=1.2r2=1.2.8.1diff_format=u
Index: php-src/tests/lang/033.phpt
diff -u php-src/tests/lang/033.phpt:1.2 php-src/tests/lang/033.phpt:1.2.8.1
--- php-src/tests/lang/033.phpt:1.2 Sat Nov 23 22:08:05 2002
+++ php-src/tests/lang/033.phpt Tue Jul 15 08:34:18 2008
@@ -1,7 +1,5 @@
 --TEST--
 Alternative syntaxes test
---SKIPIF--
-?php if(version_compare(zend_version(), 2.0.0-dev, '=')) echo skip 
removed in Zend Engine 2\n; ?
 --FILE--
 ?php
 $a = 1;
@@ -38,16 +36,12 @@
echo 0;
break;
 endswitch;
-
-echo \nold_function: ;
-old_function foo $bar, $baz (
-   return sprintf(foo(%s, %s);\n, $bar, $baz);
-);
-echo foo(1,2);
 ?
+
+===DONE===
 --EXPECT--
 If: 11
 While: 12346789
 For: 0123401234
 Switch: 1
-old_function: foo(1, 2);
+===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_3) /main output.c

2008-07-15 Thread Lars Strojny
lstrojnyTue Jul 15 08:50:04 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   output.c 
  Log:
  New parameter parsing API
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.3r2=1.167.2.3.2.4.2.4diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.4.2.3 
php-src/main/output.c:1.167.2.3.2.4.2.4
--- php-src/main/output.c:1.167.2.3.2.4.2.3 Mon Mar 10 22:12:33 2008
+++ php-src/main/output.c   Tue Jul 15 08:50:04 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.167.2.3.2.4.2.3 2008/03/10 22:12:33 felipe Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.4.2.4 2008/07/15 08:50:04 lstrojny Exp $ */
 
 #include php.h
 #include ext/standard/head.h
@@ -999,24 +999,12 @@
Turn implicit flush on/off and is equivalent to calling flush() after every 
output call */
 PHP_FUNCTION(ob_implicit_flush)
 {
-   zval **zv_flag;
-   int flag;
+   long flag = 1;
 
-   switch(ZEND_NUM_ARGS()) {
-   case 0:
-   flag = 1;
-   break;
-   case 1:
-   if (zend_get_parameters_ex(1, zv_flag)==FAILURE) {
-   RETURN_FALSE;
-   }
-   convert_to_long_ex(zv_flag);
-   flag = Z_LVAL_PP(zv_flag);
-   break;
-   default:
-   ZEND_WRONG_PARAM_COUNT();
-   break;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, flag) == 
FAILURE) {
+   RETURN_FALSE;
}
+
if (flag) {
php_start_implicit_flush(TSRMLS_C);
} else {



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



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

2008-07-15 Thread Lars Strojny
lstrojnyTue Jul 15 09:09:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   output.c 
  Log:
  Return null on when param parsing errors occur
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.4r2=1.167.2.3.2.4.2.5diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.4.2.4 
php-src/main/output.c:1.167.2.3.2.4.2.5
--- php-src/main/output.c:1.167.2.3.2.4.2.4 Tue Jul 15 08:50:04 2008
+++ php-src/main/output.c   Tue Jul 15 09:09:09 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.167.2.3.2.4.2.4 2008/07/15 08:50:04 lstrojny Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.4.2.5 2008/07/15 09:09:09 lstrojny Exp $ */
 
 #include php.h
 #include ext/standard/head.h
@@ -738,15 +738,14 @@
zval *output_handler=NULL;
long chunk_size=0;
zend_bool erase=1;
-   int argc = ZEND_NUM_ARGS();
-   
-   if (zend_parse_parameters(argc TSRMLS_CC, |zlb, output_handler, 
chunk_size, erase) == FAILURE) {
-   RETURN_FALSE;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |zlb, 
output_handler, chunk_size, erase) == FAILURE) {
+   return;
}
 
if (chunk_size  0)
chunk_size = 0;
-   
+
if (php_start_ob_buffer(output_handler, chunk_size, erase 
TSRMLS_CC)==FAILURE) {
RETURN_FALSE;
}
@@ -965,12 +964,12 @@
Return the status of the active or all output buffers */
 PHP_FUNCTION(ob_get_status)
 {
-   int argc = ZEND_NUM_ARGS();
zend_bool full_status = 0;
-   
-   if (zend_parse_parameters(argc TSRMLS_CC, |b, full_status) == 
FAILURE )
-   RETURN_FALSE;
-   
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, 
full_status) == FAILURE ) {
+   return;
+   }
+
array_init(return_value);
 
if (full_status) {
@@ -1002,7 +1001,7 @@
long flag = 1;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, flag) == 
FAILURE) {
-   RETURN_FALSE;
+   return;
}
 
if (flag) {
@@ -1053,7 +1052,7 @@
int name_len, value_len;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, name, 
name_len, value, value_len) == FAILURE) {
-   RETURN_FALSE;
+   return;
}
 
if (php_url_scanner_add_var(name, name_len, value, value_len, 1 
TSRMLS_CC) == SUCCESS) {



-- 
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/openssl/tests 002.phpt

2008-07-15 Thread Antony Dovgal
tony2001Tue Jul 15 09:14:28 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/openssl/tests  002.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/002.phpt?r1=1.1.2.2r2=1.1.2.2.4.1diff_format=u
Index: php-src/ext/openssl/tests/002.phpt
diff -u php-src/ext/openssl/tests/002.phpt:1.1.2.2 
php-src/ext/openssl/tests/002.phpt:1.1.2.2.4.1
--- php-src/ext/openssl/tests/002.phpt:1.1.2.2  Wed Aug 30 20:50:03 2006
+++ php-src/ext/openssl/tests/002.phpt  Tue Jul 15 09:14:28 2008
@@ -18,7 +18,7 @@
 echo Done\n;
 ?
 --EXPECTF--
-Warning: openssl_seal(): not a public key (0th member of pubkeys) in %s on 
line %d
+Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on 
line %d
 bool(false)
 
 Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty 
array in %s on line %d



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



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

2008-07-15 Thread Antony Dovgal
tony2001Tue Jul 15 09:14:54 2008 UTC

  Modified files:  
/php-src/ext/openssl/tests  002.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/tests/002.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/openssl/tests/002.phpt
diff -u php-src/ext/openssl/tests/002.phpt:1.2 
php-src/ext/openssl/tests/002.phpt:1.3
--- php-src/ext/openssl/tests/002.phpt:1.2  Tue May 27 13:54:30 2008
+++ php-src/ext/openssl/tests/002.phpt  Tue Jul 15 09:14:54 2008
@@ -18,7 +18,7 @@
 echo Done\n;
 ?
 --EXPECTF--
-Warning: openssl_seal(): not a public key (0th member of pubkeys) in %s on 
line %d
+Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on 
line %d
 bool(false)
 
 Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty 
array in %s on line %d



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl/tests spl_autoload_003.phpt

2008-07-15 Thread Marcus Boerger
Hello Antony,

  damn, now you ruined the show :-)

marcus

Monday, July 14, 2008, 12:39:58 PM, you wrote:

 On 14.07.2008 01:44, Marcus Boerger wrote:
 helly Sun Jul 13 21:44:38 2008 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/spl/testsspl_autoload_003.phpt 
   Log:
   - MFH Fix test

 There is a also a leak in ext/spl/tests/iterator_041b.phpt:

 ==11319== 64 bytes in 2 blocks are definitely lost in loss record 1 of 1
 ==11319==at 0x4C23612: malloc (vg_replace_malloc.c:207)
 ==11319==by 0x5B523E: _emalloc (zend_alloc.c:2281)
 ==11319==by 0x61E5D8: ZEND_THROW_SPEC_VAR_HANDLER (zend_vm_execute.h:8036)
 ==11319==by 0x606EDE: execute (zend_vm_execute.h:104)
 ==11319==by 0x5CA5BD: zend_call_function (zend_execute_API.c:1109)
 ==11319==by 0x5F438D: zend_call_method (zend_interfaces.c:88)
 ==11319==by 0x5FF733: zend_objects_destroy_object (zend_objects.c:101)
 ==11319==by 0x6044EA: zend_objects_store_del_ref_by_handle 
 (zend_objects_API.c:202)
 ==11319==by 0x60434C: zend_objects_store_del_ref (zend_objects_API.c:171)
 ==11319==by 0x5D7559: _zval_dtor_func (zend_variables.c:52)
 ==11319==by 0x5C71C2: _zval_dtor (zend_variables.h:35)
 ==11319==by 0x5C746D: _zval_ptr_dtor (zend_execute_API.c:426)
 ==11319==by 0x6076DA: zend_vm_stack_clear_multiple (zend_execute.h:277)
 ==11319==by 0x608213: zend_do_fcall_common_helper_SPEC 
 (zend_vm_execute.h:407)
 ==11319==by 0x608993: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER 
 (zend_vm_execute.h:422)
 ==11319==by 0x606EDE: execute (zend_vm_execute.h:104)
 ==11319==by 0x5D9E04: zend_execute_scripts (zend.c:1198)
 ==11319==by 0x566F7A: php_execute_script (main.c:2082)
 ==11319==by 0x6762DA: main (php_cli.c:1139)

 -- 
 Wbr, 
 Antony Dovgal




Best regards,
 Marcus


-- 
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/tests/strings strpbrk_basic.phpt strpbrk_error.phpt

2008-07-15 Thread Felix De Vliegher
felixdv Tue Jul 15 11:14:42 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings strpbrk_basic.phpt 
strpbrk_error.phpt 
  Log:
  Tests for strpbrk(), testfest.php.net task #91 and #92.
  
  

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

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



-- 
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 strpbrk_basic.phpt strpbrk_error.phpt

2008-07-15 Thread Felix De Vliegher
felixdv Tue Jul 15 11:15:32 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/strings strpbrk_basic.phpt 
strpbrk_error.phpt 
  Log:
  MFB: Tests for strpbrk(), testfest.php.net task #91 and #92.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strpbrk_basic.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/strpbrk_basic.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/strpbrk_basic.phpt:1.2
--- /dev/null   Tue Jul 15 11:15:32 2008
+++ php-src/ext/standard/tests/strings/strpbrk_basic.phpt   Tue Jul 15 
11:15:32 2008
@@ -0,0 +1,41 @@
+--TEST--
+Test strpbrk() function : basic functionality 
+--FILE--
+?php
+/* Prototype  : array strpbrk(string haystack, string char_list)
+ * Description: Search a string for any of a set of characters 
+ * Source code: ext/standard/string.c
+ * Alias to functions: 
+ */
+
+echo *** Testing strpbrk() : basic functionality ***\n;
+
+// Initialise all required variables
+$text = 'This is a Simple text.';
+var_dump( strpbrk($text, 'mi') );
+var_dump( strpbrk($text, 'ZS') );
+var_dump( strpbrk($text, 'Z') );
+var_dump( strpbrk($text, 'H') );
+
+$text = '';
+var_dump( strpbrk($text, 'foo') );
+
+$text =   aaa aaaSLR;
+var_dump( strpbrk($text, ' ') );
+
+var_dump( strpbrk(5, 5) );
+var_dump( strpbrk(5, 5) );
+
+?
+===DONE===
+--EXPECT--
+*** Testing strpbrk() : basic functionality ***
+unicode(20) is is a Simple text.
+unicode(12) Simple text.
+bool(false)
+bool(false)
+bool(false)
+unicode(12)   aaa aaaSLR
+unicode(1) 5
+unicode(1) 5
+===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strpbrk_error.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/strpbrk_error.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/strpbrk_error.phpt:1.2
--- /dev/null   Tue Jul 15 11:15:32 2008
+++ php-src/ext/standard/tests/strings/strpbrk_error.phpt   Tue Jul 15 
11:15:32 2008
@@ -0,0 +1,57 @@
+--TEST--
+Test strpbrk() function : error conditions 
+--FILE--
+?php
+/* Prototype  : array strpbrk(string haystack, string char_list)
+ * Description: Search a string for any of a set of characters 
+ * Source code: ext/standard/string.c
+ * Alias to functions: 
+ */
+
+echo *** Testing strpbrk() : error conditions ***\n;
+
+$haystack = 'This is a Simple text.';
+$char_list = 'string_val';
+$extra_arg = 10;
+
+echo \n-- Testing strpbrk() function with more than expected no. of arguments 
--\n;
+var_dump( strpbrk($haystack, $char_list, $extra_arg) );
+
+echo \n-- Testing strpbrk() function with less than expected no. of arguments 
--\n;
+var_dump( strpbrk($haystack) );
+
+echo \n-- Testing strpbrk() function with empty second argument --\n;
+var_dump( strpbrk($haystack, '') );
+
+echo \n-- Testing strpbrk() function with arrays --\n;
+var_dump( strpbrk($haystack, array('a', 'b', 'c') ) );
+var_dump( strpbrk(array('foo', 'bar'), 'b') );
+
+?
+===DONE===
+--EXPECTF--
+*** Testing strpbrk() : error conditions ***
+
+-- Testing strpbrk() function with more than expected no. of arguments --
+
+Warning: strpbrk() expects exactly 2 parameters, 3 given in %s on line %d
+bool(false)
+
+-- Testing strpbrk() function with less than expected no. of arguments --
+
+Warning: strpbrk() expects exactly 2 parameters, 1 given in %s on line %d
+bool(false)
+
+-- Testing strpbrk() function with empty second argument --
+
+Warning: strpbrk(): The character list cannot be empty in %s on line %d
+bool(false)
+
+-- Testing strpbrk() function with arrays --
+
+Warning: strpbrk() expects parameter 2 to be string (Unicode or binary), array 
given in %s on line %d
+bool(false)
+
+Warning: strpbrk() expects parameter 1 to be string (Unicode or binary), array 
given 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: php-src(PHP_5_2) /ext/sockets sockets.c

2008-07-15 Thread Felipe Pena
felipe  Tue Jul 15 11:20:06 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/socketssockets.c 
  Log:
  - Reverted fix for #44197 (unsuitable for minor versions)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.17r2=1.171.2.9.2.18diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.17 
php-src/ext/sockets/sockets.c:1.171.2.9.2.18
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.17Thu Feb 21 02:39:43 2008
+++ php-src/ext/sockets/sockets.c   Tue Jul 15 11:20:06 2008
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.17 2008/02/21 02:39:43 felipe Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.18 2008/07/15 11:20:06 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -584,10 +584,7 @@
zval**dest_element;
php_socket  *php_sock;
HashTable   *new_hash;
-   char*key;
int num = 0;
-   ulong   num_key;
-   uintkey_len;
 
if (Z_TYPE_P(sock_array) != IS_ARRAY) return 0;
 
@@ -602,14 +599,8 @@
 
if (PHP_SAFE_FD_ISSET(php_sock-bsd_socket, fds)) {
/* Add fd to new array */
-   switch 
(zend_hash_get_current_key_ex(Z_ARRVAL_P(sock_array), key, key_len, num_key, 
0, NULL)) {
-   case HASH_KEY_IS_STRING:
-   zend_hash_add(new_hash, key, key_len, 
(void *)element, sizeof(zval *), (void **)dest_element);
-   break;
-   case HASH_KEY_IS_LONG:
-   zend_hash_index_update(new_hash, 
num_key, (void *)element, sizeof(zval *), (void **)dest_element);
-   break;
-   }
+   zend_hash_next_index_insert(new_hash, (void *)element, 
sizeof(zval *), (void **)dest_element);
+
if (dest_element) zval_add_ref(dest_element);
}
num++;



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



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

2008-07-15 Thread Hannes Magnusson
On Tue, Jul 15, 2008 at 11:09, Lars Strojny [EMAIL PROTECTED] wrote:
 lstrojnyTue Jul 15 09:09:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   output.c
  Log:
  Return null on when param parsing errors occur

Why?
I see no point in breaking bc just to break it.
Admittedly its not a major issue, but it is still completely pointless.

-Hannes

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



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

2008-07-15 Thread Dmitry Stogov
dmitry  Tue Jul 15 13:10:07 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/sapi/cgi   cgi_main.c fastcgi.c 
  Log:
  Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown 
before shutdown) (basant dot kukreja at sun dot com)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1171r2=1.2027.2.547.2.1172diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1171 php-src/NEWS:1.2027.2.547.2.1172
--- php-src/NEWS:1.2027.2.547.2.1171Sat Jul 12 21:14:57 2008
+++ php-src/NEWSTue Jul 15 13:10:07 2008
@@ -13,6 +13,8 @@
   accept lengths of 1024). (Felipe, andrew at lifescale dot com)
 - Fixed bug #45449 (filesize() regression using ftp wrapper). 
   (crrodriguez at suse dot de)
+- Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown
+  before shutdown) (basant dot kukreja at sun dot com)
 - Fixed bug #45352 (Segmentation fault because of tick function on second
   request). (Dmitry)
 - Fixed bug #45312 (Segmentation fault on second request for array functions).
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.56r2=1.267.2.15.2.57diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.56 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.57
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.56 Wed Apr  9 09:16:40 2008
+++ php-src/sapi/cgi/cgi_main.c Tue Jul 15 13:10:07 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.56 2008/04/09 09:16:40 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.57 2008/07/15 13:10:07 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -103,6 +103,12 @@
  */
 static int parent = 1;
 
+/* Did parent received exit signals SIG_TERM/SIG_INT/SIG_QUIT */
+static int exit_signal = 0;
+
+/* Is Parent waiting for children to exit */
+static int parent_waiting = 0;
+
 /**
  * Process group
  */
@@ -1135,7 +1141,7 @@
 }
 /* }}} */
 
-#if PHP_FASTCGI
+#if PHP_FASTCGI  !defined(PHP_WIN32)
 /**
  * Clean up child processes upon exit
  */
@@ -1145,15 +1151,16 @@
fprintf(stderr, FastCGI shutdown, pid %d\n, getpid());
 #endif
 
-#ifndef PHP_WIN32
sigaction(SIGTERM, old_term, 0);
 
/* Kill all the processes in our process group */
kill(-pgroup, SIGTERM);
-#endif
 
-   /* We should exit at this point, but MacOSX doesn't seem to */
-   exit(0);
+   if (parent  parent_waiting) {
+   exit_signal = 1;
+   } else {
+   exit(0);
+   }
 }
 #endif
 
@@ -1520,7 +1527,7 @@
}
 
if (fcgi_in_shutdown()) {
-   exit(0);
+   goto parent_out;
}
 
while (parent) {
@@ -1557,9 +1564,25 @@
 #ifdef DEBUG_FASTCGI
fprintf(stderr, Wait for kids, pid %d\n, 
getpid());
 #endif
-   while (wait(status)  0) {
+   parent_waiting = 1;
+   while (1) {
+   if (wait(status) = 0) {
+   running--;
+   break;
+   } else if (exit_signal) {
+   break;
+   }   

+   }
+   if (exit_signal) {
+#if 0
+   while (running  0) {
+   while (wait(status)  0) {
+   }
+   running--;
+   }
+#endif
+   goto parent_out;
}
-   running--;
}
}
} else {
@@ -2061,6 +2084,10 @@
}
 #endif
 
+#ifndef PHP_WIN32
+parent_out:
+#endif
+
SG(server_context) = NULL;
php_module_shutdown(TSRMLS_C);
sapi_shutdown();
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.30r2=1.4.2.13.2.31diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.30 
php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.31
--- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.30Thu Apr  3 10:24:44 2008
+++ php-src/sapi/cgi/fastcgi.c  Tue Jul 15 13:10:07 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.4.2.13.2.30 2008/04/03 10:24:44 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.31 2008/07/15 13:10:07 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -170,6 +170,20 @@
}
 }
 
+static void 

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

2008-07-15 Thread Dmitry Stogov
dmitry  Tue Jul 15 13:10:42 2008 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c fastcgi.c 
  Log:
  Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown 
before shutdown) (basant dot kukreja at sun dot com)
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.356r2=1.357diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.356 php-src/sapi/cgi/cgi_main.c:1.357
--- php-src/sapi/cgi/cgi_main.c:1.356   Mon Jun 23 11:38:10 2008
+++ php-src/sapi/cgi/cgi_main.c Tue Jul 15 13:10:42 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.356 2008/06/23 11:38:10 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.357 2008/07/15 13:10:42 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -101,6 +101,12 @@
  */
 static int parent = 1;
 
+/* Did parent received exit signals SIG_TERM/SIG_INT/SIG_QUIT */
+static int exit_signal = 0;
+
+/* Is Parent waiting for children to exit */
+static int parent_waiting = 0;
+
 /**
  * Process group
  */
@@ -1235,6 +1241,7 @@
 }
 /* }}} */
 
+#ifndef PHP_WIN32
 /**
  * Clean up child processes upon exit
  */
@@ -1244,16 +1251,18 @@
fprintf(stderr, FastCGI shutdown, pid %d\n, getpid());
 #endif
 
-#ifndef PHP_WIN32
sigaction(SIGTERM, old_term, 0);
 
/* Kill all the processes in our process group */
kill(-pgroup, SIGTERM);
-#endif
 
-   /* We should exit at this point, but MacOSX doesn't seem to */
-   exit(0);
+   if (parent  parent_waiting) {
+   exit_signal = 1;
+   } else {
+   exit(0);
+   }
 }
+#endif
 
 PHP_INI_BEGIN()
STD_PHP_INI_ENTRY(cgi.rfc2616_headers, 0,  PHP_INI_ALL,
OnUpdateBool,   rfc2616_headers, php_cgi_globals_struct, php_cgi_globals)
@@ -1596,7 +1605,7 @@
}
 
if (fcgi_in_shutdown()) {
-   exit(0);
+   goto parent_out;
}
 
while (parent) {
@@ -1633,9 +1642,25 @@
 #ifdef DEBUG_FASTCGI
fprintf(stderr, Wait for kids, pid %d\n, 
getpid());
 #endif
-   while (wait(status)  0) {
+   parent_waiting = 1;
+   while (1) {
+   if (wait(status) = 0) {
+   running--;
+   break;
+   } else if (exit_signal) {
+   break;
+   }   

+   }
+   if (exit_signal) {
+#if 0
+   while (running  0) {
+   while (wait(status)  0) {
+   }
+   running--;
+   }
+#endif
+   goto parent_out;
}
-   running--;
}
}
} else {
@@ -2098,6 +2123,10 @@
 #endif
}
 
+#ifndef PHP_WIN32
+parent_out:
+#endif
+
SG(server_context) = NULL;
php_module_shutdown(TSRMLS_C);
sapi_shutdown();
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.45r2=1.46diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.45 php-src/sapi/cgi/fastcgi.c:1.46
--- php-src/sapi/cgi/fastcgi.c:1.45 Thu Apr  3 10:25:08 2008
+++ php-src/sapi/cgi/fastcgi.c  Tue Jul 15 13:10:42 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.45 2008/04/03 10:25:08 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.46 2008/07/15 13:10:42 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -170,6 +170,20 @@
}
 }
 
+static void fcgi_setup_signals(void)
+{
+   struct sigaction new_sa, old_sa;
+
+   sigemptyset(new_sa.sa_mask);
+   new_sa.sa_flags = 0;
+   new_sa.sa_handler = fcgi_signal_handler;
+   sigaction(SIGUSR1, new_sa, NULL);
+   sigaction(SIGTERM, new_sa, NULL);
+   sigaction(SIGPIPE, NULL, old_sa);
+   if (old_sa.sa_handler == SIG_DFL) {
+   sigaction(SIGPIPE, new_sa, NULL);
+   }
+}
 #endif
 
 int fcgi_in_shutdown(void)
@@ -229,18 +243,7 @@
is_initialized = 1;
errno = 0;
if (getpeername(0, (struct sockaddr *)sa, len) != 0  errno 
== ENOTCONN) {
-   struct sigaction new_sa, old_sa;
-
-   sigemptyset(new_sa.sa_mask);
-   new_sa.sa_flags = 0;
-   new_sa.sa_handler = 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysql php_mysql.c /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c mysqlnd_wireprotocol.c

2008-07-15 Thread Andrey Hristov
andrey  Tue Jul 15 13:11:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli mysqli.c 
/php-src/ext/mysqlndmysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c 
mysqlnd_wireprotocol.c 
  Log:
  Sync with bzr
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.20r2=1.213.2.6.2.16.2.21diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.20 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.21
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.20   Tue Jun 24 22:22:48 2008
+++ php-src/ext/mysql/php_mysql.c   Tue Jul 15 13:11:08 2008
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.20 2008/06/24 22:22:48 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.21 2008/07/15 13:11:08 andrey Exp $ */
 
 /* TODO:
  *
@@ -687,6 +687,8 @@
client_flags ^= CLIENT_LOCAL_FILES;
}
 
+   client_flags = ~CLIENT_MULTI_STATEMENTS;   /* don't allow 
multi_queries via connect parameter */
+
hashed_details_length = spprintf(hashed_details, 0, 
mysql_%s_%s_%s_%ld, SAFE_STRING(host_and_port), SAFE_STRING(user), 
SAFE_STRING(passwd), client_flags);
}
 
@@ -738,7 +740,7 @@
/* create the link */
mysql = (php_mysql_conn *) 
malloc(sizeof(php_mysql_conn));
mysql-active_result_id = 0;
-   mysql-multi_query = 1;
+   mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
 #ifndef MYSQL_USE_MYSQLND
mysql-conn = mysql_init(NULL);
 #else
@@ -786,7 +788,7 @@
}
mysql = (php_mysql_conn *) le-ptr;
mysql-active_result_id = 0;
-   mysql-multi_query = 1;
+   mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
/* ensure that the link did not die */
if (mysql_ping(mysql-conn)) {
if (mysql_errno(mysql-conn) == 2006) {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.17.2.26r2=1.72.2.16.2.17.2.27diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.26 
php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.27
--- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.26 Tue Jun 24 22:22:48 2008
+++ php-src/ext/mysqli/mysqli.c Tue Jul 15 13:11:09 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli.c,v 1.72.2.16.2.17.2.26 2008/06/24 22:22:48 andrey Exp $ 
+  $Id: mysqli.c,v 1.72.2.16.2.17.2.27 2008/07/15 13:11:09 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -893,6 +893,12 @@
 #endif
 #endif
 
+   REGISTER_LONG_CONSTANT(MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED, 
SERVER_QUERY_NO_GOOD_INDEX_USED, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(MYSQLI_SERVER_QUERY_NO_INDEX_USED, 
SERVER_QUERY_NO_INDEX_USED, CONST_CS | CONST_PERSISTENT);
+#ifdef SERVER_QUERY_WAS_SLOW
+   REGISTER_LONG_CONSTANT(MYSQLI_SERVER_QUERY_WAS_SLOW, 
SERVER_QUERY_WAS_SLOW, CONST_CS | CONST_PERSISTENT);
+#endif
+
return SUCCESS;
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.23r2=1.5.2.24diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.23 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.24
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.23  Tue Jun 24 22:22:48 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Tue Jul 15 13:11:09 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.23 2008/06/24 22:22:48 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.24 2008/07/15 13:11:09 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -467,7 +467,6 @@
DBG_ENTER(_mysqlnd_end_psession);
/* The thd zval cache is always freed on request shutdown, so this has 
happened already */
mysqlnd_palloc_free_thd_cache_reference(conn-zval_cache);
-   conn-zval_cache = NULL;
DBG_VOID_RETURN;
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_palloc.c?r1=1.2.2.11r2=1.2.2.12diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_palloc.c
diff -u php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.11 
php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.12
--- php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.11   Tue Jun 24 22:22:48 2008
+++ php-src/ext/mysqlnd/mysqlnd_palloc.cTue Jul 15 13:11:09 2008
@@ -18,7 +18,7 @@
   

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

2008-07-15 Thread Dmitry Stogov
dmitry  Tue Jul 15 13:11:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/sapi/cgi   cgi_main.c fastcgi.c 
  Log:
  Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown 
before shutdown) (basant dot kukreja at sun dot com)
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.50.2.19r2=1.267.2.15.2.50.2.20diff_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.19 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.20
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.19Mon Jun 23 11:37:50 2008
+++ php-src/sapi/cgi/cgi_main.c Tue Jul 15 13:11:19 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.19 2008/06/23 11:37:50 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.20 2008/07/15 13:11:19 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -101,6 +101,12 @@
  */
 static int parent = 1;
 
+/* Did parent received exit signals SIG_TERM/SIG_INT/SIG_QUIT */
+static int exit_signal = 0;
+
+/* Is Parent waiting for children to exit */
+static int parent_waiting = 0;
+
 /**
  * Process group
  */
@@ -1225,6 +1231,7 @@
 }
 /* }}} */
 
+#ifndef PHP_WIN32
 /**
  * Clean up child processes upon exit
  */
@@ -1234,16 +1241,18 @@
fprintf(stderr, FastCGI shutdown, pid %d\n, getpid());
 #endif
 
-#ifndef PHP_WIN32
sigaction(SIGTERM, old_term, 0);
 
/* Kill all the processes in our process group */
kill(-pgroup, SIGTERM);
-#endif
 
-   /* We should exit at this point, but MacOSX doesn't seem to */
-   exit(0);
+   if (parent  parent_waiting) {
+   exit_signal = 1;
+   } else {
+   exit(0);
+   }
 }
+#endif
 
 PHP_INI_BEGIN()
STD_PHP_INI_ENTRY(cgi.rfc2616_headers, 0,  PHP_INI_ALL,
OnUpdateBool,   rfc2616_headers, php_cgi_globals_struct, php_cgi_globals)
@@ -1585,7 +1594,7 @@
}
 
if (fcgi_in_shutdown()) {
-   exit(0);
+   goto parent_out;
}
 
while (parent) {
@@ -1622,9 +1631,25 @@
 #ifdef DEBUG_FASTCGI
fprintf(stderr, Wait for kids, pid %d\n, 
getpid());
 #endif
-   while (wait(status)  0) {
+   parent_waiting = 1;
+   while (1) {
+   if (wait(status) = 0) {
+   running--;
+   break;
+   } else if (exit_signal) {
+   break;
+   }   

+   }
+   if (exit_signal) {
+#if 0
+   while (running  0) {
+   while (wait(status)  0) {
+   }
+   running--;
+   }
+#endif
+   goto parent_out;
}
-   running--;
}
}
} else {
@@ -2092,6 +2117,10 @@
 #endif
}
 
+#ifndef PHP_WIN32
+parent_out:
+#endif
+
SG(server_context) = NULL;
php_module_shutdown(TSRMLS_C);
sapi_shutdown();
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.28.2.3r2=1.4.2.13.2.28.2.4diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.28.2.3 
php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.28.2.4
--- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.28.2.3Thu Apr  3 10:24:58 2008
+++ php-src/sapi/cgi/fastcgi.c  Tue Jul 15 13:11:19 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.4.2.13.2.28.2.3 2008/04/03 10:24:58 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.28.2.4 2008/07/15 13:11:19 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -170,6 +170,20 @@
}
 }
 
+static void fcgi_setup_signals(void)
+{
+   struct sigaction new_sa, old_sa;
+
+   sigemptyset(new_sa.sa_mask);
+   new_sa.sa_flags = 0;
+   new_sa.sa_handler = fcgi_signal_handler;
+   sigaction(SIGUSR1, new_sa, NULL);
+   sigaction(SIGTERM, new_sa, NULL);
+   sigaction(SIGPIPE, NULL, old_sa);
+   if (old_sa.sa_handler == SIG_DFL) {
+   sigaction(SIGPIPE, new_sa, NULL);
+   }
+}
 #endif
 
 int fcgi_in_shutdown(void)
@@ -224,18 +238,7 @@
is_initialized = 1;
errno = 0;
if (getpeername(0, (struct sockaddr *)sa, len) != 0  errno 
== 

[PHP-CVS] cvs: php-src /ext/mysql php_mysql.c /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c mysqlnd_wireprotocol.c

2008-07-15 Thread Andrey Hristov
andrey  Tue Jul 15 13:12:27 2008 UTC

  Modified files:  
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli mysqli.c 
/php-src/ext/mysqlndmysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c 
mysqlnd_wireprotocol.c 
  Log:
  Sync with bzr
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.259r2=1.260diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.259 php-src/ext/mysql/php_mysql.c:1.260
--- php-src/ext/mysql/php_mysql.c:1.259 Tue Jun 24 11:19:07 2008
+++ php-src/ext/mysql/php_mysql.c   Tue Jul 15 13:12:27 2008
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.259 2008/06/24 11:19:07 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.260 2008/07/15 13:12:27 andrey Exp $ */
 
 /* TODO:
  *
@@ -514,6 +514,18 @@
 }
 /* }}} */
 
+
+#ifdef MYSQL_USE_MYSQLND
+static int php_mysql_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC)
+{
+   if (le-type == le_plink) {
+   mysqlnd_end_psession(((php_mysql_conn *) le-ptr)-conn);
+   }
+   return ZEND_HASH_APPLY_KEEP;
+} /* }}} */
+#endif
+
+
 /* {{{ PHP_RSHUTDOWN_FUNCTION
  */
 PHP_RSHUTDOWN_FUNCTION(mysql)
@@ -531,7 +543,9 @@
if (MySG(connect_error)!=NULL) {
efree(MySG(connect_error));
}
+
 #ifdef MYSQL_USE_MYSQLND
+   zend_hash_apply(EG(persistent_list), (apply_func_t) 
php_mysql_persistent_helper TSRMLS_CC);
mysqlnd_palloc_rshutdown(MySG(mysqlnd_thd_zval_cache));
 #endif
 
@@ -572,6 +586,7 @@
}
}
 #endif
+
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -644,7 +659,7 @@
passwd = MySG(default_password);

/* mysql_pconnect does not support new_link parameter */
-   if (persistent) {   
+   if (persistent) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
|sssl, host_and_port, host_len, UG(utf8_conv),
user, 
user_len, UG(utf8_conv), passwd, passwd_len, UG(utf8_conv),

client_flags)==FAILURE) {
@@ -663,6 +678,8 @@
client_flags ^= CLIENT_LOCAL_FILES;
}
 
+   client_flags = ~CLIENT_MULTI_STATEMENTS;   /* don't allow 
multi_queries via connect parameter */
+
hashed_details_length = spprintf(hashed_details, 0, 
mysql_%s_%s_%s_%ld, SAFE_STRING(host_and_port), SAFE_STRING(user), 
SAFE_STRING(passwd), client_flags);
}
 
@@ -714,7 +731,7 @@
/* create the link */
mysql = (php_mysql_conn *) 
malloc(sizeof(php_mysql_conn));
mysql-active_result_id = 0;
-   mysql-multi_query = 1;
+   mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
 #ifndef MYSQL_USE_MYSQLND
mysql-conn = mysql_init(NULL);
 #else
@@ -724,8 +741,9 @@
mysql_options(mysql-conn, 
MYSQL_SET_CHARSET_NAME, utf8);
}
 
-   if (connect_timeout != -1)
+   if (connect_timeout != -1) {
mysql_options(mysql-conn, 
MYSQL_OPT_CONNECT_TIMEOUT, (const char *)connect_timeout);
+   }
 #ifndef MYSQL_USE_MYSQLND
if (mysql_real_connect(mysql-conn, host, user, passwd, 
NULL, port, socket, client_flags)==NULL)
 #else
@@ -778,6 +796,7 @@
}
mysql = (php_mysql_conn *) le-ptr;
mysql-active_result_id = 0;
+   mysql-multi_query = client_flags  
CLIENT_MULTI_STATEMENTS? 1:0;
/* ensure that the link did not die */
if (mysql_ping(mysql-conn)) {
if (mysql_errno(mysql-conn) == 2006) {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.129r2=1.130diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.129 php-src/ext/mysqli/mysqli.c:1.130
--- php-src/ext/mysqli/mysqli.c:1.129   Tue Mar 18 17:32:03 2008
+++ php-src/ext/mysqli/mysqli.c Tue Jul 15 13:12:27 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli.c,v 1.129 2008/03/18 17:32:03 andrey Exp $ 
+  $Id: mysqli.c,v 1.130 2008/07/15 13:12:27 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -94,12 +94,8 @@
 /* Destructor for mysqli entries in free_links/used_links */
 void php_mysqli_dtor_p_elements(void *data)
 {
-   MYSQL *mysql = (MYSQL *) data;
-#if defined(MYSQLI_USE_MYSQLND)
TSRMLS_FETCH();
-
-   

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

2008-07-15 Thread Jani Taskinen
janiTue Jul 15 13:16:26 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  Fix news
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1172r2=1.2027.2.547.2.1173diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1172 php-src/NEWS:1.2027.2.547.2.1173
--- php-src/NEWS:1.2027.2.547.2.1172Tue Jul 15 13:10:07 2008
+++ php-src/NEWSTue Jul 15 13:16:25 2008
@@ -1,11 +1,15 @@
 PHPNEWS
 |||
 ?? ??? 2008, PHP 5.2.7
-- When dumping entire document to file via asXml() don't lose the encoding.
-  (Ilia)
-- Fixed a crash inside PDO when trying instantiate PDORow manually (Felipe)
+- Reverted fix for bug #44197 due to change in behaviour in minor version.
+  (Felipe)
+
+- Fixed simplexml asXML() not to lose encoding when dumping entire document
+  to file. (Ilia)
+- Fixed a crash inside PDO when trying instantiate PDORow manually. (Felipe)
 - Fixed build failure of ext/mysqli with libmysql 6.0 - missing rpl
   functions. (Andrey)
+
 - Fixed bug #45486 (mb_send_mail(); header 'Content-Type: text/plain; 
charset=' 
   parsing incorrect). (Felipe)
 - Fixed bug #45485 (strip_tags and ?XML tag). (Felipe)
@@ -22,7 +26,8 @@
 - Fixed bug #45251 (double free or corruption with setAttributeNode()). (Rob)
 - Fixed bug #45220 (curl_read callback returns -1 when needs to return 
   size_t (unsigned)). (Felipe)
-- Fixed bug #45139 (ReflectionProperty returns incorrect declaring class). 
(Felipe)
+- Fixed bug #45139 (ReflectionProperty returns incorrect declaring class).
+  (Felipe)
 - Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
   (Ilia)
 - Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable 
@@ -32,7 +37,8 @@
   contains invalid data). (Markus Fischer, David C)
 - Fixed bug #44798 (Memory leak assigning value to attribute). (Ilia)
 - Fixed bug #44716 (Progress notifications incorrect). (Hannes)
-- Fixed bug #44712 (stream_context_set_params segfaults on invalid arguments). 
(Hannes)
+- Fixed bug #44712 (stream_context_set_params segfaults on invalid arguments).
+  (Hannes)
 - Fixed bug #41348 (OCI8: allow compilation with Oracle 8.1). (Chris Jones)
 
 01 May 2008, PHP 5.2.6



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



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

2008-07-15 Thread Lars Strojny
Hi Hannes,

Am Dienstag, den 15.07.2008, 15:07 +0200 schrieb Hannes Magnusson:
 I see no point in breaking bc just to break it.

that's how it is done elsewhere too. The issue is, there are no tests to
tell us how the behaviour was before the parameter handling was changed
to the new API, so we can only guess. And return null is the better
guess from MPOV.
cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [PHP-CVS] cvs: php-src /ext/mysql php_mysql.c /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c mysqlnd_wireprotocol.c

2008-07-15 Thread Marcus Boerger
Hello Andrey,

Tuesday, July 15, 2008, 3:12:27 PM, you wrote:

 andrey  Tue Jul 15 13:12:27 2008 UTC

   Modified files:  
 /php-src/ext/mysql  php_mysql.c 
 /php-src/ext/mysqli   mysqli.c 
 /php-src/ext/mysqlndmysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c 
 mysqlnd_wireprotocol.c 
   Log:
   Sync with bzr

what did you synch? what is bzr? is this developed elsewhere? If so why
does php have a copy... especially in src

Best regards,
 Marcus


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



Re: [PHP-CVS] cvs: php-src /ext/mysql php_mysql.c /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c mysqlnd_wireprotocol.c

2008-07-15 Thread Jani Taskinen

Marcus Boerger wrote:

Hello Andrey,

Tuesday, July 15, 2008, 3:12:27 PM, you wrote:


andrey  Tue Jul 15 13:12:27 2008 UTC


  Modified files:  
/php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli   mysqli.c 
/php-src/ext/mysqlndmysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c 
mysqlnd_wireprotocol.c 
  Log:

  Sync with bzr


what did you synch? what is bzr? is this developed elsewhere? If so why
does php have a copy... especially in src


I guess bzr is that bazaar thing..their own repo where mysqlnd and such 
is actually developed. I'd rather see this work done on php cvs too, but 
 you can't really get everything, can you? :D


How about MFH to PHP_5_2 too? And perhaps some note what has changed 
since..?


--Jani



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

2008-07-15 Thread Dmitry Stogov
dmitry  Tue Jul 15 13:38:57 2008 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots))
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.357r2=1.358diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.357 php-src/sapi/cgi/cgi_main.c:1.358
--- php-src/sapi/cgi/cgi_main.c:1.357   Tue Jul 15 13:10:42 2008
+++ php-src/sapi/cgi/cgi_main.c Tue Jul 15 13:38:56 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.357 2008/07/15 13:10:42 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.358 2008/07/15 13:38:56 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -876,6 +876,39 @@
 }
 /* }}} */
 
+/* {{{ is_valid_path
+ *
+ * some server configurations allow '..' to slip through in the
+ * translated path.   We'll just refuse to handle such a path.
+ */
+static int is_valid_path(const char *path)
+{
+   const char *p;
+
+   if (!path) {
+   return 0;
+   }
+   p = strstr(path, ..);
+   if (p) {
+   if ((p == path || IS_SLASH(*(p-1))) 
+   (*(p+2) == 0 || IS_SLASH(*(p+2 {
+   return 0;
+   }
+   while (1) {
+   p = strstr(p+1, ..);
+   if (!p) {
+   break;
+   }
+   if (IS_SLASH(*(p-1)) 
+   (*(p+2) == 0 || IS_SLASH(*(p+2 {
+   return 0;
+   }
+   }
+   }
+   return 1;
+}
+/* }}} */
+
 /* {{{ init_request_info
 
   initializes request_info structure
@@ -1171,9 +1204,7 @@
if (pt) {
efree(pt);
}
-   /* some server configurations allow '..' to 
slip through in the
-  translated path.   We'll just refuse to 
handle such a path. */
-   if (script_path_translated  
!strstr(script_path_translated, ..)) {
+   if (is_valid_path(script_path_translated)) {
SG(request_info).path_translated = 
estrdup(script_path_translated);
}
} else {
@@ -1204,9 +1235,7 @@
} else {
SG(request_info).request_uri = 
env_script_name;
}
-   /* some server configurations allow '..' to 
slip through in the
-  translated path.   We'll just refuse to 
handle such a path. */
-   if (script_path_translated  
!strstr(script_path_translated, ..)) {
+   if (is_valid_path(script_path_translated)) {
SG(request_info).path_translated = 
estrdup(script_path_translated);
}
free(real_path);
@@ -1221,9 +1250,7 @@
if (!CGIG(discard_path)  env_path_translated) {
script_path_translated = env_path_translated;
}
-   /* some server configurations allow '..' to slip 
through in the
-  translated path.   We'll just refuse to handle such 
a path. */
-   if (script_path_translated  
!strstr(script_path_translated, ..)) {
+   if (is_valid_path(script_path_translated)) {
SG(request_info).path_translated = 
estrdup(script_path_translated);
}
}



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

2008-07-15 Thread Dmitry Stogov
dmitry  Tue Jul 15 13:39:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots))
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.50.2.20r2=1.267.2.15.2.50.2.21diff_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.20 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.21
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.20Tue Jul 15 13:11:19 2008
+++ php-src/sapi/cgi/cgi_main.c Tue Jul 15 13:39:17 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.20 2008/07/15 13:11:19 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.21 2008/07/15 13:39:17 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -866,6 +866,39 @@
 }
 /* }}} */
 
+/* {{{ is_valid_path
+ *
+ * some server configurations allow '..' to slip through in the
+ * translated path.   We'll just refuse to handle such a path.
+ */
+static int is_valid_path(const char *path)
+{
+   const char *p;
+
+   if (!path) {
+   return 0;
+   }
+   p = strstr(path, ..);
+   if (p) {
+   if ((p == path || IS_SLASH(*(p-1))) 
+   (*(p+2) == 0 || IS_SLASH(*(p+2 {
+   return 0;
+   }
+   while (1) {
+   p = strstr(p+1, ..);
+   if (!p) {
+   break;
+   }
+   if (IS_SLASH(*(p-1)) 
+   (*(p+2) == 0 || IS_SLASH(*(p+2 {
+   return 0;
+   }
+   }
+   }
+   return 1;
+}
+/* }}} */
+
 /* {{{ init_request_info
 
   initializes request_info structure
@@ -1161,9 +1194,7 @@
if (pt) {
efree(pt);
}
-   /* some server configurations allow '..' to 
slip through in the
-  translated path.   We'll just refuse to 
handle such a path. */
-   if (script_path_translated  
!strstr(script_path_translated, ..)) {
+   if (is_valid_path(script_path_translated)) {
SG(request_info).path_translated = 
estrdup(script_path_translated);
}
} else {
@@ -1194,9 +1225,7 @@
} else {
SG(request_info).request_uri = 
env_script_name;
}
-   /* some server configurations allow '..' to 
slip through in the
-  translated path.   We'll just refuse to 
handle such a path. */
-   if (script_path_translated  
!strstr(script_path_translated, ..)) {
+   if (is_valid_path(script_path_translated)) {
SG(request_info).path_translated = 
estrdup(script_path_translated);
}
free(real_path);
@@ -1211,9 +1240,7 @@
if (!CGIG(discard_path)  env_path_translated) {
script_path_translated = env_path_translated;
}
-   /* some server configurations allow '..' to slip 
through in the
-  translated path.   We'll just refuse to handle such 
a path. */
-   if (script_path_translated  
!strstr(script_path_translated, ..)) {
+   if (is_valid_path(script_path_translated)) {
SG(request_info).path_translated = 
estrdup(script_path_translated);
}
}



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



Re: [PHP-CVS] cvs: php-src /ext/mysql php_mysql.c /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c mysqlnd_wireprotocol.c

2008-07-15 Thread Andrey Hristov

Jani Taskinen wrote:

Marcus Boerger wrote:

Hello Andrey,

Tuesday, July 15, 2008, 3:12:27 PM, you wrote:


andrey  Tue Jul 15 13:12:27 2008 UTC


  Modified files:  /php-src/ext/mysql  php_mysql.c 
/php-src/ext/mysqli   mysqli.c 
/php-src/ext/mysqlndmysqlnd.c mysqlnd_palloc.c mysqlnd_ps.c 
mysqlnd_wireprotocol.c   Log:

  Sync with bzr


what did you synch? what is bzr? is this developed elsewhere? If so why
does php have a copy... especially in src


I guess bzr is that bazaar thing..their own repo where mysqlnd and such 
is actually developed. I'd rather see this work done on php cvs too, but 
 you can't really get everything, can you? :D


right :)

How about MFH to PHP_5_2 too? And perhaps some note what has changed 
since..?


What has changed is mysqlnd related thus no need for a 5_2 merge.


--Jani



Andrey


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



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

2008-07-15 Thread Scott MacVicar
scottmacTue Jul 15 14:44:46 2008 UTC

  Added files: 
/php-src/ext/standard/tests/strings strip_tags_variation11.phpt 

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  Fix bug when  is used within attribute.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.675r2=1.676diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.675 php-src/ext/standard/string.c:1.676
--- php-src/ext/standard/string.c:1.675 Fri Jul 11 12:43:06 2008
+++ php-src/ext/standard/string.c   Tue Jul 15 14:44:46 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.675 2008/07/11 12:43:06 felipe Exp $ */
+/* $Id: string.c,v 1.676 2008/07/15 14:44:46 scottmac Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6696,6 +6696,9 @@
case '\0':
break;
case '':
+   if (in_q) {
+   break;
+   }
if (isspace(*(p + 1))  !allow_tag_spaces) {
goto reg_char;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strip_tags_variation11.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strip_tags_variation11.phpt
+++ php-src/ext/standard/tests/strings/strip_tags_variation11.phpt
--TEST--
Test strip_tags() function : obscure values within attributes
--INI--
short_open_tag = on
--FILE--
?php

echo *** Testing strip_tags() : obscure functionality ***\n;

// array of arguments
$string_array = array (
  'hello img title= world',
  'hello img title= world',
  'hello img title=_ world',
  hello img title='_' world
);


// Calling strip_tags() with default arguments
// loop through the $string_array to test strip_tags on various inputs
$iteration = 1;
foreach($string_array as $string)
{
  echo -- Iteration $iteration --\n;
  var_dump( strip_tags($string) );
  $iteration++;
}

echo Done;
?
--EXPECTF--
*** Testing strip_tags() : obscure functionality ***
-- Iteration 1 --
unicode(12) hello  world
-- Iteration 2 --
unicode(12) hello  world
-- Iteration 3 --
unicode(12) hello  world
-- Iteration 4 --
unicode(12) hello  world
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_3) /ext/standard string.c /ext/standard/tests/strings strip_tags_variation11.phpt

2008-07-15 Thread Scott MacVicar
scottmacTue Jul 15 14:46:12 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings strip_tags_variation11.phpt 

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  MFH: Fix bug when  is used within attribute.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.30r2=1.445.2.14.2.69.2.31diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.30 
php-src/ext/standard/string.c:1.445.2.14.2.69.2.31
--- php-src/ext/standard/string.c:1.445.2.14.2.69.2.30  Fri Jul 11 12:25:37 2008
+++ php-src/ext/standard/string.c   Tue Jul 15 14:46:11 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.69.2.30 2008/07/11 12:25:37 felipe Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.69.2.31 2008/07/15 14:46:11 scottmac Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4249,6 +4249,9 @@
case '\0':
break;
case '':
+   if (in_q) {
+   break;
+   }
if (isspace(*(p + 1))  !allow_tag_spaces) {
goto reg_char;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strip_tags_variation11.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strip_tags_variation11.phpt
+++ php-src/ext/standard/tests/strings/strip_tags_variation11.phpt
--TEST--
Test strip_tags() function : obscure values within attributes
--INI--
short_open_tag = on
--FILE--
?php

echo *** Testing strip_tags() : obscure functionality ***\n;

// array of arguments
$string_array = array (
  'hello img title= world',
  'hello img title= world',
  'hello img title=_ world',
  hello img title='_' world
);


// Calling strip_tags() with default arguments
// loop through the $string_array to test strip_tags on various inputs
$iteration = 1;
foreach($string_array as $string)
{
  echo -- Iteration $iteration --\n;
  var_dump( strip_tags($string) );
  $iteration++;
}

echo Done;
?
--EXPECTF--
*** Testing strip_tags() : obscure functionality ***
-- Iteration 1 --
unicode(12) hello  world
-- Iteration 2 --
unicode(12) hello  world
-- Iteration 3 --
unicode(12) hello  world
-- Iteration 4 --
unicode(12) hello  world
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) / NEWS /ext/standard string.c /ext/standard/tests/strings strip_tags_variation11.phpt

2008-07-15 Thread Scott MacVicar
scottmacTue Jul 15 14:58:59 2008 UTC

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

  Modified files:  
/php-srcNEWS 
/php-src/ext/standard   string.c 
  Log:
  MFH: Fix bug when  is used within attribute.
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1174r2=1.2027.2.547.2.1175diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1174 php-src/NEWS:1.2027.2.547.2.1175
--- php-src/NEWS:1.2027.2.547.2.1174Tue Jul 15 13:38:29 2008
+++ php-src/NEWSTue Jul 15 14:58:58 2008
@@ -9,6 +9,7 @@
 - Fixed a crash inside PDO when trying instantiate PDORow manually. (Felipe)
 - Fixed build failure of ext/mysqli with libmysql 6.0 - missing rpl
   functions. (Andrey)
+- Fixed a regression when using strip_tags() and  is within an attribute. 
(Scott)
 
 - Fixed bug #45486 (mb_send_mail(); header 'Content-Type: text/plain; 
charset=' 
   parsing incorrect). (Felipe)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.75r2=1.445.2.14.2.76diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.75 
php-src/ext/standard/string.c:1.445.2.14.2.76
--- php-src/ext/standard/string.c:1.445.2.14.2.75   Fri Jul 11 12:16:05 2008
+++ php-src/ext/standard/string.c   Tue Jul 15 14:58:58 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.75 2008/07/11 12:16:05 felipe Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.76 2008/07/15 14:58:58 scottmac Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4355,6 +4355,9 @@
case '\0':
break;
case '':
+   if (in_q) {
+   break;
+   }
if (isspace(*(p + 1))  !allow_tag_spaces) {
goto reg_char;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strip_tags_variation11.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strip_tags_variation11.phpt
+++ php-src/ext/standard/tests/strings/strip_tags_variation11.phpt
--TEST--
Test strip_tags() function : obscure values within attributes
--INI--
short_open_tag = on
--FILE--
?php

echo *** Testing strip_tags() : obscure functionality ***\n;

// array of arguments
$string_array = array (
  'hello img title= world',
  'hello img title= world',
  'hello img title=_ world',
  hello img title='_' world
);


// Calling strip_tags() with default arguments
// loop through the $string_array to test strip_tags on various inputs
$iteration = 1;
foreach($string_array as $string)
{
  echo -- Iteration $iteration --\n;
  var_dump( strip_tags($string) );
  $iteration++;
}

echo Done;
?
--EXPECTF--
*** Testing strip_tags() : obscure functionality ***
-- Iteration 1 --
unicode(12) hello  world
-- Iteration 2 --
unicode(12) hello  world
-- Iteration 3 --
unicode(12) hello  world
-- Iteration 4 --
unicode(12) hello  world
Done



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



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

2008-07-15 Thread Hannes Magnusson
On Tue, Jul 15, 2008 at 15:18, Lars Strojny [EMAIL PROTECTED] wrote:
 Hi Hannes,

 Am Dienstag, den 15.07.2008, 15:07 +0200 schrieb Hannes Magnusson:
 I see no point in breaking bc just to break it.

 that's how it is done elsewhere too. The issue is, there are no tests to
 tell us how the behaviour was before the parameter handling was changed

Which is why it is good practice to write the tests before changing anything.

 to the new API, so we can only guess. And return null is the better
 guess from MPOV.

Some of those functions have been using that API for years...
Why would you need to guess anything anyway?

-Hannes

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

2008-07-15 Thread Jani Taskinen
janiTue Jul 15 16:10:32 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main/streams   streams.c 
  Log:
  MFH: Fixed potentially confusing error message on failure when no errors are 
logged
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.23r2=1.82.2.6.2.24diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.82.2.6.2.23 
php-src/main/streams/streams.c:1.82.2.6.2.24
--- php-src/main/streams/streams.c:1.82.2.6.2.23Wed Jun 11 09:02:09 2008
+++ php-src/main/streams/streams.c  Tue Jul 15 16:10:32 2008
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.82.2.6.2.23 2008/06/11 09:02:09 dmitry Exp $ */
+/* $Id: streams.c,v 1.82.2.6.2.24 2008/07/15 16:10:32 jani Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -164,7 +164,11 @@
 
free_msg = 1;
} else {
-   msg = strerror(errno);
+   if (wrapper == php_plain_files_wrapper) {
+   msg = strerror(errno);
+   } else {
+   msg = operation failed;
+   }
}
} else {
msg = no suitable wrapper could be found;



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



[PHP-CVS] cvs: php-src /ext/dom config.w32 /ext/libxml config.w32

2008-07-15 Thread Pierre-Alain Joye
pajoye  Tue Jul 15 16:47:40 2008 UTC

  Modified files:  
/php-src/ext/domconfig.w32 
/php-src/ext/libxml config.w32 
  Log:
  - MFB: do not enable libxml or dom when a dep/header/lib is missing
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/config.w32?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/dom/config.w32
diff -u php-src/ext/dom/config.w32:1.3 php-src/ext/dom/config.w32:1.4
--- php-src/ext/dom/config.w32:1.3  Mon Dec 22 13:16:39 2003
+++ php-src/ext/dom/config.w32  Tue Jul 15 16:47:40 2008
@@ -1,22 +1,26 @@
-// $Id: config.w32,v 1.3 2003/12/22 13:16:39 wez Exp $
+// $Id: config.w32,v 1.4 2008/07/15 16:47:40 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(dom, DOM support, yes);
 
 if (PHP_DOM == yes  PHP_LIBXML == yes) {
-   EXTENSION(dom, php_dom.c attr.c document.c domerrorhandler.c \
-   domstringlist.c domexception.c namelist.c 
processinginstruction.c \
-   cdatasection.c documentfragment.c domimplementation.c element.c 
\
-   node.c string_extend.c characterdata.c documenttype.c \
-   domimplementationlist.c entity.c nodelist.c text.c comment.c \
-   domconfiguration.c domimplementationsource.c entityreference.c \
-   notation.c xpath.c dom_iterators.c typeinfo.c domerror.c \
-   domlocator.c namednodemap.c userdatahandler.c);
-   AC_DEFINE(HAVE_DOM, 1, DOM support);
-   if (!PHP_DOM_SHARED) {
-   ADD_FLAG(CFLAGS_DOM, /D LIBXML_STATIC );
+   if (PHP_LIBXML == yes  ADD_EXTENSION_DEP('dom', 'libxml')) {
+   EXTENSION(dom, php_dom.c attr.c document.c domerrorhandler.c 
\
+   domstringlist.c domexception.c namelist.c 
processinginstruction.c \
+   cdatasection.c documentfragment.c domimplementation.c 
element.c \
+   node.c string_extend.c characterdata.c documenttype.c \
+   domimplementationlist.c entity.c nodelist.c text.c 
comment.c \
+   domconfiguration.c domimplementationsource.c 
entityreference.c \
+   notation.c xpath.c dom_iterators.c typeinfo.c 
domerror.c \
+   domlocator.c namednodemap.c userdatahandler.c);
+   AC_DEFINE(HAVE_DOM, 1, DOM support);
+   if (!PHP_DOM_SHARED) {
+   ADD_FLAG(CFLAGS_DOM, /D LIBXML_STATIC );
+   }
+   } else {
+   WARNING(dom support can't be enabled, libxml is not enabled)
+   PHP_DOM = no
}
-   ADD_EXTENSION_DEP('dom', 'libxml');
 }
 
 
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/config.w32?r1=1.10r2=1.11diff_format=u
Index: php-src/ext/libxml/config.w32
diff -u php-src/ext/libxml/config.w32:1.10 php-src/ext/libxml/config.w32:1.11
--- php-src/ext/libxml/config.w32:1.10  Wed May 14 03:32:27 2008
+++ php-src/ext/libxml/config.w32   Tue Jul 15 16:47:40 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.10 2008/05/14 03:32:27 auroraeosrose Exp $
+// $Id: config.w32,v 1.11 2008/07/15 16:47:40 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(libxml, LibXML support, yes);
@@ -6,7 +6,8 @@
 if (PHP_LIBXML == yes) {
if (CHECK_LIB(libxml2_a_dll.lib;libxml2_a.lib, libxml) 

CHECK_LIB(libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib, libxml) 
-   CHECK_HEADER_ADD_INCLUDE(libxml/parser.h, CFLAGS)) {
+   CHECK_HEADER_ADD_INCLUDE(libxml/parser.h, 
CFLAGS_LIBXML) 
+   ADD_EXTENSION_DEP('libxml', 'iconv')) {
 
EXTENSION(libxml, libxml.c, false /* never shared */);
AC_DEFINE(HAVE_LIBXML, 1, LibXML support);
@@ -14,7 +15,9 @@
if (!PHP_LIBXML_SHARED) {
ADD_DEF_FILE(ext\\libxml\\php_libxml2.def);
}
-   ADD_EXTENSION_DEP('libxml', 'iconv');
+   } else {
+   WARNING(libxml support can't be enabled, iconv or libxml are 
missing)
+   PHP_LIBXML = no
}
 }
 



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



[PHP-CVS] cvs: php-src /ext/mcrypt config.w32 mcrypt.c

2008-07-15 Thread Pierre-Alain Joye
pajoye  Tue Jul 15 17:04:18 2008 UTC

  Modified files:  
/php-src/ext/mcrypt config.w32 mcrypt.c 
  Log:
  - Port mcrypt_create_iv to windows (aka fix it on windows)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mcrypt/config.w32?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/mcrypt/config.w32
diff -u php-src/ext/mcrypt/config.w32:1.2 php-src/ext/mcrypt/config.w32:1.3
--- php-src/ext/mcrypt/config.w32:1.2   Sun Jan 18 19:21:23 2004
+++ php-src/ext/mcrypt/config.w32   Tue Jul 15 17:04:17 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.2 2004/01/18 19:21:23 derick Exp $
+// $Id: config.w32,v 1.3 2008/07/15 17:04:17 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(mcrypt, mcrypt support, no);
@@ -6,7 +6,9 @@
 if (PHP_MCRYPT != no) {
 
if (CHECK_HEADER_ADD_INCLUDE('mcrypt.h', 'CFLAGS_MCRYPT') 
-   CHECK_LIB('libmcrypt.lib', 'mcrypt')) {
+   CHECK_LIB('libmcrypt.lib', 'mcrypt') 
+   CHECK_LIB('Advapi32.lib', 'mcrypt')
+   ) {
EXTENSION('mcrypt', 'mcrypt.c');
AC_DEFINE('HAVE_LIBMCRYPT', 1);
AC_DEFINE('HAVE_LIBMCRYPT24', 1);
http://cvs.php.net/viewvc.cgi/php-src/ext/mcrypt/mcrypt.c?r1=1.112r2=1.113diff_format=u
Index: php-src/ext/mcrypt/mcrypt.c
diff -u php-src/ext/mcrypt/mcrypt.c:1.112 php-src/ext/mcrypt/mcrypt.c:1.113
--- php-src/ext/mcrypt/mcrypt.c:1.112   Tue Jul  1 19:44:18 2008
+++ php-src/ext/mcrypt/mcrypt.c Tue Jul 15 17:04:17 2008
@@ -16,7 +16,7 @@
|  Derick Rethans [EMAIL PROTECTED]|
+--+
  */
-/* $Id: mcrypt.c,v 1.112 2008/07/01 19:44:18 felipe Exp $ */
+/* $Id: mcrypt.c,v 1.113 2008/07/15 17:04:17 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -26,6 +26,11 @@
 
 #if HAVE_LIBMCRYPT
 
+#if PHP_WIN32
+# include Wincrypt.h
+# include Ntsecapi.h
+#endif
+
 #include php_mcrypt.h
 #include fcntl.h
 
@@ -1199,9 +1204,6 @@
 /* {{{ php_mcrypt_iv */
 int php_mcrypt_iv(php_mcrypt_iv_source source, int size, char **iv_str, int 
*iv_len TSRMLS_DC)
 {
-   int fd, n;
-   size_t read_bytes;
-   
if (size = 0 || size = INT_MAX) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Can not create an 
IV with a size of less then 1 or greater then %d, INT_MAX);
return FAILURE;
@@ -1211,9 +1213,27 @@

switch (source) {
case PHP_MCRYPT_IV_SOURCE_RANDOM:
-   case PHP_MCRYPT_IV_SOURCE_URANDOM:
-   read_bytes = 0;
-   
+   case PHP_MCRYPT_IV_SOURCE_URANDOM: {
+#if PHP_WIN32
+   /* random/urandom equivalent on Windows */
+   HCRYPTPROV hCryptProv;
+   BYTE *iv = (BYTE *) *iv_str;
+
+   /* It could be done using LoadLibrary but as we rely on 
2k+ for 5.3, cleaner to use a clear dependency (Advapi32) and a 
+   standard API call (no f=getAddr..; f();) */
+   if(!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, 
Cannot open random device);
+   return FAILURE;
+   }
+   if(!CryptGenRandom(hCryptProv, size,  iv)) {
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, 
Could not gather sufficient random data);
+   return FAILURE;
+   }
+   *iv_len = size;
+#else
+   size_t read_bytes = 0;
+   int fd;
+
fd = open(source == PHP_MCRYPT_IV_SOURCE_RANDOM ? 
/dev/random : /dev/urandom, O_RDONLY);
if (fd  0) {
efree(*iv_str);
@@ -1236,7 +1256,9 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Could not gather sufficient random data);
return FAILURE;
}
+#endif
break;
+   }
case PHP_MCRYPT_IV_SOURCE_RAND:
*iv_len = size;
while (size) {



-- 
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/mcrypt config.w32 mcrypt.c

2008-07-15 Thread Pierre-Alain Joye
pajoye  Tue Jul 15 17:05:02 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mcrypt config.w32 mcrypt.c 
  Log:
  - MFH: Port mcrypt_create_iv to windows (aka fix it on windows)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mcrypt/config.w32?r1=1.2r2=1.2.8.1diff_format=u
Index: php-src/ext/mcrypt/config.w32
diff -u php-src/ext/mcrypt/config.w32:1.2 php-src/ext/mcrypt/config.w32:1.2.8.1
--- php-src/ext/mcrypt/config.w32:1.2   Sun Jan 18 19:21:23 2004
+++ php-src/ext/mcrypt/config.w32   Tue Jul 15 17:05:02 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.2 2004/01/18 19:21:23 derick Exp $
+// $Id: config.w32,v 1.2.8.1 2008/07/15 17:05:02 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(mcrypt, mcrypt support, no);
@@ -6,7 +6,9 @@
 if (PHP_MCRYPT != no) {
 
if (CHECK_HEADER_ADD_INCLUDE('mcrypt.h', 'CFLAGS_MCRYPT') 
-   CHECK_LIB('libmcrypt.lib', 'mcrypt')) {
+   CHECK_LIB('libmcrypt.lib', 'mcrypt') 
+   CHECK_LIB('Advapi32.lib', 'mcrypt')
+   ) {
EXTENSION('mcrypt', 'mcrypt.c');
AC_DEFINE('HAVE_LIBMCRYPT', 1);
AC_DEFINE('HAVE_LIBMCRYPT24', 1);
@@ -14,4 +16,3 @@
WARNING(mcrypt not enabled; libraries and headers not found);
}
 }
-
http://cvs.php.net/viewvc.cgi/php-src/ext/mcrypt/mcrypt.c?r1=1.91.2.3.2.11.2.9r2=1.91.2.3.2.11.2.10diff_format=u
Index: php-src/ext/mcrypt/mcrypt.c
diff -u php-src/ext/mcrypt/mcrypt.c:1.91.2.3.2.11.2.9 
php-src/ext/mcrypt/mcrypt.c:1.91.2.3.2.11.2.10
--- php-src/ext/mcrypt/mcrypt.c:1.91.2.3.2.11.2.9   Fri Jul  4 07:47:18 2008
+++ php-src/ext/mcrypt/mcrypt.c Tue Jul 15 17:05:02 2008
@@ -16,7 +16,7 @@
|  Derick Rethans [EMAIL PROTECTED]|
+--+
  */
-/* $Id: mcrypt.c,v 1.91.2.3.2.11.2.9 2008/07/04 07:47:18 derick Exp $ */
+/* $Id: mcrypt.c,v 1.91.2.3.2.11.2.10 2008/07/15 17:05:02 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -26,6 +26,11 @@
 
 #if HAVE_LIBMCRYPT
 
+#if PHP_WIN32
+# include Wincrypt.h
+# include Ntsecapi.h
+#endif
+
 #include php_mcrypt.h
 #include fcntl.h
 
@@ -1452,6 +1457,23 @@
iv = ecalloc(size + 1, 1);

if (source == RANDOM || source == URANDOM) {
+#if PHP_WIN32
+   /* random/urandom equivalent on Windows */
+   HCRYPTPROV hCryptProv;
+   BYTE *iv_b = (BYTE *) iv;
+
+   /* It could be done using LoadLibrary but as we rely on 
2k+ for 5.3, cleaner to use a clear dependency (Advapi32) and a 
+   standard API call (no f=getAddr..; f();) */
+   if(!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, 
Cannot open random device);
+   RETURN_FALSE;
+   }
+   if(!CryptGenRandom(hCryptProv, size,  iv_b)) {
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, 
Could not gather sufficient random data);
+   RETURN_FALSE;
+   }
+   n = size;
+#else
intfd;
size_t read_bytes = 0;
 
@@ -1475,6 +1497,7 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
gather sufficient random data);
RETURN_FALSE;
}
+#endif
} else {
n = size;
while (size) {



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



[PHP-CVS] cvs: php-src /ext/date/lib dow.c parse_date.c parse_date.re timelib.h

2008-07-15 Thread Derick Rethans
derick  Tue Jul 15 17:37:33 2008 UTC

  Modified files:  
/php-src/ext/date/lib   dow.c parse_date.c parse_date.re timelib.h 
  Log:
  - Also add the warnings for times. This does not make sense for the english
text parser, as invalid times are never allowed in there.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/dow.c?r1=1.15r2=1.16diff_format=u
Index: php-src/ext/date/lib/dow.c
diff -u php-src/ext/date/lib/dow.c:1.15 php-src/ext/date/lib/dow.c:1.16
--- php-src/ext/date/lib/dow.c:1.15 Mon Jul 14 17:30:08 2008
+++ php-src/ext/date/lib/dow.c  Tue Jul 15 17:37:32 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dow.c,v 1.15 2008/07/14 17:30:08 derick Exp $ */
+/* $Id: dow.c,v 1.16 2008/07/15 17:37:32 derick Exp $ */
 
 #include timelib.h
 
@@ -140,6 +140,14 @@
return day + ((w - 1) * 7) + d;
 }
 
+int timelib_valid_time(timelib_sll h, timelib_sll i, timelib_sll s)
+{
+   if (h  0 || h  23 || i  0 || i  59 || s  0 || s  59) {
+   return 0;
+   }
+   return 1;
+}
+
 int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d)
 {
if (m  1 || m  12 || d  1 || d  timelib_days_in_month(y, m)) {
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.93r2=1.94diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.93 
php-src/ext/date/lib/parse_date.c:1.94
--- php-src/ext/date/lib/parse_date.c:1.93  Mon Jul 14 17:30:08 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jul 15 17:37:32 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Jul 14 19:27:22 2008 */
+/* Generated by re2c 0.13.5 on Tue Jul 15 19:35:53 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.93 2008/07/14 17:30:08 derick Exp $ */
+/* $Id: parse_date.c,v 1.94 2008/07/15 17:37:32 derick Exp $ */
 
 #include timelib.h
 
@@ -23630,6 +23630,12 @@
}
}
 
+   /* do funky checking whether the parsed time was valid time */
+   if (s-time-h != TIMELIB_UNSET  s-time-i != TIMELIB_UNSET 
+   s-time-s != TIMELIB_UNSET  
+   !timelib_valid_time( s-time-h, s-time-i, s-time-s)) {
+   add_pbf_warning(s, The parsed time was invalid, string, ptr);
+   }
/* do funky checking whether the parsed date was valid date */
if (s-time-y != TIMELIB_UNSET  s-time-m != TIMELIB_UNSET 
s-time-d != TIMELIB_UNSET  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.84r2=1.85diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.84 
php-src/ext/date/lib/parse_date.re:1.85
--- php-src/ext/date/lib/parse_date.re:1.84 Mon Jul 14 17:30:09 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jul 15 17:37:33 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.84 2008/07/14 17:30:09 derick Exp $ */
+/* $Id: parse_date.re,v 1.85 2008/07/15 17:37:33 derick Exp $ */
 
 #include timelib.h
 
@@ -2040,6 +2040,12 @@
}
}
 
+   /* do funky checking whether the parsed time was valid time */
+   if (s-time-h != TIMELIB_UNSET  s-time-i != TIMELIB_UNSET 
+   s-time-s != TIMELIB_UNSET  
+   !timelib_valid_time( s-time-h, s-time-i, s-time-s)) {
+   add_pbf_warning(s, The parsed time was invalid, string, ptr);
+   }
/* do funky checking whether the parsed date was valid date */
if (s-time-y != TIMELIB_UNSET  s-time-m != TIMELIB_UNSET 
s-time-d != TIMELIB_UNSET  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.h?r1=1.31r2=1.32diff_format=u
Index: php-src/ext/date/lib/timelib.h
diff -u php-src/ext/date/lib/timelib.h:1.31 php-src/ext/date/lib/timelib.h:1.32
--- php-src/ext/date/lib/timelib.h:1.31 Mon Jul 14 17:30:09 2008
+++ php-src/ext/date/lib/timelib.h  Tue Jul 15 17:37:33 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: timelib.h,v 1.31 2008/07/14 17:30:09 derick Exp $ */
+/* $Id: timelib.h,v 1.32 2008/07/15 17:37:33 derick Exp $ */
 
 #ifndef __TIMELIB_H__
 #define __TIMELIB_H__
@@ -56,6 +56,7 @@
 timelib_sll timelib_daynr_from_weeknr(timelib_sll y, timelib_sll w, 
timelib_sll d);
 timelib_sll timelib_days_in_month(timelib_sll y, timelib_sll m);
 void timelib_isoweek_from_date(timelib_sll y, timelib_sll m, timelib_sll d, 
timelib_sll *iw, timelib_sll *iy);
+int timelib_valid_time(timelib_sll h, timelib_sll i, timelib_sll s);
 int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d);
 
 /* From parse_date.re */



-- 
PHP CVS Mailing List 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib dow.c parse_date.c parse_date.re timelib.h

2008-07-15 Thread Derick Rethans
derick  Tue Jul 15 17:38:42 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   dow.c parse_date.c parse_date.re timelib.h 
  Log:
  - MFH: Also add the warnings for times. This does not make sense for the
english text parser, as invalid times are never allowed in there.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/dow.c?r1=1.8.2.3.2.3.2.3r2=1.8.2.3.2.3.2.4diff_format=u
Index: php-src/ext/date/lib/dow.c
diff -u php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.3 
php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.4
--- php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.3  Mon Jul 14 17:35:52 2008
+++ php-src/ext/date/lib/dow.c  Tue Jul 15 17:38:07 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dow.c,v 1.8.2.3.2.3.2.3 2008/07/14 17:35:52 derick Exp $ */
+/* $Id: dow.c,v 1.8.2.3.2.3.2.4 2008/07/15 17:38:07 derick Exp $ */
 
 #include timelib.h
 
@@ -140,6 +140,14 @@
return day + ((w - 1) * 7) + d;
 }
 
+int timelib_valid_time(timelib_sll h, timelib_sll i, timelib_sll s)
+{
+   if (h  0 || h  23 || i  0 || i  59 || s  0 || s  59) {
+   return 0;
+   }
+   return 1;
+}
+
 int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d)
 {
if (m  1 || m  12 || d  1 || d  timelib_days_in_month(y, m)) {
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.20r2=1.29.2.30.2.14.2.21diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.20 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.21
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.20   Mon Jul 14 
17:35:52 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jul 15 17:38:07 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Jul 14 19:34:39 2008 */
+/* Generated by re2c 0.13.5 on Tue Jul 15 19:21:36 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.20 2008/07/14 17:35:52 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.21 2008/07/15 17:38:07 derick Exp $ */
 
 #include timelib.h
 
@@ -23630,6 +23630,12 @@
}
}
 
+   /* do funky checking whether the parsed time was valid time */
+   if (s-time-h != TIMELIB_UNSET  s-time-i != TIMELIB_UNSET 
+   s-time-s != TIMELIB_UNSET  
+   !timelib_valid_time( s-time-h, s-time-i, s-time-s)) {
+   add_pbf_warning(s, The parsed time was invalid, string, ptr);
+   }
/* do funky checking whether the parsed date was valid date */
if (s-time-y != TIMELIB_UNSET  s-time-m != TIMELIB_UNSET 
s-time-d != TIMELIB_UNSET  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.26.2.27.2.12.2.18r2=1.26.2.27.2.12.2.19diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.18 
php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.19
--- php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.18  Mon Jul 14 
17:36:12 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jul 15 17:38:27 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.26.2.27.2.12.2.18 2008/07/14 17:36:12 derick Exp $ */
+/* $Id: parse_date.re,v 1.26.2.27.2.12.2.19 2008/07/15 17:38:27 derick Exp $ */
 
 #include timelib.h
 
@@ -2040,6 +2040,12 @@
}
}
 
+   /* do funky checking whether the parsed time was valid time */
+   if (s-time-h != TIMELIB_UNSET  s-time-i != TIMELIB_UNSET 
+   s-time-s != TIMELIB_UNSET  
+   !timelib_valid_time( s-time-h, s-time-i, s-time-s)) {
+   add_pbf_warning(s, The parsed time was invalid, string, ptr);
+   }
/* do funky checking whether the parsed date was valid date */
if (s-time-y != TIMELIB_UNSET  s-time-m != TIMELIB_UNSET 
s-time-d != TIMELIB_UNSET  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.h?r1=1.10.2.11.2.3.2.7r2=1.10.2.11.2.3.2.8diff_format=u
Index: php-src/ext/date/lib/timelib.h
diff -u php-src/ext/date/lib/timelib.h:1.10.2.11.2.3.2.7 
php-src/ext/date/lib/timelib.h:1.10.2.11.2.3.2.8
--- php-src/ext/date/lib/timelib.h:1.10.2.11.2.3.2.7Mon Jul 14 17:36:12 2008
+++ php-src/ext/date/lib/timelib.h  Tue Jul 15 17:38:27 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: timelib.h,v 1.10.2.11.2.3.2.7 2008/07/14 17:36:12 derick Exp $ */
+/* $Id: timelib.h,v 1.10.2.11.2.3.2.8 2008/07/15 17:38:27 derick Exp $ */
 
 #ifndef __TIMELIB_H__
 #define __TIMELIB_H__
@@ -56,6 +56,7 @@
 timelib_sll timelib_daynr_from_weeknr(timelib_sll y, 

[PHP-CVS] cvs: php-src /ext/mbstring config.m4

2008-07-15 Thread Moriyoshi Koizumi
moriyoshi   Tue Jul 15 18:04:15 2008 UTC

  Modified files:  
/php-src/ext/mbstring   config.m4 
  Log:
  - indentation fix  reenable mbregex again.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/config.m4?r1=1.67r2=1.68diff_format=u
Index: php-src/ext/mbstring/config.m4
diff -u php-src/ext/mbstring/config.m4:1.67 php-src/ext/mbstring/config.m4:1.68
--- php-src/ext/mbstring/config.m4:1.67 Tue Sep 18 21:35:12 2007
+++ php-src/ext/mbstring/config.m4  Tue Jul 15 18:04:14 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.67 2007/09/18 21:35:12 hirokawa Exp $
+dnl $Id: config.m4,v 1.68 2008/07/15 18:04:14 moriyoshi Exp $
 dnl
 
 AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [
@@ -72,7 +72,17 @@
return 0;
 }
 int main() { return foo(10, , 3.14); }
-  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], 
[cv_php_mbstring_stdarg=no])
+  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
+dnl cross-compile needs something here
+case $host_alias in
+*netware*)
+cv_php_mbstring_stdarg=yes
+;;
+*)
+cv_php_mbstring_stdarg=no
+;;
+esac
+  ])
 ])
 
 AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h 
sys/times.h stdarg.h])
@@ -86,6 +96,10 @@
 
 AC_DEFINE([HAVE_MBREGEX], 1, [whether to have multibyte regex support])
 
+if test $PHP_MBREGEX_BACKTRACK != no; then
+  AC_DEFINE([USE_COMBINATION_EXPLOSION_CHECK],1,[whether to check 
multibyte regex backtrack])
+fi
+
 PHP_MBSTRING_ADD_CFLAG([-DNOT_RUBY])
 PHP_MBSTRING_ADD_BUILD_DIR([oniguruma])
 PHP_MBSTRING_ADD_BUILD_DIR([oniguruma/enc])
@@ -263,6 +277,10 @@
 PHP_ARG_ENABLE([mbregex], [whether to enable multibyte regex support],
 [  --disable-mbregex MBSTRING: Disable multibyte regex support], yes, 
no)
 
+PHP_ARG_ENABLE([mbregex_backtrack], [whether to check multibyte regex 
backtrack],
+[  --disable-mbregex-backtrack
+MBSTRING: Disable multibyte regex backtrack 
check], yes, no)
+
 PHP_ARG_WITH(libmbfl, [for external libmbfl],
 [  --with-libmbfl[=DIR]  MBSTRING: Use external libmbfl. DIR is the 
libmbfl install prefix.
 If DIR is not set, the bundled libmbfl will be 
used], no, no)
@@ -273,7 +291,6 @@
   PHP_MBSTRING_ADD_BASE_SOURCES([mbstring.c php_unicode.c mb_gpc.c])
 
   if test $PHP_MBREGEX != no; then
-AC_MSG_ERROR([multibyte regex support must be disabled, use 
--disable-mbregex])
 PHP_MBSTRING_SETUP_MBREGEX
   fi
   



-- 
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/mbstring config.m4

2008-07-15 Thread Moriyoshi Koizumi
moriyoshi   Tue Jul 15 18:04:32 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mbstring   config.m4 
  Log:
  * MFH: indentation fix only
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/config.m4?r1=1.58.2.4.2.11.2.3r2=1.58.2.4.2.11.2.4diff_format=u
Index: php-src/ext/mbstring/config.m4
diff -u php-src/ext/mbstring/config.m4:1.58.2.4.2.11.2.3 
php-src/ext/mbstring/config.m4:1.58.2.4.2.11.2.4
--- php-src/ext/mbstring/config.m4:1.58.2.4.2.11.2.3Sat Jul  5 07:10:25 2008
+++ php-src/ext/mbstring/config.m4  Tue Jul 15 18:04:32 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.58.2.4.2.11.2.3 2008/07/05 07:10:25 hirokawa Exp $
+dnl $Id: config.m4,v 1.58.2.4.2.11.2.4 2008/07/15 18:04:32 moriyoshi Exp $
 dnl
 
 AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [
@@ -72,19 +72,17 @@
return 0;
 }
 int main() { return foo(10, , 3.14); }
-  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], 
- [
-  dnl cross-compile needs something here
-case $host_alias in
-*netware*)
-cv_php_mbstring_stdarg=yes
-;;
-*)
-cv_php_mbstring_stdarg=no
-;;
-esac
-]
-)
+  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
+dnl cross-compile needs something here
+case $host_alias in
+*netware*)
+  cv_php_mbstring_stdarg=yes
+  ;;
+*)
+  cv_php_mbstring_stdarg=no
+  ;;
+esac
+  ])
 ])
 
 AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h 
sys/times.h stdarg.h])
@@ -98,7 +96,6 @@
 
 AC_DEFINE([HAVE_MBREGEX], 1, [whether to have multibyte regex support])
 
-
 if test $PHP_MBREGEX_BACKTRACK != no; then
   AC_DEFINE([USE_COMBINATION_EXPLOSION_CHECK],1,[whether to check 
multibyte regex backtrack])
 fi



-- 
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/mbstring config.m4

2008-07-15 Thread Moriyoshi Koizumi
moriyoshi   Tue Jul 15 18:07:42 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mbstring   config.m4 
  Log:
  * MFH: indentation fix only.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/config.m4?r1=1.58.2.4.2.11r2=1.58.2.4.2.12diff_format=u
Index: php-src/ext/mbstring/config.m4
diff -u php-src/ext/mbstring/config.m4:1.58.2.4.2.11 
php-src/ext/mbstring/config.m4:1.58.2.4.2.12
--- php-src/ext/mbstring/config.m4:1.58.2.4.2.11Tue Sep 18 21:35:39 2007
+++ php-src/ext/mbstring/config.m4  Tue Jul 15 18:07:42 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.58.2.4.2.11 2007/09/18 21:35:39 hirokawa Exp $
+dnl $Id: config.m4,v 1.58.2.4.2.12 2008/07/15 18:07:42 moriyoshi Exp $
 dnl
 
 AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [
@@ -72,19 +72,17 @@
return 0;
 }
 int main() { return foo(10, , 3.14); }
-  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], 
- [
-  dnl cross-compile needs something here
-case $host_alias in
-*netware*)
-cv_php_mbstring_stdarg=yes
-;;
-*)
-cv_php_mbstring_stdarg=no
-;;
-esac
-]
-)
+  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
+dnl cross-compile needs something here
+case $host_alias in
+*netware*)
+  cv_php_mbstring_stdarg=yes
+  ;;
+*)
+  cv_php_mbstring_stdarg=no
+  ;;
+esac
+  ])
 ])
 
 AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h 
sys/times.h stdarg.h])
@@ -98,7 +96,6 @@
 
 AC_DEFINE([HAVE_MBREGEX], 1, [whether to have multibyte regex support])
 
-
 if test $PHP_MBREGEX_BACKTRACK != no; then
   AC_DEFINE([USE_COMBINATION_EXPLOSION_CHECK],1,[whether to check 
multibyte regex backtrack])
 fi



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



[PHP-CVS] cvs: php-src /ext/mbstring config.m4 mbstring.c php_mbregex.c php_mbregex.h php_onig_compat.h /ext/mbstring/oniguruma oniguruma.h php_onig_compat.h

2008-07-15 Thread Moriyoshi Koizumi
moriyoshi   Wed Jul 16 02:29:14 2008 UTC

  Added files: 
/php-src/ext/mbstring   php_onig_compat.h 

  Removed files:   
/php-src/ext/mbstring/oniguruma php_onig_compat.h 

  Modified files:  
/php-src/ext/mbstring   config.m4 mbstring.c php_mbregex.c 
php_mbregex.h 
/php-src/ext/mbstring/oniguruma oniguruma.h 
  Log:
  - Added a new configure option --with-onig=[DIR] that allows the extension
to link to the external oniguruma library.
  - Prevent libmbfl files from being installed when --with-libmbfl is specified.
  - Fixed mb_ereg_replace() to work with unicode strings.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/config.m4?r1=1.68r2=1.69diff_format=u
Index: php-src/ext/mbstring/config.m4
diff -u php-src/ext/mbstring/config.m4:1.68 php-src/ext/mbstring/config.m4:1.69
--- php-src/ext/mbstring/config.m4:1.68 Tue Jul 15 18:04:14 2008
+++ php-src/ext/mbstring/config.m4  Wed Jul 16 02:29:14 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.68 2008/07/15 18:04:14 moriyoshi Exp $
+dnl $Id: config.m4,v 1.69 2008/07/16 02:29:14 moriyoshi Exp $
 dnl
 
 AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [
@@ -26,6 +26,10 @@
   PHP_MBSTRING_CFLAGS=$PHP_MBSTRING_CFLAGS $1
 ])
 
+AC_DEFUN([PHP_MBSTRING_ADD_INSTALL_HEADERS], [
+  PHP_MBSTRING_INSTALL_HEADERS=$PHP_MBSTRING_INSTALL_HEADERS $1
+])
+
 AC_DEFUN([PHP_MBSTRING_EXTENSION], [
   PHP_NEW_EXTENSION(mbstring, $PHP_MBSTRING_SOURCES, $ext_shared,, 
$PHP_MBSTRING_CFLAGS)
   PHP_SUBST(MBSTRING_SHARED_LIBADD)
@@ -56,12 +60,22 @@
 #include $out
 EOF
   done
+  PHP_MBSTRING_ADD_INSTALL_HEADERS([mbstring.h])
+  PHP_INSTALL_HEADERS([ext/mbstring], [$PHP_MBSTRING_INSTALL_HEADERS])
 ])
 
 AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
   if test $PHP_MBREGEX = yes; then
-AC_CACHE_CHECK(for variable length prototypes and stdarg.h, 
cv_php_mbstring_stdarg, [
-  AC_TRY_RUN([
+if test $PHP_ONIG = yes || test $PHP_ONIG = no; then
+  dnl
+  dnl Bundled oniguruma
+  dnl
+  if test $PHP_MBREGEX_BACKTRACK != no; then
+AC_DEFINE([USE_COMBINATION_EXPLOSION_CHECK],1,[whether to check 
multibyte regex backtrack])
+  fi
+
+  AC_CACHE_CHECK(for variable length prototypes and stdarg.h, 
cv_php_mbstring_stdarg, [
+AC_TRY_RUN([
 #include stdarg.h
 int foo(int x, ...) {
va_list va;
@@ -72,83 +86,119 @@
return 0;
 }
 int main() { return foo(10, , 3.14); }
-  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
-dnl cross-compile needs something here
-case $host_alias in
-*netware*)
-cv_php_mbstring_stdarg=yes
-;;
-*)
-cv_php_mbstring_stdarg=no
-;;
-esac
+], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
+  dnl cross-compile needs something here
+  case $host_alias in
+  *netware*)
+  cv_php_mbstring_stdarg=yes
+  ;;
+  *)
+  cv_php_mbstring_stdarg=no
+  ;;
+  esac
+])
   ])
-])
 
-AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h 
sys/times.h stdarg.h])
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(short, 2)
-AC_CHECK_SIZEOF(long, 4)
-AC_C_CONST
-AC_HEADER_TIME 
-AC_FUNC_ALLOCA
-AC_FUNC_MEMCMP
+  AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h 
sys/times.h stdarg.h])
+  AC_CHECK_SIZEOF(int, 4)
+  AC_CHECK_SIZEOF(short, 2)
+  AC_CHECK_SIZEOF(long, 4)
+  AC_C_CONST
+  AC_HEADER_TIME 
+  AC_FUNC_ALLOCA
+  AC_FUNC_MEMCMP
+  AC_CHECK_HEADER([stdarg.h], [
+AC_DEFINE([HAVE_STDARG_PROTOTYPES], [1], [Define to 1 if you have the 
stdarg.h header file.])
+  ], [])
+  AC_DEFINE([PHP_ONIG_BUNDLED], [1], [Define to 1 if the bundled oniguruma 
is used])
+  PHP_MBSTRING_ADD_CFLAG([-DNOT_RUBY])
+  PHP_MBSTRING_ADD_BUILD_DIR([oniguruma])
+  PHP_MBSTRING_ADD_BUILD_DIR([oniguruma/enc])
+  PHP_MBSTRING_ADD_INCLUDE([oniguruma])
+  PHP_MBSTRING_ADD_CONFIG_HEADER([oniguruma/config.h])
+  PHP_MBSTRING_ADD_SOURCES([
+oniguruma/regcomp.c
+oniguruma/regerror.c
+oniguruma/regexec.c
+oniguruma/reggnu.c
+oniguruma/regparse.c
+oniguruma/regenc.c
+oniguruma/regext.c
+oniguruma/regsyntax.c
+oniguruma/regtrav.c
+oniguruma/regversion.c
+oniguruma/st.c
+oniguruma/enc/unicode.c
+oniguruma/enc/ascii.c
+oniguruma/enc/utf8.c
+oniguruma/enc/euc_jp.c
+oniguruma/enc/euc_tw.c
+oniguruma/enc/euc_kr.c
+oniguruma/enc/sjis.c
+oniguruma/enc/iso8859_1.c
+oniguruma/enc/iso8859_2.c
+oniguruma/enc/iso8859_3.c
+oniguruma/enc/iso8859_4.c
+oniguruma/enc/iso8859_5.c
+oniguruma/enc/iso8859_6.c
+oniguruma/enc/iso8859_7.c
+

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mbstring config.m4 mbstring.c php_mbregex.c php_mbregex.h php_onig_compat.h /ext/mbstring/oniguruma oniguruma.h php_onig_compat.h

2008-07-15 Thread Moriyoshi Koizumi
moriyoshi   Wed Jul 16 02:30:49 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/mbstring   php_onig_compat.h 

  Removed files:   
/php-src/ext/mbstring/oniguruma php_onig_compat.h 

  Modified files:  
/php-src/ext/mbstring   config.m4 mbstring.c php_mbregex.c 
php_mbregex.h 
/php-src/ext/mbstring/oniguruma oniguruma.h 
  Log:
  - MFH: Added a new configure option --with-onig=[DIR] that allows the 
extension
to link to the external oniguruma library.
  - MFH: Prevent libmbfl files from being installed when --with-libmbfl is
specified.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/config.m4?r1=1.58.2.4.2.11.2.4r2=1.58.2.4.2.11.2.5diff_format=u
Index: php-src/ext/mbstring/config.m4
diff -u php-src/ext/mbstring/config.m4:1.58.2.4.2.11.2.4 
php-src/ext/mbstring/config.m4:1.58.2.4.2.11.2.5
--- php-src/ext/mbstring/config.m4:1.58.2.4.2.11.2.4Tue Jul 15 18:04:32 2008
+++ php-src/ext/mbstring/config.m4  Wed Jul 16 02:30:48 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.58.2.4.2.11.2.4 2008/07/15 18:04:32 moriyoshi Exp $
+dnl $Id: config.m4,v 1.58.2.4.2.11.2.5 2008/07/16 02:30:48 moriyoshi Exp $
 dnl
 
 AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [
@@ -26,6 +26,10 @@
   PHP_MBSTRING_CFLAGS=$PHP_MBSTRING_CFLAGS $1
 ])
 
+AC_DEFUN([PHP_MBSTRING_ADD_INSTALL_HEADERS], [
+  PHP_MBSTRING_INSTALL_HEADERS=$PHP_MBSTRING_INSTALL_HEADERS $1
+])
+
 AC_DEFUN([PHP_MBSTRING_EXTENSION], [
   PHP_NEW_EXTENSION(mbstring, $PHP_MBSTRING_SOURCES, $ext_shared,, 
$PHP_MBSTRING_CFLAGS)
   PHP_SUBST(MBSTRING_SHARED_LIBADD)
@@ -56,12 +60,22 @@
 #include $out
 EOF
   done
+  PHP_MBSTRING_ADD_INSTALL_HEADERS([mbstring.h])
+  PHP_INSTALL_HEADERS([ext/mbstring], [$PHP_MBSTRING_INSTALL_HEADERS])
 ])
 
 AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
   if test $PHP_MBREGEX = yes; then
-AC_CACHE_CHECK(for variable length prototypes and stdarg.h, 
cv_php_mbstring_stdarg, [
-  AC_TRY_RUN([
+if test $PHP_ONIG = yes || test $PHP_ONIG = no; then
+  dnl
+  dnl Bundled oniguruma
+  dnl
+  if test $PHP_MBREGEX_BACKTRACK != no; then
+AC_DEFINE([USE_COMBINATION_EXPLOSION_CHECK],1,[whether to check 
multibyte regex backtrack])
+  fi
+
+  AC_CACHE_CHECK(for variable length prototypes and stdarg.h, 
cv_php_mbstring_stdarg, [
+AC_TRY_RUN([
 #include stdarg.h
 int foo(int x, ...) {
va_list va;
@@ -72,84 +86,119 @@
return 0;
 }
 int main() { return foo(10, , 3.14); }
-  ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
-dnl cross-compile needs something here
-case $host_alias in
-*netware*)
+], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
+  dnl cross-compile needs something here
+  case $host_alias in
+  *netware*)
   cv_php_mbstring_stdarg=yes
   ;;
-*)
+  *)
   cv_php_mbstring_stdarg=no
   ;;
-esac
+  esac
+])
   ])
-])
 
-AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h 
sys/times.h stdarg.h])
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(short, 2)
-AC_CHECK_SIZEOF(long, 4)
-AC_C_CONST
-AC_HEADER_TIME 
-AC_FUNC_ALLOCA
-AC_FUNC_MEMCMP
+  AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h 
sys/times.h stdarg.h])
+  AC_CHECK_SIZEOF(int, 4)
+  AC_CHECK_SIZEOF(short, 2)
+  AC_CHECK_SIZEOF(long, 4)
+  AC_C_CONST
+  AC_HEADER_TIME 
+  AC_FUNC_ALLOCA
+  AC_FUNC_MEMCMP
+  AC_CHECK_HEADER([stdarg.h], [
+AC_DEFINE([HAVE_STDARG_PROTOTYPES], [1], [Define to 1 if you have the 
stdarg.h header file.])
+  ], [])
+  AC_DEFINE([PHP_ONIG_BUNDLED], [1], [Define to 1 if the bundled oniguruma 
is used])
+  PHP_MBSTRING_ADD_CFLAG([-DNOT_RUBY])
+  PHP_MBSTRING_ADD_BUILD_DIR([oniguruma])
+  PHP_MBSTRING_ADD_BUILD_DIR([oniguruma/enc])
+  PHP_MBSTRING_ADD_INCLUDE([oniguruma])
+  PHP_MBSTRING_ADD_CONFIG_HEADER([oniguruma/config.h])
+  PHP_MBSTRING_ADD_SOURCES([
+oniguruma/regcomp.c
+oniguruma/regerror.c
+oniguruma/regexec.c
+oniguruma/reggnu.c
+oniguruma/regparse.c
+oniguruma/regenc.c
+oniguruma/regext.c
+oniguruma/regsyntax.c
+oniguruma/regtrav.c
+oniguruma/regversion.c
+oniguruma/st.c
+oniguruma/enc/unicode.c
+oniguruma/enc/ascii.c
+oniguruma/enc/utf8.c
+oniguruma/enc/euc_jp.c
+oniguruma/enc/euc_tw.c
+oniguruma/enc/euc_kr.c
+oniguruma/enc/sjis.c
+oniguruma/enc/iso8859_1.c
+oniguruma/enc/iso8859_2.c
+oniguruma/enc/iso8859_3.c
+oniguruma/enc/iso8859_4.c
+oniguruma/enc/iso8859_5.c
+oniguruma/enc/iso8859_6.c
+oniguruma/enc/iso8859_7.c
+oniguruma/enc/iso8859_8.c
+

[PHP-CVS] cvs: php-src /ext/mbstring/oniguruma oniguruma.h

2008-07-15 Thread Moriyoshi Koizumi
moriyoshi   Wed Jul 16 02:37:53 2008 UTC

  Modified files:  
/php-src/ext/mbstring/oniguruma oniguruma.h 
  Log:
  - Oops.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/oniguruma.h?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/mbstring/oniguruma/oniguruma.h
diff -u php-src/ext/mbstring/oniguruma/oniguruma.h:1.7 
php-src/ext/mbstring/oniguruma/oniguruma.h:1.8
--- php-src/ext/mbstring/oniguruma/oniguruma.h:1.7  Wed Jul 16 02:29:14 2008
+++ php-src/ext/mbstring/oniguruma/oniguruma.h  Wed Jul 16 02:37:53 2008
@@ -29,12 +29,12 @@
  * SUCH DAMAGE.
  */
 
+#include ../php_onig_compat.h
+
 #ifdef __cplusplus
 extern C {
 #endif
 
-#include ../php_onig_compat.h
-
 #define ONIGURUMA
 #define ONIGURUMA_VERSION_MAJOR   3
 #define ONIGURUMA_VERSION_MINOR   7



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