[PHP-CVS] com php-src: Fix bug #61519 test fails, should pass - ext/zlib/tests/bug60761.phpt: ext/zlib/tests/bug60761.phpt

2012-03-27 Thread Anatoliy Belsky
Commit:bcfcfb2fc5f358ebfdc76a773b20b3fc056b20c0
Author:Anatoliy Belsky a...@php.net Tue, 27 Mar 2012 18:02:31 
+0200
Parents:   b638d3020c79e15c7187f25175a956fb9e3fe213
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bcfcfb2fc5f358ebfdc76a773b20b3fc056b20c0

Log:
Fix bug #61519  test fails, should pass - ext/zlib/tests/bug60761.phpt

Bugs:
https://bugs.php.net/61519
https://bugs.php.net/60761

Changed paths:
  M  ext/zlib/tests/bug60761.phpt


Diff:
bcfcfb2fc5f358ebfdc76a773b20b3fc056b20c0
diff --git a/ext/zlib/tests/bug60761.phpt b/ext/zlib/tests/bug60761.phpt
index 7f4fffd..340d878 100644
--- a/ext/zlib/tests/bug60761.phpt
+++ b/ext/zlib/tests/bug60761.phpt
@@ -1,34 +1,53 @@
 --TEST--
-checks zlib compression size is always the same no matter how many times its 
run
+checks zlib compression output size is always the same
 --SKIPIF--
 ?php if (!extension_loaded(zlib)) print skip; ?
+--CGI--
+1
 --FILE--
 ?php
 
-ob_start();
-phpinfo();
-$html = ob_get_clean();
+// the INI directives from bug #60761 report
+ini_set('zlib.output_compression', '4096');
+ini_set('zlib.output_compression_level', '9');
+
+// try to duplicate the original bug by running this as a CGI
+// test using ob_start and zlib.output_compression(or ob_gzhandler)
+// so it follows more of the original code-path than just calling
+// gzcompress on CLI or CGI
 
 $lens = array();
 
-for ( $i=0 ; $i  200 ; $i++ ) {
-   //zlib.output_compression = On
-   //zlib.output_compression_level = 9
-   $compressed = gzcompress($html, 9);
-   
-   $len = strlen($compressed);
+for ( $i=0 ; $i  100 ; $i++ ) {
+
+   // can't use ob_gzhandler with zlib.output_compression
+   ob_start();//ob_gzhandler);
+   phpinfo();
+   $html = ob_get_clean();
+
+   $len = strlen($html);
 
$lens[$len] = $len;
 } 
  
 $lens = array_values($lens);
 
-echo Compressed lengths\n;
-var_dump($lens);
+echo Compressed Lengths\n;
+
+// pass == only ONE length for all iterations
+// (length didn't change during run)
+// 
+// hard to anticipate what 'correct' length should be since
+// return value of phpinfo() will vary between installations...
+// just check that there is only one length
+// 
+var_dump($lens); // show lengths to help triage in case of failure
+ 
+// expected headers since its CGI
 
 ?
---EXPECTREGEX--
-Compressed lengths
+--EXPECTF--
+%s
 array(1) {
   [0]=
   int(%d)


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



[PHP-CVS] com php-src: Merge branch '5.3' into 5.4: ext/zlib/tests/bug60761.phpt

2012-03-27 Thread Anatoliy Belsky
Commit:b7596eaa1b406f7d768e49c53f03bb7cdfa25cab
Author:Anatoliy Belsky a...@php.net Tue, 27 Mar 2012 18:16:02 
+0200
Parents:   8d7a489b97eb436a5e99c008e57fdb068c86ec67 
bcfcfb2fc5f358ebfdc76a773b20b3fc056b20c0
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b7596eaa1b406f7d768e49c53f03bb7cdfa25cab

Log:
Merge branch '5.3' into 5.4

* 5.3:
  Fix bug #61519test fails, should pass - ext/zlib/tests/bug60761.phpt

Conflicts:
ext/zlib/tests/bug60761.phpt

Bugs:
https://bugs.php.net/61519
https://bugs.php.net/60761
https://bugs.php.net/60761

Changed paths:
  MM  ext/zlib/tests/bug60761.phpt


Diff:
b7596eaa1b406f7d768e49c53f03bb7cdfa25cab
diff --combined ext/zlib/tests/bug60761.phpt
index 823173e,340d878..1e9fe69
--- a/ext/zlib/tests/bug60761.phpt
+++ b/ext/zlib/tests/bug60761.phpt
@@@ -1,35 -1,54 +1,54 @@@
 ---TEST--
 -checks zlib compression output size is always the same
 ---SKIPIF--
 -?php if (!extension_loaded(zlib)) print skip; ?
 ---CGI--
 -1
 ---FILE--
 -?php
 -
 -// the INI directives from bug #60761 report
 -ini_set('zlib.output_compression', '4096');
 -ini_set('zlib.output_compression_level', '9');
 -
 -// try to duplicate the original bug by running this as a CGI
 -// test using ob_start and zlib.output_compression(or ob_gzhandler)
 -// so it follows more of the original code-path than just calling
 -// gzcompress on CLI or CGI
 -
 -$lens = array();
 -
 -for ( $i=0 ; $i  100 ; $i++ ) {
 -
 -  // can't use ob_gzhandler with zlib.output_compression
 -  ob_start();//ob_gzhandler);
 -  phpinfo();
 -  $html = ob_get_clean();
 -
 -  $len = strlen($html);
 -
 -  $lens[$len] = $len;
 -} 
 - 
 -$lens = array_values($lens);
 -
 -echo Compressed Lengths\n;
 -
 -// pass == only ONE length for all iterations
 -// (length didn't change during run)
 -// 
 -// hard to anticipate what 'correct' length should be since
 -// return value of phpinfo() will vary between installations...
 -// just check that there is only one length
 -// 
 -var_dump($lens); // show lengths to help triage in case of failure
 - 
 -// expected headers since its CGI
 -
 -?
 ---EXPECTF--
 -%s
 -array(1) {
 -  [0]=
 -  int(%d)
 -}
 +--TEST--
- checks zlib compression size is always the same no matter how many times its 
run
++checks zlib compression output size is always the same
 +--SKIPIF--
 +?php if (!extension_loaded(zlib)) print skip; ?
++--CGI--
++1
 +--FILE--
 +?php
 +
- ob_start();
- phpinfo();
- $html = ob_get_clean();
++// the INI directives from bug #60761 report
++ini_set('zlib.output_compression', '4096');
++ini_set('zlib.output_compression_level', '9');
++
++// try to duplicate the original bug by running this as a CGI
++// test using ob_start and zlib.output_compression(or ob_gzhandler)
++// so it follows more of the original code-path than just calling
++// gzcompress on CLI or CGI
 +
 +$lens = array();
 +
- for ( $i=0 ; $i  200 ; $i++ ) {
-   //zlib.output_compression = On
-   //zlib.output_compression_level = 9
-   $compressed = gzcompress($html, 9);
-   
-   $len = strlen($compressed);
++for ( $i=0 ; $i  100 ; $i++ ) {
++
++  // can't use ob_gzhandler with zlib.output_compression
++  ob_start();//ob_gzhandler);
++  phpinfo();
++  $html = ob_get_clean();
++
++  $len = strlen($html);
 +
 +  $lens[$len] = $len;
 +} 
 + 
 +$lens = array_values($lens);
 +
- echo Compressed lengths\n;
- var_dump($lens);
++echo Compressed Lengths\n;
++
++// pass == only ONE length for all iterations
++// (length didn't change during run)
++// 
++// hard to anticipate what 'correct' length should be since
++// return value of phpinfo() will vary between installations...
++// just check that there is only one length
++// 
++var_dump($lens); // show lengths to help triage in case of failure
++ 
++// expected headers since its CGI
 +
 +?
 +--EXPECTF--
- Compressed lengths
++%s
 +array(1) {
 +  [0]=
 +  int(%d)
 +}


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



[PHP-CVS] com php-src: Fix bug #61518 skip on windows, fix on linux - ext/standard/tests/streams/bug60106.phpt: ext/standard/tests/streams/bug60106.phpt

2012-03-27 Thread Anatoliy Belsky
Commit:da85d5b4a00943a267db910299bdaee04c081c25
Author:Anatoliy Belsky a...@php.net Tue, 27 Mar 2012 18:49:59 
+0200
Parents:   bcfcfb2fc5f358ebfdc76a773b20b3fc056b20c0
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=da85d5b4a00943a267db910299bdaee04c081c25

Log:
Fix bug #61518 skip on windows, fix on linux - 
ext/standard/tests/streams/bug60106.phpt

Bugs:
https://bugs.php.net/61518
https://bugs.php.net/60106

Changed paths:
  M  ext/standard/tests/streams/bug60106.phpt


Diff:
da85d5b4a00943a267db910299bdaee04c081c25
diff --git a/ext/standard/tests/streams/bug60106.phpt 
b/ext/standard/tests/streams/bug60106.phpt
index dc8b540..c9e94e7 100644
--- a/ext/standard/tests/streams/bug60106.phpt
+++ b/ext/standard/tests/streams/bug60106.phpt
@@ -1,5 +1,10 @@
 --TEST--
 Bug#60106 (stream_socket_server silently truncates long unix socket paths)
+--SKIPIF--
+?php
+if( substr(PHP_OS, 0, 3) == WIN )
+  die(skip. Do not run on Windows);
+?
 --FILE--
 ?php
error_reporting(E_ALL | E_NOTICE);
@@ -9,6 +14,6 @@ Bug#60106 (stream_socket_server silently truncates long unix 
socket paths)
 --EXPECTF--
 Notice: stream_socket_server(): socket path exceeded the maximum allowed 
length of %d bytes and was truncated in %s on line %d
 
-Warning: stream_socket_server(): unable to connect to 
unix:///tmp/aaa
 in %s on line %d
+Warning: stream_socket_server(): unable to connect to 
unix:///tmp/aa

[PHP-CVS] com php-src: Bug #61504 TSRML_FETCH() must be last: ext/fileinfo/libmagic/funcs.c

2012-03-28 Thread Anatoliy Belsky
Commit:e7fa402c7ccbff8a6ff8af776192416747db0d77
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 12:05:20 
+0200
Parents:   067603106eba10e7648ccfe11834b10580fde2a9
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e7fa402c7ccbff8a6ff8af776192416747db0d77

Log:
Bug #61504 TSRML_FETCH() must be last

Bugs:
https://bugs.php.net/61504

Changed paths:
  M  ext/fileinfo/libmagic/funcs.c


Diff:
e7fa402c7ccbff8a6ff8af776192416747db0d77
diff --git a/ext/fileinfo/libmagic/funcs.c b/ext/fileinfo/libmagic/funcs.c
index ce62d9b..0fc9201 100644
--- a/ext/fileinfo/libmagic/funcs.c
+++ b/ext/fileinfo/libmagic/funcs.c
@@ -435,11 +435,11 @@ file_replace(struct magic_set *ms, const char *pat, const 
char *rep)
 {
zval *patt;
int opts = 0;
-   TSRMLS_FETCH();
pcre_cache_entry *pce;
char *res;
zval *repl;
int res_len, rep_cnt;
+   TSRMLS_FETCH();
 
MAKE_STD_ZVAL(patt);
ZVAL_STRINGL(patt, pat, strlen(pat), 0);
@@ -477,31 +477,3 @@ file_replace(struct magic_set *ms, const char *pat, const 
char *rep)
return rep_cnt;
 }
 
-#if 0
-protected int
-file_replace(struct magic_set *ms, const char *pat, const char *rep)
-{
-   regex_t rx;
-   int rc;
-
-   rc = regcomp(rx, pat, REG_EXTENDED);
-   if (rc) {
-   char errmsg[512];
-   (void)regerror(rc, rx, errmsg, sizeof(errmsg));
-   file_magerror(ms, regex error %d, (%s), rc, errmsg);
-   return -1;
-   } else {
-   regmatch_t rm;
-   int nm = 0;
-   while (regexec(rx, ms-o.buf, 1, rm, 0) == 0) {
-   ms-o.buf[rm.rm_so] = '\0';
-   if (file_printf(ms, %s%s, rep,
-   rm.rm_eo != 0 ? ms-o.buf + rm.rm_eo : ) == -1)
-   return -1;
-   nm++;
-   }
-   regfree(rx);
-   return nm;
-   }
-}
-#endif


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



[PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-03-28 Thread Anatoliy Belsky
Commit:11f04c3524cc86a5c4cdf748a107801116604184
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 12:06:09 
+0200
Parents:   e7fa402c7ccbff8a6ff8af776192416747db0d77
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=11f04c3524cc86a5c4cdf748a107801116604184

Log:
Bug 61504 updated libmagic.patch

Bugs:
https://bugs.php.net/61504

Changed paths:
  M  ext/fileinfo/libmagic.patch

11f04c3524cc86a5c4cdf748a107801116604184
diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch
index bd98e08..ad5293a 100644
--- a/ext/fileinfo/libmagic.patch
+++ b/ext/fileinfo/libmagic.patch
@@ -1,6 +1,6 @@
 diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
 libmagic.orig/apprentice.c 2012-03-26 20:56:34.251798486 +0200
-+++ libmagic/apprentice.c  2012-03-26 13:30:32.207768336 +0200
+--- libmagic.orig/apprentice.c 2012-03-28 12:00:34.017709605 +0200
 libmagic/apprentice.c  2012-03-28 01:53:04.283305402 +0200
 @@ -29,6 +29,8 @@
   * apprentice - make one pass through /etc/magic, learning its secrets.
   */
@@ -729,8 +729,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m-str_flags = swap4(m-str_flags);
}
 diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
 libmagic.orig/ascmagic.c   2012-03-26 20:56:34.251798486 +0200
-+++ libmagic/ascmagic.c2012-03-26 17:13:01.075786465 +0200
+--- libmagic.orig/ascmagic.c   2012-03-28 12:00:34.017709605 +0200
 libmagic/ascmagic.c2012-03-28 01:53:04.287303117 +0200
 @@ -139,10 +139,8 @@
/* malloc size is a conservative overestimate; could be
   improved, or at least realloced after conversion. */
@@ -756,8 +756,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
  }
 Only in libmagic.orig: asprintf.c
 diff -u libmagic.orig/cdf.c libmagic/cdf.c
 libmagic.orig/cdf.c2012-03-26 20:56:33.971784616 +0200
-+++ libmagic/cdf.c 2012-03-26 11:34:11.219768705 +0200
+--- libmagic.orig/cdf.c2012-03-28 12:00:34.012709598 +0200
 libmagic/cdf.c 2012-03-28 01:53:04.299331601 +0200
 @@ -43,7 +43,17 @@
  #include err.h
  #endif
@@ -807,8 +807,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
(void)fprintf(stderr, timestamp %s\n, buf);
} else {
 diff -u libmagic.orig/cdf.h libmagic/cdf.h
 libmagic.orig/cdf.h2012-03-26 20:56:34.251798486 +0200
-+++ libmagic/cdf.h 2012-03-26 16:14:34.644814962 +0200
+--- libmagic.orig/cdf.h2012-03-28 12:00:34.017709605 +0200
 libmagic/cdf.h 2012-03-28 01:53:04.299331601 +0200
 @@ -35,7 +35,7 @@
  #ifndef _H_CDF_
  #define _H_CDF_
@@ -845,8 +845,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
  void cdf_swap_header(cdf_header_t *);
  void cdf_unpack_header(cdf_header_t *, char *);
 diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
 libmagic.orig/cdf_time.c   2012-03-26 20:56:34.131813623 +0200
-+++ libmagic/cdf_time.c2012-03-26 11:34:11.223787722 +0200
+--- libmagic.orig/cdf_time.c   2012-03-28 12:00:34.017709605 +0200
 libmagic/cdf_time.c2012-03-28 01:53:04.299331601 +0200
 @@ -96,7 +96,7 @@
  }
  
@@ -904,8 +904,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const char *ref = Sat Apr 23 01:30:00 1977;
char *p, *q;
 diff -u libmagic.orig/compress.c libmagic/compress.c
 libmagic.orig/compress.c   2012-03-26 20:56:33.975771785 +0200
-+++ libmagic/compress.c2012-03-26 11:34:11.231789506 +0200
+--- libmagic.orig/compress.c   2012-03-28 12:00:34.012709598 +0200
 libmagic/compress.c2012-03-28 01:53:04.299331601 +0200
 @@ -32,6 +32,7 @@
   *uncompress(method, old, n, newch) - uncompress old into new, 
   *using method, return sizeof new
@@ -1042,12 +1042,10 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
 -#endif
 +#endif /* if PHP_FILEINFO_UNCOMPRESS */
 Only in libmagic: config.h
-Only in libmagic.orig: .deps
-Only in libmagic.orig: file
 Only in libmagic.orig: file.c
 diff -u libmagic.orig/file.h libmagic/file.h
 libmagic.orig/file.h   2012-03-26 20:56:34.251798486 +0200
-+++ libmagic/file.h2012-03-26 16:11:01.839769578 +0200
+--- libmagic.orig/file.h   2012-03-28 12:00:34.017709605 +0200
 libmagic/file.h2012-03-28 01:53:04.304322598 +0200
 @@ -33,11 +33,9 @@
  #ifndef __file_h__
  #define __file_h__
@@ -1199,11 +1197,10 @@ diff -u libmagic.orig/file.h libmagic/file.h
  size_t strlcat(char *dst, const char *src, size_t siz);
  #endif
  #ifndef HAVE_GETLINE
-Only in libmagic: .file.h.swp
 Only in libmagic.orig: file_opts.h
 diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
 libmagic.orig/fsmagic.c2012-03-26 20:56:33.975771785 +0200
-+++ libmagic/fsmagic.c 2012-03-26 11:34:11.263771641 +0200
+--- libmagic.orig/fsmagic.c2012-03-28 12:00:34.012709598 +0200
 libmagic/fsmagic.c 2012-03-28 01:53

[PHP-CVS] com php-src: Fix bug #61468 ext/phar/tests/phar_oo_005.phpt fails: ext/phar/tests/phar_oo_005.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:0b20329aaf4228e071ab03f4e96adeafa6c48f52
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 12:54:19 
+0200
Parents:   11f04c3524cc86a5c4cdf748a107801116604184
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0b20329aaf4228e071ab03f4e96adeafa6c48f52

Log:
Fix bug #61468 ext/phar/tests/phar_oo_005.phpt fails

Bugs:
https://bugs.php.net/61468

Changed paths:
  M  ext/phar/tests/phar_oo_005.phpt


Diff:
0b20329aaf4228e071ab03f4e96adeafa6c48f52
diff --git a/ext/phar/tests/phar_oo_005.phpt b/ext/phar/tests/phar_oo_005.phpt
index 2d4cbd0..cb3f298 100755
--- a/ext/phar/tests/phar_oo_005.phpt
+++ b/ext/phar/tests/phar_oo_005.phpt
@@ -40,25 +40,25 @@ string(14) phar://*/a.php
 string(14) phar://*/a.php
 string(0) 
 string(5) a.php
-string(5) a.php
+string(21) phar_oo_test.phar.php
 string(16) phar://*/b/c.php
 string(16) phar://*/b/c.php
 string(1) b
 string(7) b/c.php
-string(5) c.php
+string(1) b
 string(16) phar://*/b/d.php
 string(16) phar://*/b/d.php
 string(1) b
 string(7) b/d.php
-string(5) d.php
+string(1) b
 string(14) phar://*/b.php
 string(14) phar://*/b.php
 string(0) 
 string(5) b.php
-string(5) b.php
+string(21) phar_oo_test.phar.php
 string(14) phar://*/e.php
 string(14) phar://*/e.php
 string(0) 
 string(5) e.php
-string(5) e.php
+string(21) phar_oo_test.phar.php
 ===DONE===


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/intl/tests/dateformat_clone.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:105a9a9d455a29951add13f5add9e0b59520f79e
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 14:01:14 
+0200
Parents:   d406f2b034a3b41e94aaf7bea0535aca196853d7 
103995ba22ed13e5924acdad91a8dc444d72cde1
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=105a9a9d455a29951add13f5add9e0b59520f79e

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix bug #61448 intl tests fail with icu = 4.8

Bugs:
https://bugs.php.net/61448

Changed paths:
  MM  ext/intl/tests/dateformat_clone.phpt


Diff:
105a9a9d455a29951add13f5add9e0b59520f79e
diff --combined ext/intl/tests/dateformat_clone.phpt
index 886a98f,f060444..f060444
mode 100644,100755..100644
--- a/ext/intl/tests/dateformat_clone.phpt
+++ b/ext/intl/tests/dateformat_clone.phpt
@@@ -1,7 -1,8 +1,8 @@@
  --TEST--
- Cloning datefmt
+ Cloning datefmt icu = 4.2
  --SKIPIF--
  ?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
+ ?php if(version_compare(INTL_ICU_VERSION, '4.3', '') != 1) print 'skip'; ?
  --FILE--
  ?php
  include_once( 'ut_common.inc' );


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



[PHP-CVS] com php-src: Fix bug #61404 ext\openssl\tests\021.phpt fails: ext/openssl/tests/021.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:4c5b427124a2af3d951fed869cc86452e8b6290c
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 16:04:56 
+0200
Parents:   fa7f215d19b3546c028b2cfb9864d28a06ac29af
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4c5b427124a2af3d951fed869cc86452e8b6290c

Log:
Fix bug #61404 ext\openssl\tests\021.phpt fails

Bugs:
https://bugs.php.net/61404

Changed paths:
  M  ext/openssl/tests/021.phpt


Diff:
4c5b427124a2af3d951fed869cc86452e8b6290c
diff --git a/ext/openssl/tests/021.phpt b/ext/openssl/tests/021.phpt
index 00e2158..391b6a5 100644
--- a/ext/openssl/tests/021.phpt
+++ b/ext/openssl/tests/021.phpt
@@ -8,6 +8,8 @@ $cert = file:// . dirname(__FILE__) . /cert.crt;
 $priv = file:// . dirname(__FILE__) . /private.key;
 $wrong = wrong;
 $pub = file:// . dirname(__FILE__) . /public.key;
+$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';
+$config_arg = array('config' = $config);
 
 $dn = array(
countryName = BR,
@@ -21,14 +23,15 @@ $args = array(
digest_alg = sha1,
private_key_bits = 2048,
private_key_type = OPENSSL_KEYTYPE_DSA,
-   encrypt_key = true
+   encrypt_key = true,
+   config = $config
);
 
-$privkey = openssl_pkey_new();
+$privkey = openssl_pkey_new($config_arg);
 $csr = openssl_csr_new($dn, $privkey, $args);
 var_dump(openssl_csr_sign($csr, null, $privkey, 365, $args));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365));
-var_dump(openssl_csr_sign($csr, $cert, $priv, 365));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
+var_dump(openssl_csr_sign($csr, $cert, $priv, 365, $config_arg));
 var_dump(openssl_csr_sign($csr, $wrong, $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, $wrong, 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, $wrong));
@@ -38,7 +41,7 @@ var_dump(openssl_csr_sign(array(), null, $privkey, 365));
 var_dump(openssl_csr_sign($csr, array(), $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, array(), 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, array()));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365, array()));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
 ?
 --EXPECTF--
 resource(%d) of type (OpenSSL X.509)


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



[PHP-CVS] com php-src: Fix bug #61404 ext\openssl\tests\021.phpt fails: ext/openssl/tests/021.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:bd7bb973b1f4791f000a890b1c1387fcd28c65ee
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 16:04:56 
+0200
Parents:   bd928f05921a9c3595181c9b04e8024ad9ab9303
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bd7bb973b1f4791f000a890b1c1387fcd28c65ee

Log:
Fix bug #61404 ext\openssl\tests\021.phpt fails

Bugs:
https://bugs.php.net/61404

Changed paths:
  M  ext/openssl/tests/021.phpt


Diff:
bd7bb973b1f4791f000a890b1c1387fcd28c65ee
diff --git a/ext/openssl/tests/021.phpt b/ext/openssl/tests/021.phpt
index 00e2158..391b6a5 100644
--- a/ext/openssl/tests/021.phpt
+++ b/ext/openssl/tests/021.phpt
@@ -8,6 +8,8 @@ $cert = file:// . dirname(__FILE__) . /cert.crt;
 $priv = file:// . dirname(__FILE__) . /private.key;
 $wrong = wrong;
 $pub = file:// . dirname(__FILE__) . /public.key;
+$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';
+$config_arg = array('config' = $config);
 
 $dn = array(
countryName = BR,
@@ -21,14 +23,15 @@ $args = array(
digest_alg = sha1,
private_key_bits = 2048,
private_key_type = OPENSSL_KEYTYPE_DSA,
-   encrypt_key = true
+   encrypt_key = true,
+   config = $config
);
 
-$privkey = openssl_pkey_new();
+$privkey = openssl_pkey_new($config_arg);
 $csr = openssl_csr_new($dn, $privkey, $args);
 var_dump(openssl_csr_sign($csr, null, $privkey, 365, $args));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365));
-var_dump(openssl_csr_sign($csr, $cert, $priv, 365));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
+var_dump(openssl_csr_sign($csr, $cert, $priv, 365, $config_arg));
 var_dump(openssl_csr_sign($csr, $wrong, $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, $wrong, 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, $wrong));
@@ -38,7 +41,7 @@ var_dump(openssl_csr_sign(array(), null, $privkey, 365));
 var_dump(openssl_csr_sign($csr, array(), $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, array(), 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, array()));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365, array()));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
 ?
 --EXPECTF--
 resource(%d) of type (OpenSSL X.509)


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



[PHP-CVS] com php-src: Fix bug #61404 ext\openssl\tests\021.phpt fails: ext/openssl/tests/021.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:b90516745821a5340bc52f1b1825e9b8614ff9f6
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 16:04:56 
+0200
Parents:   a715a21594346aef34d3d7aad35ea147fe134d1c
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b90516745821a5340bc52f1b1825e9b8614ff9f6

Log:
Fix bug #61404 ext\openssl\tests\021.phpt fails

Bugs:
https://bugs.php.net/61404

Changed paths:
  M  ext/openssl/tests/021.phpt


Diff:
b90516745821a5340bc52f1b1825e9b8614ff9f6
diff --git a/ext/openssl/tests/021.phpt b/ext/openssl/tests/021.phpt
index 00e2158..391b6a5 100644
--- a/ext/openssl/tests/021.phpt
+++ b/ext/openssl/tests/021.phpt
@@ -8,6 +8,8 @@ $cert = file:// . dirname(__FILE__) . /cert.crt;
 $priv = file:// . dirname(__FILE__) . /private.key;
 $wrong = wrong;
 $pub = file:// . dirname(__FILE__) . /public.key;
+$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';
+$config_arg = array('config' = $config);
 
 $dn = array(
countryName = BR,
@@ -21,14 +23,15 @@ $args = array(
digest_alg = sha1,
private_key_bits = 2048,
private_key_type = OPENSSL_KEYTYPE_DSA,
-   encrypt_key = true
+   encrypt_key = true,
+   config = $config
);
 
-$privkey = openssl_pkey_new();
+$privkey = openssl_pkey_new($config_arg);
 $csr = openssl_csr_new($dn, $privkey, $args);
 var_dump(openssl_csr_sign($csr, null, $privkey, 365, $args));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365));
-var_dump(openssl_csr_sign($csr, $cert, $priv, 365));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
+var_dump(openssl_csr_sign($csr, $cert, $priv, 365, $config_arg));
 var_dump(openssl_csr_sign($csr, $wrong, $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, $wrong, 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, $wrong));
@@ -38,7 +41,7 @@ var_dump(openssl_csr_sign(array(), null, $privkey, 365));
 var_dump(openssl_csr_sign($csr, array(), $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, array(), 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, array()));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365, array()));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
 ?
 --EXPECTF--
 resource(%d) of type (OpenSSL X.509)


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/openssl/tests/004.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:fa0d507923b8dc07ff91576121543b18549dda3a
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 17:13:16 
+0200
Parents:   4c5b427124a2af3d951fed869cc86452e8b6290c 
bff8152565375c863f67833b73e2629c4d50cf63
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fa0d507923b8dc07ff91576121543b18549dda3a

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix bug #61401 ext\openssl\tests\004.phpt fails
  Fix bug #61404 ext\openssl\tests\021.phpt fails
  Fix bug #61448 intl tests fail with icu = 4.8

Bugs:
https://bugs.php.net/61401
https://bugs.php.net/61404
https://bugs.php.net/61448

Changed paths:
  MM  ext/openssl/tests/004.phpt


Diff:
fa0d507923b8dc07ff91576121543b18549dda3a
diff --combined ext/openssl/tests/004.phpt
index c6c7e87,aca9818..508ccab
--- a/ext/openssl/tests/004.phpt
+++ b/ext/openssl/tests/004.phpt
@@@ -9,12 -9,12 +9,12 @@@ $a = 1
  var_dump(openssl_csr_new(1,$a));
  var_dump(openssl_csr_new(1,$a,1,1));
  $a = array();
- var_dump(openssl_csr_new(array(), $a, array(), array()));
+ var_dump(openssl_csr_new(array(), $a, array('config' = __DIR__ . 
DIRECTORY_SEPARATOR . 'openssl.cnf'), array()));
  
  //this leaks
  $a = array(1,2);
  $b = array(1,2);
- var_dump(openssl_csr_new($a, $b));
+ var_dump(openssl_csr_new($a, $b, array('config' = __DIR__ . 
DIRECTORY_SEPARATOR . 'openssl.cnf')));
  
  
  echo Done\n;
@@@ -28,7 -28,7 +28,7 @@@ NUL
  
  Warning: openssl_csr_new(): key array must be of the form array(0 = key, 1 
= phrase) in %s on line %d
  
 -Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min - 4 
(failed) in %s on line %d
 +Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min - 4 
(failed; check error queue and value of string_mask OpenSSL option if illegal 
characters are reported) in %s on line %d
  bool(false)
  resource(%d) of type (OpenSSL X.509 CSR)
  Done


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



[PHP-CVS] com php-src: Fix bug #61401 ext\openssl\tests\004.phpt fails: ext/openssl/tests/004.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:bff8152565375c863f67833b73e2629c4d50cf63
Author:Anatoliy Belsky a...@php.net Wed, 28 Mar 2012 17:11:58 
+0200
Parents:   bd7bb973b1f4791f000a890b1c1387fcd28c65ee
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bff8152565375c863f67833b73e2629c4d50cf63

Log:
Fix bug #61401 ext\openssl\tests\004.phpt fails

Bugs:
https://bugs.php.net/61401

Changed paths:
  M  ext/openssl/tests/004.phpt


Diff:
bff8152565375c863f67833b73e2629c4d50cf63
diff --git a/ext/openssl/tests/004.phpt b/ext/openssl/tests/004.phpt
index b9c4159..aca9818 100644
--- a/ext/openssl/tests/004.phpt
+++ b/ext/openssl/tests/004.phpt
@@ -9,12 +9,12 @@ $a = 1;
 var_dump(openssl_csr_new(1,$a));
 var_dump(openssl_csr_new(1,$a,1,1));
 $a = array();
-var_dump(openssl_csr_new(array(), $a, array(), array()));
+var_dump(openssl_csr_new(array(), $a, array('config' = __DIR__ . 
DIRECTORY_SEPARATOR . 'openssl.cnf'), array()));
 
 //this leaks
 $a = array(1,2);
 $b = array(1,2);
-var_dump(openssl_csr_new($a, $b));
+var_dump(openssl_csr_new($a, $b, array('config' = __DIR__ . 
DIRECTORY_SEPARATOR . 'openssl.cnf')));
 
 
 echo Done\n;


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



[PHP-CVS] com php-src: Fix bug #61459 popen_close_basic-win32 can't run sort.exe: ext/standard/tests/file/popen_pclose_basic-win32.phpt

2012-03-28 Thread Anatoliy Belsky
Commit:eeab3be3037e2c537393f630b496017c9f888736
Author:Anatoliy Belsky point@php-dev-dell.(none) Wed, 28 Mar 2012 
19:25:29 +0200
Parents:   bff8152565375c863f67833b73e2629c4d50cf63
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=eeab3be3037e2c537393f630b496017c9f888736

Log:
Fix bug #61459 popen_close_basic-win32 can't run sort.exe

Bugs:
https://bugs.php.net/61459

Changed paths:
  M  ext/standard/tests/file/popen_pclose_basic-win32.phpt


Diff:
eeab3be3037e2c537393f630b496017c9f888736
diff --git a/ext/standard/tests/file/popen_pclose_basic-win32.phpt 
b/ext/standard/tests/file/popen_pclose_basic-win32.phpt
index 8c2ba42..b5c7256 100644
--- a/ext/standard/tests/file/popen_pclose_basic-win32.phpt
+++ b/ext/standard/tests/file/popen_pclose_basic-win32.phpt
@@ -28,7 +28,18 @@ pclose($file_handle);
 
 echo *** Testing popen(): writing to the pipe ***\n;
 $arr = array(ggg, ddd, aaa, sss);
-$file_handle = popen(sort, w);
+// popen(sort, w) fails if variables_order=GPCS
+// this is set in the default INI file
+// it doesn't seem to be changeable in the --INI-- section
+// also, doing: ini_set('variables_order', ''); doesn't work!
+//
+// the only solution is to either put the absolute path here, or
+// remove variables_order= from PHP.ini (setting it in run-test's
+// default INI will fail too)
+// 
+// since we can't depend on PHP.ini being set a certain way, 
+// have to put the absolute path here.
+$file_handle = popen(/windows/system32/sort, w);
 $newline = \n;
 foreach($arr as $str) {
   fwrite($file_handle, (binary)$str);


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



[PHP-CVS] com php-src: Fix bug #61565 Fileinfo ext\fileinfo\tests\finfo_file_001.phpt fails: ext/fileinfo/fileinfo.c

2012-04-02 Thread Anatoliy Belsky
Commit:0cdba53aae783fd63f0aa525bc92e73d9e4c0aab
Author:Anatoliy Belsky a...@php.net Mon, 2 Apr 2012 17:19:09 +0200
Parents:   55a6f3a12d069cc69f02a31dd45b99c6ac2e43c6
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0cdba53aae783fd63f0aa525bc92e73d9e4c0aab

Log:
Fix bug #61565 Fileinfo ext\fileinfo\tests\finfo_file_001.phpt fails

Bugs:
https://bugs.php.net/61565

Changed paths:
  M  ext/fileinfo/fileinfo.c


Diff:
diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c
index caab03b..2c0e39a 100644
--- a/ext/fileinfo/fileinfo.c
+++ b/ext/fileinfo/fileinfo.c
@@ -515,11 +515,22 @@ static void 
_php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
wrap = php_stream_locate_url_wrapper(buffer, tmp2, 0 
TSRMLS_CC);
 
if (wrap) {
+   php_stream *stream;
php_stream_context *context = 
php_stream_context_from_zval(zcontext, 0);
+
+#ifdef PHP_WIN32
+   if (php_stream_stat_path_ex(buffer, 0, ssb, 
context) == SUCCESS) {
+   if (ssb.sb.st_mode  S_IFDIR) {
+   ret_val = mime_directory;
+   goto common;
+   }
+   }
+#endif
+
 #if PHP_API_VERSION  20100412
-   php_stream *stream = 
php_stream_open_wrapper_ex(buffer, rb, ENFORCE_SAFE_MODE | REPORT_ERRORS, 
NULL, context);
+   stream = php_stream_open_wrapper_ex(buffer, 
rb, ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
 #else
-   php_stream *stream = 
php_stream_open_wrapper_ex(buffer, rb, REPORT_ERRORS, NULL, context);
+   stream = php_stream_open_wrapper_ex(buffer, 
rb, REPORT_ERRORS, NULL, context);
 #endif
 
if (!stream) {


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/fileinfo/fileinfo.c

2012-04-02 Thread Anatoliy Belsky
Commit:374646c36b07956da928e0583854002e55b4013e
Author:Anatoliy Belsky a...@php.net Mon, 2 Apr 2012 17:36:50 +0200
Parents:   69e0e034577dedcb549c4fb5bd304f1a14d842d2 
8684fb7facd8f5c1589996c1ebfd782f77c245ff
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=374646c36b07956da928e0583854002e55b4013e

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  updated the libmagic.patch
  Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails
  Fix bug #61565 Fileinfo ext\fileinfo\tests\finfo_file_001.phpt fails
  - update to openssl 0.9.8u

Conflicts:
ext/fileinfo/tests/finfo_open_001.phpt
ext/fileinfo/tests/finfo_open_error.phpt
win32/build/libs_version.txt

Bugs:
https://bugs.php.net/61566
https://bugs.php.net/61565

Changed paths:
  MM  ext/fileinfo/fileinfo.c


Diff:



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



[PHP-CVS] com php-src: Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails: ext/fileinfo/libmagic/cdf.c ext/fileinfo/libmagic/compress.c ext/fileinfo/libmagic/file.h ext/fileinfo/libmagic

2012-04-02 Thread Anatoliy Belsky
Commit:909713e233704b4ac317ff3bb397cb40a82795b8
Author:Anatoliy Belsky a...@php.net Mon, 2 Apr 2012 17:22:46 +0200
Parents:   0cdba53aae783fd63f0aa525bc92e73d9e4c0aab
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=909713e233704b4ac317ff3bb397cb40a82795b8

Log:
Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails

This patch fixes the failure caused by the
posix lseek and read versions under windows in cdf_read() .
Additionally all the occurences of lseek and read
was replaced by _lseek and _reed for windows.

Bugs:
https://bugs.php.net/61566

Changed paths:
  M  ext/fileinfo/libmagic/cdf.c
  M  ext/fileinfo/libmagic/compress.c
  M  ext/fileinfo/libmagic/file.h
  M  ext/fileinfo/libmagic/readelf.c
  M  ext/fileinfo/tests/finfo_open_001.phpt
  M  ext/fileinfo/tests/finfo_open_error.phpt

diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index 1f0f63b..7efa43e 100644
--- a/ext/fileinfo/libmagic/cdf.c
+++ b/ext/fileinfo/libmagic/cdf.c
@@ -306,10 +306,10 @@ cdf_read(const cdf_info_t *info, off_t off, void *buf, 
size_t len)
if (info-i_fd == -1)
return -1;
 
-   if (lseek(info-i_fd, off, SEEK_SET) == (off_t)-1)
+   if (FINFO_LSEEK_FUNC(info-i_fd, off, SEEK_SET) == (off_t)-1)
return -1;
 
-   if (read(info-i_fd, buf, len) != (ssize_t)len)
+   if (FINFO_READ_FUNC(info-i_fd, buf, len) != (ssize_t)len)
return -1;
 
return (ssize_t)len;
diff --git a/ext/fileinfo/libmagic/compress.c b/ext/fileinfo/libmagic/compress.c
index c31f0f8..4d349cd 100644
--- a/ext/fileinfo/libmagic/compress.c
+++ b/ext/fileinfo/libmagic/compress.c
@@ -224,7 +224,7 @@ sread(int fd, void *buf, size_t n, int canbepipe)
 
 nocheck:
do
-   switch ((rv = read(fd, buf, n))) {
+   switch ((rv = FINFO_READ_FUNC(fd, buf, n))) {
case -1:
if (errno == EINTR)
continue;
@@ -301,7 +301,7 @@ file_pipe2file(struct magic_set *ms, int fd, const void 
*startbuf,
return -1;
}
(void)close(tfd);
-   if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
+   if (FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
@@ -405,7 +405,7 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
(void) close(0);
if (fd != -1) {
(void) dup(fd);
-   (void) lseek(0, (off_t)0, SEEK_SET);
+   (void) FINFO_LSEEK_FUNC(0, (off_t)0, SEEK_SET);
} else {
(void) dup(fdin[0]);
(void) close(fdin[0]);
diff --git a/ext/fileinfo/libmagic/file.h b/ext/fileinfo/libmagic/file.h
index b73c9b1..e1269ae 100644
--- a/ext/fileinfo/libmagic/file.h
+++ b/ext/fileinfo/libmagic/file.h
@@ -486,4 +486,12 @@ static const char *rcsid(const char *p) { \
 #define FILE_RCSID(id)
 #endif
 
+#ifdef PHP_WIN32
+#define FINFO_LSEEK_FUNC _lseek
+#define FINFO_READ_FUNC _read
+#else
+#define FINFO_LSEEK_FUNC lseek
+#define FINFO_READ_FUNC read
+#endif
+
 #endif /* __file_h__ */
diff --git a/ext/fileinfo/libmagic/readelf.c b/ext/fileinfo/libmagic/readelf.c
index 7e768ca..f18f7d2 100644
--- a/ext/fileinfo/libmagic/readelf.c
+++ b/ext/fileinfo/libmagic/readelf.c
@@ -309,11 +309,11 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int 
fd, off_t off,
 * Loop through all the program headers.
 */
for ( ; num; num--) {
-   if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
+   if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
-   if (read(fd, xph_addr, xph_sizeof) == -1) {
+   if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
file_badread(ms);
return -1;
}
@@ -331,11 +331,11 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int 
fd, off_t off,
 * This is a PT_NOTE section; loop through all the notes
 * in the section.
 */
-   if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
+   if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
-   bufsize = read(fd, nbuf,
+   bufsize = FINFO_READ_FUNC(fd, nbuf,
((xph_filesz  sizeof(nbuf)) ? xph_filesz : sizeof(nbuf)));
if (bufsize == -1) {
file_badread(ms);
@@ -858,11 +858,11 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, 
off_t off, int num,
}
 
for ( ; num; num--) {
-   if (lseek(fd, off, SEEK_SET) == (off_t)-1

[PHP-CVS] com php-src: updated the libmagic.patch: ext/fileinfo/libmagic.patch

2012-04-02 Thread Anatoliy Belsky
Commit:8684fb7facd8f5c1589996c1ebfd782f77c245ff
Author:Anatoliy Belsky a...@php.net Mon, 2 Apr 2012 17:27:23 +0200
Parents:   909713e233704b4ac317ff3bb397cb40a82795b8
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8684fb7facd8f5c1589996c1ebfd782f77c245ff

Log:
updated the libmagic.patch

Changed paths:
  M  ext/fileinfo/libmagic.patch

diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch
index ad5293a..a8b3c7a 100644
--- a/ext/fileinfo/libmagic.patch
+++ b/ext/fileinfo/libmagic.patch
@@ -1,6 +1,5 @@
-diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
 libmagic.orig/apprentice.c 2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/apprentice.c  2012-03-28 01:53:04.283305402 +0200
+--- libmagic.orig/apprentice.c Mon Apr  2 16:46:43 2012
 libmagic/apprentice.c  Wed Mar 28 15:35:25 2012
 @@ -29,6 +29,8 @@
   * apprentice - make one pass through /etc/magic, learning its secrets.
   */
@@ -728,9 +727,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m-str_range = swap4(m-str_range);
m-str_flags = swap4(m-str_flags);
}
-diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
 libmagic.orig/ascmagic.c   2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/ascmagic.c2012-03-28 01:53:04.287303117 +0200
+--- libmagic.orig/ascmagic.c   Mon Apr  2 16:46:43 2012
 libmagic/ascmagic.cWed Mar 28 15:35:25 2012
 @@ -139,10 +139,8 @@
/* malloc size is a conservative overestimate; could be
   improved, or at least realloced after conversion. */
@@ -754,10 +752,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
  
return rv;
  }
-Only in libmagic.orig: asprintf.c
-diff -u libmagic.orig/cdf.c libmagic/cdf.c
 libmagic.orig/cdf.c2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/cdf.c 2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/cdf.cMon Apr  2 16:46:43 2012
 libmagic/cdf.c Mon Apr  2 16:41:41 2012
 @@ -43,7 +43,17 @@
  #include err.h
  #endif
@@ -776,6 +772,19 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
  #include string.h
  #include time.h
  #include ctype.h
+@@ -296,10 +306,10 @@
+   if (info-i_fd == -1)
+   return -1;
+ 
+-  if (lseek(info-i_fd, off, SEEK_SET) == (off_t)-1)
++  if (FINFO_LSEEK_FUNC(info-i_fd, off, SEEK_SET) == (off_t)-1)
+   return -1;
+ 
+-  if (read(info-i_fd, buf, len) != (ssize_t)len)
++  if (FINFO_READ_FUNC(info-i_fd, buf, len) != (ssize_t)len)
+   return -1;
+ 
+   return (ssize_t)len;
 @@ -1135,7 +1145,7 @@
cdf_directory_t *d;
char name[__arraycount(d-d_name)];
@@ -806,9 +815,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
cdf_print_elapsed_time(buf, sizeof(buf), tp);
(void)fprintf(stderr, timestamp %s\n, buf);
} else {
-diff -u libmagic.orig/cdf.h libmagic/cdf.h
 libmagic.orig/cdf.h2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/cdf.h 2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/cdf.hMon Apr  2 16:46:43 2012
 libmagic/cdf.h Wed Mar 28 15:35:25 2012
 @@ -35,7 +35,7 @@
  #ifndef _H_CDF_
  #define _H_CDF_
@@ -844,9 +852,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
  int cdf_read_header(const cdf_info_t *, cdf_header_t *);
  void cdf_swap_header(cdf_header_t *);
  void cdf_unpack_header(cdf_header_t *, char *);
-diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
 libmagic.orig/cdf_time.c   2012-03-28 12:00:34.017709605 +0200
-+++ libmagic/cdf_time.c2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/cdf_time.c   Mon Apr  2 16:46:43 2012
 libmagic/cdf_time.cWed Mar 28 15:35:25 2012
 @@ -96,7 +96,7 @@
  }
  
@@ -903,9 +910,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
static const char *ref = Sat Apr 23 01:30:00 1977;
char *p, *q;
-diff -u libmagic.orig/compress.c libmagic/compress.c
 libmagic.orig/compress.c   2012-03-28 12:00:34.012709598 +0200
-+++ libmagic/compress.c2012-03-28 01:53:04.299331601 +0200
+--- libmagic.orig/compress.c   Mon Apr  2 16:46:43 2012
 libmagic/compress.cMon Apr  2 16:41:41 2012
 @@ -32,6 +32,7 @@
   *uncompress(method, old, n, newch) - uncompress old into new, 
   *using method, return sizeof new
@@ -990,7 +996,23 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
for (cnt = 0;; cnt++) {
fd_set check;
struct timeval tout = {0, 100 * 1000};
-@@ -301,7 +307,8 @@
+@@ -218,7 +224,7 @@
+ 
+ nocheck:
+   do
+-  switch ((rv = read(fd, buf, n))) {
++  switch ((rv = FINFO_READ_FUNC(fd, buf, n))) {
+   case -1

[PHP-CVS] com php-src: Fix bug #61454 ext\standard\tests\general_functions\bug49847.phpt fails: ext/standard/tests/general_functions/bug49847.phpt

2012-04-03 Thread Anatoliy Belsky
Commit:14e74aeb579b3400bdf376b5b820fc900b4194ed
Author:Anatoliy Belsky a...@php.net Tue, 3 Apr 2012 13:23:06 +0200
Parents:   94cefaedaf36b681bdf03d89c761f642a28e33e0
Branches:  PHP-5.3 PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=14e74aeb579b3400bdf376b5b820fc900b4194ed

Log:
Fix bug #61454 ext\standard\tests\general_functions\bug49847.phpt fails

Bugs:
https://bugs.php.net/61454
https://bugs.php.net/49847

Changed paths:
  M  ext/standard/tests/general_functions/bug49847.phpt


Diff:
diff --git a/ext/standard/tests/general_functions/bug49847.phpt 
b/ext/standard/tests/general_functions/bug49847.phpt
index 6312d03..112592d 100644
--- a/ext/standard/tests/general_functions/bug49847.phpt
+++ b/ext/standard/tests/general_functions/bug49847.phpt
@@ -9,7 +9,7 @@ if ($iswin) {
$s = str_repeat(' ', 4097);
$s .= '1';
file_put_contents($f, $s);
-   exec('more ' . $f, $output);
+   exec('type ' . $f, $output);
 } else {
exec(printf %4098d 1, $output);
 }


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



[PHP-CVS] com php-src: Fix bug #61481 Test Bug - ext/com_dotnet/tests/bug49192: ext/com_dotnet/tests/bug49192.phpt

2012-04-03 Thread Anatoliy Belsky
Commit:94cefaedaf36b681bdf03d89c761f642a28e33e0
Author:Anatoliy Belsky a...@php.net Tue, 3 Apr 2012 13:07:51 +0200
Parents:   469cd3abf131853b5c727c7eb84754d8383c
Branches:  PHP-5.3 PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=94cefaedaf36b681bdf03d89c761f642a28e33e0

Log:
Fix bug #61481 Test Bug - ext/com_dotnet/tests/bug49192

Bugs:
https://bugs.php.net/61481
https://bugs.php.net/49192

Changed paths:
  M  ext/com_dotnet/tests/bug49192.phpt


Diff:
diff --git a/ext/com_dotnet/tests/bug49192.phpt 
b/ext/com_dotnet/tests/bug49192.phpt
index 7bae1d7..ccbf237 100644
--- a/ext/com_dotnet/tests/bug49192.phpt
+++ b/ext/com_dotnet/tests/bug49192.phpt
@@ -3,9 +3,23 @@ Bug #49192 (PHP crashes when GC invoked on COM object)
 --SKIPIF--
 ?php 
 if (!extension_loaded(com_dotnet)) print skip COM/.Net support not 
present; ?
+--XFAIL--
+1
 --FILE--
 ?php
 
+// this test fails to load ADO
+//
+// a change in windows longhorn x64(affecting vista, 7, 8, 2008, 2008r2) broke 
ADO.
+//
+// there is a fix available, but user has to install it.
+// given that ADO was deprecated a long time ago in favor of newer APIs,
+// I don't think its worth the trouble of making the user install the fix to
+// get an accurate test run. its better to just not run the test or expect it 
to fail.
+//
+// see: http://support.microsoft.com/kb/2517589
+// see: http://www.infoq.com/news/2011/10/ADO-Win7
+
 $dbConnection = new Com('ADODB.Connection');
 var_dump(gc_collect_cycles());
 ?


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



[PHP-CVS] com php-src: Fix bug #61517 random test failure - ext/standard/tests/misc/time_sleep_until_basic.phpt: ext/standard/tests/misc/time_sleep_until_basic.phpt

2012-04-03 Thread Anatoliy Belsky
Commit:469cd3abf131853b5c727c7eb84754d8383c
Author:Anatoliy Belsky a...@php.net Tue, 3 Apr 2012 11:04:52 +0200
Parents:   6d97e28e427d99cfa1ccb8ccdfdeffcc2fcdf383
Branches:  PHP-5.3 PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=469cd3abf131853b5c727c7eb84754d8383c

Log:
Fix bug #61517 random test failure - 
ext/standard/tests/misc/time_sleep_until_basic.phpt

Bugs:
https://bugs.php.net/61517

Changed paths:
  M  ext/standard/tests/misc/time_sleep_until_basic.phpt


Diff:
diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt 
b/ext/standard/tests/misc/time_sleep_until_basic.phpt
index 9ae9128..05cc0e6 100644
--- a/ext/standard/tests/misc/time_sleep_until_basic.phpt
+++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt
@@ -13,7 +13,19 @@ Michele Orselli m...@ideato.it
 ?php
   $time = microtime(true) + 2;
   var_dump(time_sleep_until( (int)$time ));
-  var_dump(microtime(true) = (int)$time);
+  $now = microtime(true);
+  if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+// on windows, time_sleep_until has millisecond accuracy while microtime() 
is accurate
+// to 10th of a second. this means there can be up to a .9 millisecond 
difference
+// which will fail this test. this test randomly fails on Windows and this 
is the cause.
+//
+// fix: round to nearest millisecond 
+// passes for up to .5 milliseconds less, fails for more than .5 
milliseconds
+// should be fine since time_sleep_until() on Windows is accurate to the
+// millisecond(.5 rounded up is 1 millisecond)
+$now = round($now, 3);
+  }
+  var_dump($now = (int)$time);
 ?
 --EXPECT--
 bool(true)


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



[PHP-CVS] com php-src: Fix bug #61454 ext\standard\tests\general_functions\bug49847.phpt fails: ext/standard/tests/general_functions/bug49847.phpt

2012-04-03 Thread Anatoliy Belsky
Commit:84be455e22073a011af570c9bf9b79e42349b6a7
Author:Anatoliy Belsky a...@php.net Tue, 3 Apr 2012 13:23:06 +0200
Parents:   c7e9c646eee25711cab04ee2d17390373baa53e5
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=84be455e22073a011af570c9bf9b79e42349b6a7

Log:
Fix bug #61454 ext\standard\tests\general_functions\bug49847.phpt fails

Bugs:
https://bugs.php.net/61454
https://bugs.php.net/49847

Changed paths:
  M  ext/standard/tests/general_functions/bug49847.phpt


Diff:
diff --git a/ext/standard/tests/general_functions/bug49847.phpt 
b/ext/standard/tests/general_functions/bug49847.phpt
index 6312d03..112592d 100644
--- a/ext/standard/tests/general_functions/bug49847.phpt
+++ b/ext/standard/tests/general_functions/bug49847.phpt
@@ -9,7 +9,7 @@ if ($iswin) {
$s = str_repeat(' ', 4097);
$s .= '1';
file_put_contents($f, $s);
-   exec('more ' . $f, $output);
+   exec('type ' . $f, $output);
 } else {
exec(printf %4098d 1, $output);
 }


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



[PHP-CVS] com php-src: Fix bug #61481 Test Bug - ext/com_dotnet/tests/bug49192: ext/com_dotnet/tests/bug49192.phpt

2012-04-03 Thread Anatoliy Belsky
Commit:c7e9c646eee25711cab04ee2d17390373baa53e5
Author:Anatoliy Belsky a...@php.net Tue, 3 Apr 2012 13:07:51 +0200
Parents:   36449bface319cba5dfa11348e80bf8612f25b15
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c7e9c646eee25711cab04ee2d17390373baa53e5

Log:
Fix bug #61481 Test Bug - ext/com_dotnet/tests/bug49192

Bugs:
https://bugs.php.net/61481
https://bugs.php.net/49192

Changed paths:
  M  ext/com_dotnet/tests/bug49192.phpt


Diff:
diff --git a/ext/com_dotnet/tests/bug49192.phpt 
b/ext/com_dotnet/tests/bug49192.phpt
index 7bae1d7..ccbf237 100644
--- a/ext/com_dotnet/tests/bug49192.phpt
+++ b/ext/com_dotnet/tests/bug49192.phpt
@@ -3,9 +3,23 @@ Bug #49192 (PHP crashes when GC invoked on COM object)
 --SKIPIF--
 ?php 
 if (!extension_loaded(com_dotnet)) print skip COM/.Net support not 
present; ?
+--XFAIL--
+1
 --FILE--
 ?php
 
+// this test fails to load ADO
+//
+// a change in windows longhorn x64(affecting vista, 7, 8, 2008, 2008r2) broke 
ADO.
+//
+// there is a fix available, but user has to install it.
+// given that ADO was deprecated a long time ago in favor of newer APIs,
+// I don't think its worth the trouble of making the user install the fix to
+// get an accurate test run. its better to just not run the test or expect it 
to fail.
+//
+// see: http://support.microsoft.com/kb/2517589
+// see: http://www.infoq.com/news/2011/10/ADO-Win7
+
 $dbConnection = new Com('ADODB.Connection');
 var_dump(gc_collect_cycles());
 ?


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



[PHP-CVS] com php-src: Fix bug #61517 random test failure - ext/standard/tests/misc/time_sleep_until_basic.phpt: ext/standard/tests/misc/time_sleep_until_basic.phpt

2012-04-03 Thread Anatoliy Belsky
Commit:36449bface319cba5dfa11348e80bf8612f25b15
Author:Anatoliy Belsky a...@php.net Tue, 3 Apr 2012 11:04:52 +0200
Parents:   7a2885a5913bcd17e8a862e4f2b86599a6f9153c
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=36449bface319cba5dfa11348e80bf8612f25b15

Log:
Fix bug #61517 random test failure - 
ext/standard/tests/misc/time_sleep_until_basic.phpt

Bugs:
https://bugs.php.net/61517

Changed paths:
  M  ext/standard/tests/misc/time_sleep_until_basic.phpt


Diff:
diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt 
b/ext/standard/tests/misc/time_sleep_until_basic.phpt
index 9ae9128..05cc0e6 100644
--- a/ext/standard/tests/misc/time_sleep_until_basic.phpt
+++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt
@@ -13,7 +13,19 @@ Michele Orselli m...@ideato.it
 ?php
   $time = microtime(true) + 2;
   var_dump(time_sleep_until( (int)$time ));
-  var_dump(microtime(true) = (int)$time);
+  $now = microtime(true);
+  if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+// on windows, time_sleep_until has millisecond accuracy while microtime() 
is accurate
+// to 10th of a second. this means there can be up to a .9 millisecond 
difference
+// which will fail this test. this test randomly fails on Windows and this 
is the cause.
+//
+// fix: round to nearest millisecond 
+// passes for up to .5 milliseconds less, fails for more than .5 
milliseconds
+// should be fine since time_sleep_until() on Windows is accurate to the
+// millisecond(.5 rounded up is 1 millisecond)
+$now = round($now, 3);
+  }
+  var_dump($now = (int)$time);
 ?
 --EXPECT--
 bool(true)


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



[PHP-CVS] com php-src: Fix bug #61460 popen_close_error-win32 expected output is wrong: ext/standard/tests/file/popen_pclose_error-win32.phpt

2012-04-03 Thread Anatoliy Belsky
Commit:438536e45e1f762fd0f0fe7d9243adb63074e55d
Author:Matt Ficken mattfic...@php.net Tue, 3 Apr 2012 14:19:43 
+0200
Committer: Anatoliy Belsky a...@php.net  Tue, 3 Apr 2012 14:19:43 +0200
Parents:   14e74aeb579b3400bdf376b5b820fc900b4194ed
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=438536e45e1f762fd0f0fe7d9243adb63074e55d

Log:
Fix bug #61460 popen_close_error-win32 expected output is wrong

Bugs:
https://bugs.php.net/61460

Changed paths:
  M  ext/standard/tests/file/popen_pclose_error-win32.phpt


Diff:
diff --git a/ext/standard/tests/file/popen_pclose_error-win32.phpt 
b/ext/standard/tests/file/popen_pclose_error-win32.phpt
index f81cd52..9f9593c 100644
--- a/ext/standard/tests/file/popen_pclose_error-win32.phpt
+++ b/ext/standard/tests/file/popen_pclose_error-win32.phpt
@@ -17,7 +17,7 @@ if (PHP_DEBUG) die(skip Not Valid for debug builds);
  * Description: Closes process file pointer.
  */
 $file_path = dirname(__FILE__);
-echo *** Testing for error conditions ***\n;
+echo *** Testing for error conditions *** . PHP_EOL;
 var_dump( popen() );  // Zero Arguments
 var_dump( popen(abc.txt) );   // Single Argument
 var_dump( popen(abc.txt, rw) );   // Invalid mode Argument
@@ -26,7 +26,7 @@ $file_handle = fopen($file_path./popen.tmp, w);
 var_dump( pclose($file_handle, $file_handle) );
 pclose($file_handle);
 var_dump( pclose(1) );
-echo \n--- Done ---;
+echo PHP_EOL . PHP_EOL . --- Done ---;
 ?
 --CLEAN--
 ?php
@@ -41,9 +41,9 @@ NULL
 
 Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d
 NULL
-resource(%d) of type (stream)
-'abc.txt' is not recognized as an internal or external command,
-operable program or batch file.
+
+Warning: popen(abc.txt,rw): Invalid argument in %s on line %d
+bool(false)
 
 Warning: pclose() expects exactly 1 parameter, 0 given in %s on line %d
 bool(false)
@@ -54,4 +54,6 @@ bool(false)
 Warning: pclose() expects parameter 1 to be resource, integer given in %s on 
line %d
 bool(false)
 
 Done ---
+
+--- Done ---'abc.txt' is not recognized as an internal or external command,
+operable program or batch file.


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



[PHP-CVS] com php-src: updated the NEWS with the latest fileinfo changes: NEWS

2012-04-04 Thread Anatoliy Belsky
Commit:db834fc46046142b6a153b577bbd3112ed75fe54
Author:Anatoliy Belsky a...@php.net Wed, 4 Apr 2012 12:36:34 +0200
Parents:   94f1c05ff8f83b2130de21683c5c2bd3af7e065c
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=db834fc46046142b6a153b577bbd3112ed75fe54

Log:
updated the NEWS with the latest fileinfo changes

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 8d5afeb..6eff5c3 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,12 @@ PHP
NEWS
 when another extension makes use of a library that links to the iconv
 library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail.
 (Moriyoshi)
+- Fileinfo
+  . Upgraded libmagic to 5.11 (Pierre, Anatoliy) 
+  . Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a
+directory descriptor under windows. (Anatoliy)
+  . Fixed bug #61566 failure caused by the posix lseek and read versions
+under windows in cdf_read(). (Anatoliy)
 
 (merge after 5.3.11 release)


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



Re: [PHP-CVS] com php-src: Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails: ext/fileinfo/libmagic/cdf.c ext/fileinfo/libmagic/compress.c ext/fileinfo/libmagic/file.h ext/fileinfo/libm

2012-04-04 Thread Anatoliy Belsky
Hi Johannes,

i've just updated the NEWS on the 5.3 branch

http://git.php.net/?p=php-src.git;a=commitdiff;h=db834fc46046142b6a153b577bbd3112ed75fe54

Regards

Anatoliy

Am Mi, 4.04.2012, 10:23 schrieb Johannes Schlüter:
 On Mon, 2012-04-02 at 15:22 +, Anatoliy Belsky wrote:
 Commit:909713e233704b4ac317ff3bb397cb40a82795b8
 Author:Anatoliy Belsky a...@php.net Mon, 2 Apr 2012 17:22:46
 +0200
 Parents:   0cdba53aae783fd63f0aa525bc92e73d9e4c0aab
 Branches:  PHP-5.3 PHP-5.4 master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=909713e233704b4ac317ff3bb397cb40a82795b8

 Changed paths:
   M  ext/fileinfo/libmagic/cdf.c
   M  ext/fileinfo/libmagic/compress.c
   M  ext/fileinfo/libmagic/file.h
   M  ext/fileinfo/libmagic/readelf.c
   M  ext/fileinfo/tests/finfo_open_001.phpt
   M  ext/fileinfo/tests/finfo_open_error.phpt

 No NEWS entry?

 johannes






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



[PHP-CVS] com php-src: Fix bug #61480 test bug - ext/gd/tests/bug48555.phpt: ext/gd/tests/bug48555.phpt

2012-04-04 Thread Anatoliy Belsky
Commit:381edb425e16bd5d472c84d757465aa42cb39d0f
Author:Matt Ficken mattfic...@php.net Wed, 4 Apr 2012 18:39:24 
+0200
Committer: Anatoliy Belsky a...@php.net  Wed, 4 Apr 2012 18:39:24 +0200
Parents:   db834fc46046142b6a153b577bbd3112ed75fe54
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=381edb425e16bd5d472c84d757465aa42cb39d0f

Log:
Fix bug #61480 test bug - ext/gd/tests/bug48555.phpt

Bugs:
https://bugs.php.net/61480
https://bugs.php.net/48555

Changed paths:
  M  ext/gd/tests/bug48555.phpt


Diff:
diff --git a/ext/gd/tests/bug48555.phpt b/ext/gd/tests/bug48555.phpt
index f2030fe..d378aaf 100644
--- a/ext/gd/tests/bug48555.phpt
+++ b/ext/gd/tests/bug48555.phpt
@@ -10,10 +10,22 @@ Bug #48555 (ImageFTBBox() differs from previous versions 
for texts with new line
 $cwd = dirname(__FILE__);
 $font = $cwd/Tuffy.ttf;
 $box = ImageFTBBox(14, 0, $font, Text without line-break);
-echo 'Top without line-break: ' . $box[7] . \n;
+//echo 'Top without line-break: ' . $box[7] . \n;
+$without_line_break = $box[7];
 $box = ImageFTBBox(14, 0, $font, Text with\nline-break\none more);
-echo 'Top with line-break: ' . $box[7] . \n;
+//echo 'Top with line-break: ' . $box[7] . \n;
+$with_line_break = $box[7];
+
+var_dump($without_line_break);
+var_dump($with_line_break);
+if ($with_line_break==$without_line_break) {
+  echo with line break == without line break.PHP_EOL;
+} else {
+  echo with line break != without line break.PHP_EOL;
+}
+
 ?
 --EXPECTF--
-Top without line-break: -14
-Top with line-break: -14
+int(-%d)
+int(-%d)
+with line break == without line break


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



[PHP-CVS] com php-src: Fixed bug #61631 mbstring mail related tests fail: ext/mbstring/tests/bug52861.phpt ext/mbstring/tests/mb_send_mail01.phpt ext/mbstring/tests/mb_send_mail02.phpt ext/mbstring/te

2012-04-10 Thread Anatoliy Belsky
Commit:2ca49d39a3fe0d4752006e70b0e7c514f615bd67
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 11:47:18 
+0200
Parents:   d89b65f98503bbe99ee7810a97b2c0a16da2651c
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2ca49d39a3fe0d4752006e70b0e7c514f615bd67

Log:
Fixed bug #61631 mbstring mail related tests fail

Bugs:
https://bugs.php.net/61631

Changed paths:
  M  ext/mbstring/tests/bug52861.phpt
  M  ext/mbstring/tests/mb_send_mail01.phpt
  M  ext/mbstring/tests/mb_send_mail02.phpt
  M  ext/mbstring/tests/mb_send_mail03.phpt
  M  ext/mbstring/tests/mb_send_mail04.phpt
  M  ext/mbstring/tests/mb_send_mail05.phpt
  M  ext/mbstring/tests/mb_send_mail06.phpt
  M  ext/mbstring/tests/mb_send_mail07.phpt


Diff:
diff --git a/ext/mbstring/tests/bug52861.phpt b/ext/mbstring/tests/bug52861.phpt
index 085f3ba..dc1914d 100644
--- a/ext/mbstring/tests/bug52861.phpt
+++ b/ext/mbstring/tests/bug52861.phpt
@@ -2,6 +2,9 @@
 Bug #52681 (mb_send_mail() appends an extra MIME-Version header)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(neutral)) {
die(skip mb_send_mail() not available);
 }
diff --git a/ext/mbstring/tests/mb_send_mail01.phpt 
b/ext/mbstring/tests/mb_send_mail01.phpt
index 28a401e..8ed9ea9 100644
--- a/ext/mbstring/tests/mb_send_mail01.phpt
+++ b/ext/mbstring/tests/mb_send_mail01.phpt
@@ -2,6 +2,9 @@
 mb_send_mail() test 1 (lang=neutral)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(neutral)) {
die(skip mb_send_mail() not available);
 }
diff --git a/ext/mbstring/tests/mb_send_mail02.phpt 
b/ext/mbstring/tests/mb_send_mail02.phpt
index af335cc..923f571 100644
--- a/ext/mbstring/tests/mb_send_mail02.phpt
+++ b/ext/mbstring/tests/mb_send_mail02.phpt
@@ -2,6 +2,9 @@
 mb_send_mail() test 2 (lang=Japanese)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(japanese)) {
die(skip mb_send_mail() not available);
 }
diff --git a/ext/mbstring/tests/mb_send_mail03.phpt 
b/ext/mbstring/tests/mb_send_mail03.phpt
index 23a988f..1b16529 100644
--- a/ext/mbstring/tests/mb_send_mail03.phpt
+++ b/ext/mbstring/tests/mb_send_mail03.phpt
@@ -2,6 +2,9 @@
 mb_send_mail() test 3 (lang=English)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(english)) {
die(skip mb_send_mail() not available);
 }
diff --git a/ext/mbstring/tests/mb_send_mail04.phpt 
b/ext/mbstring/tests/mb_send_mail04.phpt
index 49bda09..fbff4cd 100644
--- a/ext/mbstring/tests/mb_send_mail04.phpt
+++ b/ext/mbstring/tests/mb_send_mail04.phpt
@@ -2,6 +2,9 @@
 mb_send_mail() test 4 (lang=German)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(german)) {
die(skip mb_send_mail() not available);
 }
diff --git a/ext/mbstring/tests/mb_send_mail05.phpt 
b/ext/mbstring/tests/mb_send_mail05.phpt
index 1bbaaad..aa68ab8 100644
--- a/ext/mbstring/tests/mb_send_mail05.phpt
+++ b/ext/mbstring/tests/mb_send_mail05.phpt
@@ -2,6 +2,9 @@
 mb_send_mail() test 5 (lang=Simplified Chinese)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(Simplified Chinese)) {
die(skip mb_send_mail() not available);
 }
diff --git a/ext/mbstring/tests/mb_send_mail06.phpt 
b/ext/mbstring/tests/mb_send_mail06.phpt
index 4eb5492..df3f065 100644
--- a/ext/mbstring/tests/mb_send_mail06.phpt
+++ b/ext/mbstring/tests/mb_send_mail06.phpt
@@ -2,6 +2,9 @@
 mb_send_mail() test 6 (lang=Traditional Chinese)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(Traditional Chinese)) {
die(skip mb_send_mail() not available);
 }
diff --git a/ext/mbstring/tests/mb_send_mail07.phpt 
b/ext/mbstring/tests/mb_send_mail07.phpt
index 42b91fa..f62eccb 100644
--- a/ext/mbstring/tests/mb_send_mail07.phpt
+++ b/ext/mbstring/tests/mb_send_mail07.phpt
@@ -2,6 +2,9 @@
 mb_send_mail() test 7 (lang=Korean)
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!function_exists(mb_send_mail) || !mb_language(Korean)) {
die(skip mb_send_mail() not available);
 }


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



[PHP-CVS] com php-src: Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails: ext/date/tests/date_default_timezone_get-1-win32.phpt ext/date/tests/date_default_timezone_get-1.php

2012-04-10 Thread Anatoliy Belsky
Commit:d89b65f98503bbe99ee7810a97b2c0a16da2651c
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 11:03:41 
+0200
Parents:   4ff55e646ab3450e06054b65a351082efe43e473
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d89b65f98503bbe99ee7810a97b2c0a16da2651c

Log:
Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails

The behaviour on windows is to select an arbitrary timezone from the current 
system settings.
This gives no chance to hardcode the timezone name, for instance for UTC+1 it 
could choose
from the multiple names like Europe/Berlin or Europe/Paris . For this reason 
the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made for 
windows.

Bugs:
https://bugs.php.net/61610

Changed paths:
  A  ext/date/tests/date_default_timezone_get-1-win32.phpt
  M  ext/date/tests/date_default_timezone_get-1.phpt


Diff:
diff --git a/ext/date/tests/date_default_timezone_get-1-win32.phpt 
b/ext/date/tests/date_default_timezone_get-1-win32.phpt
new file mode 100644
index 000..a12418f
--- /dev/null
+++ b/ext/date/tests/date_default_timezone_get-1-win32.phpt
@@ -0,0 +1,24 @@
+--TEST--
+date_default_timezone_get() function [1]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) != 'WIN') die(skip skip on non windows);
+?
+--INI--
+date.timezone=
+--FILE--
+?php
+   putenv('TZ=');
+   echo date_default_timezone_get(), \n;
+   echo date('e'), \n;
+   /* The behaviour on windows is to select an arbitrary timezone name 
from the current system settings.
+  This gives no chance to hardcode the timezone name, for instance for 
UTC+1 it could choose
+  from the multiple names like Europe/Berlin or Europe/Paris . For 
this reason the test is
+  parametrized so there is no hardcoded timezone data.*/
+?
+--EXPECTF--
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 3
+%s
+
+Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 4
+%s
diff --git a/ext/date/tests/date_default_timezone_get-1.phpt 
b/ext/date/tests/date_default_timezone_get-1.phpt
index 383394a..5d17a25 100644
--- a/ext/date/tests/date_default_timezone_get-1.phpt
+++ b/ext/date/tests/date_default_timezone_get-1.phpt
@@ -1,5 +1,9 @@
 --TEST--
 date_default_timezone_get() function [1]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) == 'WIN') die(skip on windows);
+?
 --INI--
 date.timezone=
 --FILE--


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



[PHP-CVS] com php-src: Fix bug #61609 Test ext\date\tests\bug52062.phpt fails As expressed in the comments http://de.php.net/manual/en/datetime.gettimestamp.php this is the generic 32 bit timestamp is

2012-04-10 Thread Anatoliy Belsky
Commit:4ff55e646ab3450e06054b65a351082efe43e473
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 10:18:10 
+0200
Parents:   0f180a63ebb2d65bbe49b68d2430639b20443e9a
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4ff55e646ab3450e06054b65a351082efe43e473

Log:
Fix bug #61609 Test ext\date\tests\bug52062.phpt fails
As expressed in the comments 
http://de.php.net/manual/en/datetime.gettimestamp.php
this is the generic 32 bit timestamp issue

Bugs:
https://bugs.php.net/61609
https://bugs.php.net/52062

Changed paths:
  M  ext/date/tests/bug52062.phpt


Diff:
diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt
index d3e1c9a..81e767b 100644
--- a/ext/date/tests/bug52062.phpt
+++ b/ext/date/tests/bug52062.phpt
@@ -11,6 +11,7 @@ date.timezone=UTC
 $d = new DateTime('@1000');
 var_dump($d-format('Y-m-d H:i:s U'));
 var_dump($d-getTimestamp());
+var_dump($d-format('U'));
 
 $d-setTimestamp(1000);
 var_dump($d-format('Y-m-d H:i:s U'));
@@ -21,7 +22,8 @@ var_dump($i-format('%s'));
 ?
 --EXPECT--
 string(32) 5138-11-16 09:46:40 1000
-int(1000)
-string(32) 5138-11-16 09:46:40 1000
-int(1000)
+bool(false)
 string(12) 1000
+string(30) 2008-07-11 04:56:32 1215752192
+int(1215752192)
+string(10) 1215752192


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



[PHP-CVS] com php-src: Fixed bug #61631 mbstring mail related tests fail: ext/mbstring/tests/bug52861.phpt ext/mbstring/tests/mb_send_mail01.phpt ext/mbstring/tests/mb_send_mail02.phpt ext/mbstring/te

2012-04-10 Thread Anatoliy Belsky
Commit:1a0c9ecaeee10b76895f6d67166187891777de8f
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 11:47:18 
+0200
Parents:   fbbad87056328b30d2b398cb78c3cf625f453e52
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1a0c9ecaeee10b76895f6d67166187891777de8f

Log:
Fixed bug #61631 mbstring mail related tests fail

Bugs:
https://bugs.php.net/61631

Changed paths:
  M  ext/mbstring/tests/bug52861.phpt
  M  ext/mbstring/tests/mb_send_mail01.phpt
  M  ext/mbstring/tests/mb_send_mail02.phpt
  M  ext/mbstring/tests/mb_send_mail03.phpt
  M  ext/mbstring/tests/mb_send_mail04.phpt
  M  ext/mbstring/tests/mb_send_mail05.phpt
  M  ext/mbstring/tests/mb_send_mail06.phpt
  M  ext/mbstring/tests/mb_send_mail07.phpt


Diff:
diff --git a/ext/mbstring/tests/bug52861.phpt b/ext/mbstring/tests/bug52861.phpt
index dedd6eb..dc1914d 100644
--- a/ext/mbstring/tests/bug52861.phpt
+++ b/ext/mbstring/tests/bug52861.phpt
@@ -2,8 +2,8 @@
 Bug #52681 (mb_send_mail() appends an extra MIME-Version header)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(neutral)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail01.phpt 
b/ext/mbstring/tests/mb_send_mail01.phpt
index 45ca0e6..8ed9ea9 100644
--- a/ext/mbstring/tests/mb_send_mail01.phpt
+++ b/ext/mbstring/tests/mb_send_mail01.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 1 (lang=neutral)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(neutral)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail02.phpt 
b/ext/mbstring/tests/mb_send_mail02.phpt
index 0eb1e36..923f571 100644
--- a/ext/mbstring/tests/mb_send_mail02.phpt
+++ b/ext/mbstring/tests/mb_send_mail02.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 2 (lang=Japanese)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(japanese)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail03.phpt 
b/ext/mbstring/tests/mb_send_mail03.phpt
index ca66fee..1b16529 100644
--- a/ext/mbstring/tests/mb_send_mail03.phpt
+++ b/ext/mbstring/tests/mb_send_mail03.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 3 (lang=English)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(english)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail04.phpt 
b/ext/mbstring/tests/mb_send_mail04.phpt
index a4170ff..fbff4cd 100644
--- a/ext/mbstring/tests/mb_send_mail04.phpt
+++ b/ext/mbstring/tests/mb_send_mail04.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 4 (lang=German)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(german)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail05.phpt 
b/ext/mbstring/tests/mb_send_mail05.phpt
index 9870a00..aa68ab8 100644
--- a/ext/mbstring/tests/mb_send_mail05.phpt
+++ b/ext/mbstring/tests/mb_send_mail05.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 5 (lang=Simplified Chinese)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(Simplified Chinese)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail06.phpt 
b/ext/mbstring/tests/mb_send_mail06.phpt
index 9a9e573..df3f065 100644
--- a/ext/mbstring/tests/mb_send_mail06.phpt
+++ b/ext/mbstring/tests/mb_send_mail06.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 6 (lang=Traditional Chinese)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(Traditional Chinese)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail07.phpt 
b/ext/mbstring/tests/mb_send_mail07.phpt
index 192f89a..f62eccb 100644
--- a/ext/mbstring/tests/mb_send_mail07.phpt
+++ b/ext/mbstring/tests/mb_send_mail07.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 7 (lang=Korean)
 --SKIPIF--
 ?php
-if(substr(PHP_OS

[PHP-CVS] com php-src: Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails: ext/date/tests/date_default_timezone_get-1-win32.phpt ext/date/tests/date_default_timezone_get-1.php

2012-04-10 Thread Anatoliy Belsky
Commit:fbbad87056328b30d2b398cb78c3cf625f453e52
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 11:03:41 
+0200
Parents:   fd68d5b13929ff4b2492a024eeaf14d07b3e5dad
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fbbad87056328b30d2b398cb78c3cf625f453e52

Log:
Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails

The behaviour on windows is to select an arbitrary timezone from the current 
system settings.
This gives no chance to hardcode the timezone name, for instance for UTC+1 it 
could choose
from the multiple names like Europe/Berlin or Europe/Paris . For this reason 
the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made for 
windows.

Bugs:
https://bugs.php.net/61610

Changed paths:
  A  ext/date/tests/date_default_timezone_get-1-win32.phpt
  M  ext/date/tests/date_default_timezone_get-1.phpt


Diff:
diff --git a/ext/date/tests/date_default_timezone_get-1-win32.phpt 
b/ext/date/tests/date_default_timezone_get-1-win32.phpt
new file mode 100644
index 000..a12418f
--- /dev/null
+++ b/ext/date/tests/date_default_timezone_get-1-win32.phpt
@@ -0,0 +1,24 @@
+--TEST--
+date_default_timezone_get() function [1]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) != 'WIN') die(skip skip on non windows);
+?
+--INI--
+date.timezone=
+--FILE--
+?php
+   putenv('TZ=');
+   echo date_default_timezone_get(), \n;
+   echo date('e'), \n;
+   /* The behaviour on windows is to select an arbitrary timezone name 
from the current system settings.
+  This gives no chance to hardcode the timezone name, for instance for 
UTC+1 it could choose
+  from the multiple names like Europe/Berlin or Europe/Paris . For 
this reason the test is
+  parametrized so there is no hardcoded timezone data.*/
+?
+--EXPECTF--
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 3
+%s
+
+Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 4
+%s
diff --git a/ext/date/tests/date_default_timezone_get-1.phpt 
b/ext/date/tests/date_default_timezone_get-1.phpt
index 5fa4192..4bff31a 100644
--- a/ext/date/tests/date_default_timezone_get-1.phpt
+++ b/ext/date/tests/date_default_timezone_get-1.phpt
@@ -1,5 +1,9 @@
 --TEST--
 date_default_timezone_get() function [1]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) == 'WIN') die(skip on windows);
+?
 --INI--
 date.timezone=
 --FILE--


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



[PHP-CVS] com php-src: Fix bug #61609 Test ext\date\tests\bug52062.phpt fails As expressed in the comments http://de.php.net/manual/en/datetime.gettimestamp.php this is the generic 32 bit timestamp is

2012-04-10 Thread Anatoliy Belsky
Commit:fd68d5b13929ff4b2492a024eeaf14d07b3e5dad
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 10:18:10 
+0200
Parents:   882dca647a42c974102cfd1c75818764a18f
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fd68d5b13929ff4b2492a024eeaf14d07b3e5dad

Log:
Fix bug #61609 Test ext\date\tests\bug52062.phpt fails
As expressed in the comments 
http://de.php.net/manual/en/datetime.gettimestamp.php
this is the generic 32 bit timestamp issue

Bugs:
https://bugs.php.net/61609
https://bugs.php.net/52062

Changed paths:
  M  ext/date/tests/bug52062.phpt


Diff:
diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt
index d779524..1d81437 100644
--- a/ext/date/tests/bug52062.phpt
+++ b/ext/date/tests/bug52062.phpt
@@ -13,6 +13,7 @@ date.timezone=UTC
 $d = new DateTime('@1000');
 var_dump($d-format('Y-m-d H:i:s U'));
 var_dump($d-getTimestamp());
+var_dump($d-format('U'));
 
 $d-setTimestamp(1000);
 var_dump($d-format('Y-m-d H:i:s U'));
@@ -23,7 +24,8 @@ var_dump($i-format('%s'));
 ?
 --EXPECT--
 string(32) 5138-11-16 09:46:40 1000
-int(1000)
-string(32) 5138-11-16 09:46:40 1000
-int(1000)
+bool(false)
 string(12) 1000
+string(30) 2008-07-11 04:56:32 1215752192
+int(1215752192)
+string(10) 1215752192


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



[PHP-CVS] com php-src: Fixed bug #61631 mbstring mail related tests fail: ext/mbstring/tests/bug52861.phpt ext/mbstring/tests/mb_send_mail01.phpt ext/mbstring/tests/mb_send_mail02.phpt ext/mbstring/te

2012-04-10 Thread Anatoliy Belsky
Commit:58aa160ee4b17533074c3a1ab9a89d51201f237f
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 11:47:18 
+0200
Parents:   aa6ad6bc095d3d490c1808e1ff327da051898cd3
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=58aa160ee4b17533074c3a1ab9a89d51201f237f

Log:
Fixed bug #61631 mbstring mail related tests fail

Bugs:
https://bugs.php.net/61631

Changed paths:
  M  ext/mbstring/tests/bug52861.phpt
  M  ext/mbstring/tests/mb_send_mail01.phpt
  M  ext/mbstring/tests/mb_send_mail02.phpt
  M  ext/mbstring/tests/mb_send_mail03.phpt
  M  ext/mbstring/tests/mb_send_mail04.phpt
  M  ext/mbstring/tests/mb_send_mail05.phpt
  M  ext/mbstring/tests/mb_send_mail06.phpt
  M  ext/mbstring/tests/mb_send_mail07.phpt


Diff:
diff --git a/ext/mbstring/tests/bug52861.phpt b/ext/mbstring/tests/bug52861.phpt
index dedd6eb..dc1914d 100644
--- a/ext/mbstring/tests/bug52861.phpt
+++ b/ext/mbstring/tests/bug52861.phpt
@@ -2,8 +2,8 @@
 Bug #52681 (mb_send_mail() appends an extra MIME-Version header)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(neutral)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail01.phpt 
b/ext/mbstring/tests/mb_send_mail01.phpt
index 45ca0e6..8ed9ea9 100644
--- a/ext/mbstring/tests/mb_send_mail01.phpt
+++ b/ext/mbstring/tests/mb_send_mail01.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 1 (lang=neutral)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(neutral)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail02.phpt 
b/ext/mbstring/tests/mb_send_mail02.phpt
index 0eb1e36..923f571 100644
--- a/ext/mbstring/tests/mb_send_mail02.phpt
+++ b/ext/mbstring/tests/mb_send_mail02.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 2 (lang=Japanese)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(japanese)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail03.phpt 
b/ext/mbstring/tests/mb_send_mail03.phpt
index ca66fee..1b16529 100644
--- a/ext/mbstring/tests/mb_send_mail03.phpt
+++ b/ext/mbstring/tests/mb_send_mail03.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 3 (lang=English)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(english)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail04.phpt 
b/ext/mbstring/tests/mb_send_mail04.phpt
index a4170ff..fbff4cd 100644
--- a/ext/mbstring/tests/mb_send_mail04.phpt
+++ b/ext/mbstring/tests/mb_send_mail04.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 4 (lang=German)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(german)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail05.phpt 
b/ext/mbstring/tests/mb_send_mail05.phpt
index 9870a00..aa68ab8 100644
--- a/ext/mbstring/tests/mb_send_mail05.phpt
+++ b/ext/mbstring/tests/mb_send_mail05.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 5 (lang=Simplified Chinese)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(Simplified Chinese)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail06.phpt 
b/ext/mbstring/tests/mb_send_mail06.phpt
index 9a9e573..df3f065 100644
--- a/ext/mbstring/tests/mb_send_mail06.phpt
+++ b/ext/mbstring/tests/mb_send_mail06.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 6 (lang=Traditional Chinese)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN) {
-  die(skip Won't run on Windows);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
 }
 if (!function_exists(mb_send_mail) || !mb_language(Traditional Chinese)) {
die(skip mb_send_mail() not available);
diff --git a/ext/mbstring/tests/mb_send_mail07.phpt 
b/ext/mbstring/tests/mb_send_mail07.phpt
index 192f89a..f62eccb 100644
--- a/ext/mbstring/tests/mb_send_mail07.phpt
+++ b/ext/mbstring/tests/mb_send_mail07.phpt
@@ -2,8 +2,8 @@
 mb_send_mail() test 7 (lang=Korean)
 --SKIPIF--
 ?php
-if(substr(PHP_OS

[PHP-CVS] com php-src: Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails: ext/date/tests/date_default_timezone_get-1-win32.phpt ext/date/tests/date_default_timezone_get-1.php

2012-04-10 Thread Anatoliy Belsky
Commit:aa6ad6bc095d3d490c1808e1ff327da051898cd3
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 11:03:41 
+0200
Parents:   7a2a75d0570e685e3d644e3e4931b92463ef9eb0
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=aa6ad6bc095d3d490c1808e1ff327da051898cd3

Log:
Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails

The behaviour on windows is to select an arbitrary timezone from the current 
system settings.
This gives no chance to hardcode the timezone name, for instance for UTC+1 it 
could choose
from the multiple names like Europe/Berlin or Europe/Paris . For this reason 
the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made for 
windows.

Bugs:
https://bugs.php.net/61610

Changed paths:
  A  ext/date/tests/date_default_timezone_get-1-win32.phpt
  M  ext/date/tests/date_default_timezone_get-1.phpt


Diff:
diff --git a/ext/date/tests/date_default_timezone_get-1-win32.phpt 
b/ext/date/tests/date_default_timezone_get-1-win32.phpt
new file mode 100644
index 000..a12418f
--- /dev/null
+++ b/ext/date/tests/date_default_timezone_get-1-win32.phpt
@@ -0,0 +1,24 @@
+--TEST--
+date_default_timezone_get() function [1]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) != 'WIN') die(skip skip on non windows);
+?
+--INI--
+date.timezone=
+--FILE--
+?php
+   putenv('TZ=');
+   echo date_default_timezone_get(), \n;
+   echo date('e'), \n;
+   /* The behaviour on windows is to select an arbitrary timezone name 
from the current system settings.
+  This gives no chance to hardcode the timezone name, for instance for 
UTC+1 it could choose
+  from the multiple names like Europe/Berlin or Europe/Paris . For 
this reason the test is
+  parametrized so there is no hardcoded timezone data.*/
+?
+--EXPECTF--
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 3
+%s
+
+Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 4
+%s
diff --git a/ext/date/tests/date_default_timezone_get-1.phpt 
b/ext/date/tests/date_default_timezone_get-1.phpt
index 5fa4192..4bff31a 100644
--- a/ext/date/tests/date_default_timezone_get-1.phpt
+++ b/ext/date/tests/date_default_timezone_get-1.phpt
@@ -1,5 +1,9 @@
 --TEST--
 date_default_timezone_get() function [1]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) == 'WIN') die(skip on windows);
+?
 --INI--
 date.timezone=
 --FILE--


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



[PHP-CVS] com php-src: Fix bug #61609 Test ext\date\tests\bug52062.phpt fails As expressed in the comments http://de.php.net/manual/en/datetime.gettimestamp.php this is the generic 32 bit timestamp is

2012-04-10 Thread Anatoliy Belsky
Commit:7a2a75d0570e685e3d644e3e4931b92463ef9eb0
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 10:18:10 
+0200
Parents:   40a21ed9e84c30be07237e919ec036155a9daa03
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7a2a75d0570e685e3d644e3e4931b92463ef9eb0

Log:
Fix bug #61609 Test ext\date\tests\bug52062.phpt fails
As expressed in the comments 
http://de.php.net/manual/en/datetime.gettimestamp.php
this is the generic 32 bit timestamp issue

Bugs:
https://bugs.php.net/61609
https://bugs.php.net/52062

Changed paths:
  M  ext/date/tests/bug52062.phpt


Diff:
diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt
index d779524..1d81437 100644
--- a/ext/date/tests/bug52062.phpt
+++ b/ext/date/tests/bug52062.phpt
@@ -13,6 +13,7 @@ date.timezone=UTC
 $d = new DateTime('@1000');
 var_dump($d-format('Y-m-d H:i:s U'));
 var_dump($d-getTimestamp());
+var_dump($d-format('U'));
 
 $d-setTimestamp(1000);
 var_dump($d-format('Y-m-d H:i:s U'));
@@ -23,7 +24,8 @@ var_dump($i-format('%s'));
 ?
 --EXPECT--
 string(32) 5138-11-16 09:46:40 1000
-int(1000)
-string(32) 5138-11-16 09:46:40 1000
-int(1000)
+bool(false)
 string(12) 1000
+string(30) 2008-07-11 04:56:32 1215752192
+int(1215752192)
+string(10) 1215752192


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



[PHP-CVS] com php-src: Fixed bug #61611 ext\date\tests\date_default_timezone_get-2.phpt fails: ext/date/tests/date_default_timezone_get-2-win32.phpt ext/date/tests/date_default_timezone_get-2.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:26dbc5ecb455720f49fc4ff707d88e88fafe426d
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 12:33:11 
+0200
Parents:   2ca49d39a3fe0d4752006e70b0e7c514f615bd67
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=26dbc5ecb455720f49fc4ff707d88e88fafe426d

Log:
Fixed bug #61611 ext\date\tests\date_default_timezone_get-2.phpt fails

The behaviour on windows is to select an arbitrary timezone from the
current system settings. This gives no chance to hardcode the timezone
name, for instance for UTC+1 it could choose from the multiple names
like Europe/Berlin or Europe/Paris . For this reason the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made
for windows. Tested on debian and win7 both x86.

Bugs:
https://bugs.php.net/61611

Changed paths:
  A  ext/date/tests/date_default_timezone_get-2-win32.phpt
  M  ext/date/tests/date_default_timezone_get-2.phpt


Diff:
diff --git a/ext/date/tests/date_default_timezone_get-2-win32.phpt 
b/ext/date/tests/date_default_timezone_get-2-win32.phpt
new file mode 100644
index 000..34da022
--- /dev/null
+++ b/ext/date/tests/date_default_timezone_get-2-win32.phpt
@@ -0,0 +1,20 @@
+--TEST--
+date_default_timezone_get() function [2]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) != 'WIN') die(skip on non windows);
+?
+--INI--
+date.timezone=
+--FILE--
+?php
+   putenv('TZ=');
+   echo date_default_timezone_get(), \n;
+   /* The behaviour on windows is to select an arbitrary timezone name 
from the current system settings.
+  This gives no chance to hardcode the timezone name, for instance for 
UTC+1 it could choose
+  from the multiple names like Europe/Berlin or Europe/Paris . For 
this reason the test is
+  parametrized so there is no hardcoded timezone data.*/
+?
+--EXPECTF--
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-2-win32.php on line 3
+%s
diff --git a/ext/date/tests/date_default_timezone_get-2.phpt 
b/ext/date/tests/date_default_timezone_get-2.phpt
index 11bd307..a72634e 100644
--- a/ext/date/tests/date_default_timezone_get-2.phpt
+++ b/ext/date/tests/date_default_timezone_get-2.phpt
@@ -1,5 +1,9 @@
 --TEST--
 date_default_timezone_get() function [2]
+--SKIPIF--
+?php
+   if(substr(PHP_OS, 0, 3) == 'WIN') die(skip on windows);
+?
 --INI--
 date.timezone=
 --FILE--


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/date/tests/date_default_timezone_get-2.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:31a3e831904b3ac9651fc0bf9528bd139d8f23d5
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 12:37:37 
+0200
Parents:   1a0c9ecaeee10b76895f6d67166187891777de8f 
26dbc5ecb455720f49fc4ff707d88e88fafe426d
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=31a3e831904b3ac9651fc0bf9528bd139d8f23d5

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed bug #61611 ext\date\tests\date_default_timezone_get-2.phpt fails
  Fixed bug #61631 mbstring mail related tests fail
  Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails
  Fix bug #61609 Test ext\date\tests\bug52062.phpt fails As expressed in the 
comments http://de.php.net/manual/en/datetime.gettimestamp.php this is the 
generic 32 bit timestamp issue

Bugs:
https://bugs.php.net/61611
https://bugs.php.net/61631
https://bugs.php.net/61610
https://bugs.php.net/61609
https://bugs.php.net/52062

Changed paths:
  MM  ext/date/tests/date_default_timezone_get-2.phpt


Diff:



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



[PHP-CVS] com php-src: Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails: ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt ext/sockets/tests/socket_create_pa

2012-04-10 Thread Anatoliy Belsky
Commit:5594fcf423d46996378d428ebe6055a6f93ced49
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:02:53 
+0200
Parents:   37cb29ae90b9efdde4081f783cdc56074847c0c7
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5594fcf423d46996378d428ebe6055a6f93ced49

Log:
Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt 
fails

Bugs:
https://bugs.php.net/61633

Changed paths:
  A  ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
  M  ext/sockets/tests/socket_create_pair-wrongparams.phpt


Diff:
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt 
b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
new file mode 100644
index 000..de33d95
--- /dev/null
+++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test parameter handling in socket_create_pair()
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+var_dump(socket_create_pair(AF_INET, null, null));
+
+$domain = 'unknown';
+var_dump(socket_create_pair($domain, SOCK_STREAM, 0, $sockets));
+
+var_dump(socket_create_pair(AF_INET, null, null, $sockets));
+
+var_dump(socket_create_pair(31337, null, null, $sockets));
+
+var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets));
+--EXPECTF--
+Warning: socket_create_pair() expects exactly 4 parameters, 3 given in %s on 
line %d
+NULL
+
+Warning: socket_create_pair() expects parameter 1 to be long, 
%unicode_string_optional% given in %s on line %d
+NULL
+bool(true)
+
+Warning: socket_create_pair(): invalid socket domain [31337] specified for 
argument 1, assuming AF_INET in %s on line %d
+bool(true)
+
+Warning: socket_create_pair(): invalid socket type [31337] specified for 
argument 2, assuming SOCK_STREAM in %s on line %d
+bool(true)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt 
b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
index 99512bc..afca2b8 100644
--- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt
+++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
@@ -2,6 +2,9 @@
 Test parameter handling in socket_create_pair()
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails: ext/sockets/tests/socket_listen-wrongparams.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:c4676ee99f5381de502cd6544a9c42a25b53b933
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:08:57 
+0200
Parents:   5594fcf423d46996378d428ebe6055a6f93ced49
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c4676ee99f5381de502cd6544a9c42a25b53b933

Log:
Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails

Bugs:
https://bugs.php.net/61634

Changed paths:
  M  ext/sockets/tests/socket_listen-wrongparams.phpt


Diff:
diff --git a/ext/sockets/tests/socket_listen-wrongparams.phpt 
b/ext/sockets/tests/socket_listen-wrongparams.phpt
index 7dd0d15..b5e1354 100644
--- a/ext/sockets/tests/socket_listen-wrongparams.phpt
+++ b/ext/sockets/tests/socket_listen-wrongparams.phpt
@@ -2,6 +2,9 @@
 Test parameter handling in socket_listen().
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails: ext/sockets/tests/socket_create_listen-win32.phpt ext/sockets/tests/socket_create_listen.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:37cb29ae90b9efdde4081f783cdc56074847c0c7
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 12:57:10 
+0200
Parents:   d80e2e069cd65a9e1c3bf5796ccc8616b625ac45
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=37cb29ae90b9efdde4081f783cdc56074847c0c7

Log:
Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails

Bugs:
https://bugs.php.net/61632

Changed paths:
  A  ext/sockets/tests/socket_create_listen-win32.phpt
  M  ext/sockets/tests/socket_create_listen.phpt


Diff:
diff --git a/ext/sockets/tests/socket_create_listen-win32.phpt 
b/ext/sockets/tests/socket_create_listen-win32.phpt
new file mode 100644
index 000..23bf963
--- /dev/null
+++ b/ext/sockets/tests/socket_create_listen-win32.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test if socket binds on 31338
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+$sock = socket_create_listen(31338);
+socket_getsockname($sock, $addr, $port); 
+var_dump($addr, $port);
+--EXPECT--
+string(9) 127.0.0.1
+int(31338)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+PHP Testfest Berlin 2009-05-09
diff --git a/ext/sockets/tests/socket_create_listen.phpt 
b/ext/sockets/tests/socket_create_listen.phpt
index 440fade..76f2942 100644
--- a/ext/sockets/tests/socket_create_listen.phpt
+++ b/ext/sockets/tests/socket_create_listen.phpt
@@ -2,6 +2,9 @@
 Test if socket binds on 31338
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails: ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt ext/sockets/tests/socket_create_pa

2012-04-10 Thread Anatoliy Belsky
Commit:5b0e7203e659cb3866505e4c52812b5eba040e35
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:02:53 
+0200
Parents:   83b48280c7610f60fa7941dbf955348e624b8805
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5b0e7203e659cb3866505e4c52812b5eba040e35

Log:
Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt 
fails

Bugs:
https://bugs.php.net/61633

Changed paths:
  A  ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
  M  ext/sockets/tests/socket_create_pair-wrongparams.phpt


Diff:
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt 
b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
new file mode 100644
index 000..de33d95
--- /dev/null
+++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test parameter handling in socket_create_pair()
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+var_dump(socket_create_pair(AF_INET, null, null));
+
+$domain = 'unknown';
+var_dump(socket_create_pair($domain, SOCK_STREAM, 0, $sockets));
+
+var_dump(socket_create_pair(AF_INET, null, null, $sockets));
+
+var_dump(socket_create_pair(31337, null, null, $sockets));
+
+var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets));
+--EXPECTF--
+Warning: socket_create_pair() expects exactly 4 parameters, 3 given in %s on 
line %d
+NULL
+
+Warning: socket_create_pair() expects parameter 1 to be long, 
%unicode_string_optional% given in %s on line %d
+NULL
+bool(true)
+
+Warning: socket_create_pair(): invalid socket domain [31337] specified for 
argument 1, assuming AF_INET in %s on line %d
+bool(true)
+
+Warning: socket_create_pair(): invalid socket type [31337] specified for 
argument 2, assuming SOCK_STREAM in %s on line %d
+bool(true)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt 
b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
index 99512bc..afca2b8 100644
--- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt
+++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
@@ -2,6 +2,9 @@
 Test parameter handling in socket_create_pair()
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug 61621 Test fail in ext/standard/tests/dir: ext/standard/tests/dir/dir_variation1.phpt ext/standard/tests/dir/dir_variation5.phpt ext/standard/tests/dir/dir_variation6.

2012-04-10 Thread Anatoliy Belsky
Commit:d80e2e069cd65a9e1c3bf5796ccc8616b625ac45
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 12:47:01 
+0200
Parents:   26dbc5ecb455720f49fc4ff707d88e88fafe426d
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d80e2e069cd65a9e1c3bf5796ccc8616b625ac45

Log:
Fixed bug 61621 Test fail in ext/standard/tests/dir

Bugs:
https://bugs.php.net/61621

Changed paths:
  M  ext/standard/tests/dir/dir_variation1.phpt
  M  ext/standard/tests/dir/dir_variation5.phpt
  M  ext/standard/tests/dir/dir_variation6.phpt
  M  ext/standard/tests/dir/dir_variation8.phpt
  M  ext/standard/tests/dir/dir_variation9.phpt
  M  ext/standard/tests/dir/opendir_error2.phpt
  M  ext/standard/tests/dir/opendir_variation1.phpt
  M  ext/standard/tests/dir/opendir_variation6.phpt
  M  ext/standard/tests/dir/scandir_error2.phpt
  M  ext/standard/tests/dir/scandir_variation1.phpt
  M  ext/standard/tests/dir/scandir_variation6.phpt


Diff:
diff --git a/ext/standard/tests/dir/dir_variation1.phpt 
b/ext/standard/tests/dir/dir_variation1.phpt
index ad912c0..abb4719 100644
--- a/ext/standard/tests/dir/dir_variation1.phpt
+++ b/ext/standard/tests/dir/dir_variation1.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : usage variations - unexpected value for 'dir' argument
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* 
diff --git a/ext/standard/tests/dir/dir_variation5.phpt 
b/ext/standard/tests/dir/dir_variation5.phpt
index 2399c63..c7450ea 100644
--- a/ext/standard/tests/dir/dir_variation5.phpt
+++ b/ext/standard/tests/dir/dir_variation5.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : usage variations - open a file instead of directory
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* 
diff --git a/ext/standard/tests/dir/dir_variation6.phpt 
b/ext/standard/tests/dir/dir_variation6.phpt
index e42057e..71cbf1f 100644
--- a/ext/standard/tests/dir/dir_variation6.phpt
+++ b/ext/standard/tests/dir/dir_variation6.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : usage variations - non-existent directory
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* 
diff --git a/ext/standard/tests/dir/dir_variation8.phpt 
b/ext/standard/tests/dir/dir_variation8.phpt
index a0b74a3..5ecf449 100644
--- a/ext/standard/tests/dir/dir_variation8.phpt
+++ b/ext/standard/tests/dir/dir_variation8.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : usage variations - checking with wildcard characters
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* 
diff --git a/ext/standard/tests/dir/dir_variation9.phpt 
b/ext/standard/tests/dir/dir_variation9.phpt
index 22f3d5b..458d0b8 100644
--- a/ext/standard/tests/dir/dir_variation9.phpt
+++ b/ext/standard/tests/dir/dir_variation9.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : usage variations - relative valid and invalid paths
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* 
diff --git a/ext/standard/tests/dir/opendir_error2.phpt 
b/ext/standard/tests/dir/opendir_error2.phpt
index 0762be2..1c72409 100644
--- a/ext/standard/tests/dir/opendir_error2.phpt
+++ b/ext/standard/tests/dir/opendir_error2.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : error conditions - Non-existent directory
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
diff --git a/ext/standard/tests/dir/opendir_variation1.phpt 
b/ext/standard/tests/dir/opendir_variation1.phpt
index dc10356..8d195e1 100644
--- a/ext/standard/tests/dir/opendir_variation1.phpt
+++ b/ext/standard/tests/dir/opendir_variation1.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : usage variations - different data types as $path arg
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
diff --git a/ext/standard/tests/dir/opendir_variation6.phpt 
b/ext/standard/tests/dir/opendir_variation6.phpt
index 01e8225..f3fc0bd 100644
--- a/ext/standard/tests/dir/opendir_variation6.phpt
+++ b/ext/standard/tests/dir/opendir_variation6.phpt
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : usage variations - Different wildcards
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip.. Not valid for Windows');
+}
+?
 --FILE--
 ?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
diff --git a/ext/standard/tests/dir/scandir_error2.phpt 
b/ext/standard/tests/dir/scandir_error2.phpt
index 1e99a57..b5bfc28 100644
--- a/ext/standard/tests/dir

[PHP-CVS] com php-src: Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails: ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt ext/sockets/tests/socket_create_pa

2012-04-10 Thread Anatoliy Belsky
Commit:497a343a5e908ac7418fb9f0977dcebbdf7cbaa0
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:02:53 
+0200
Parents:   63ed8eb0a5264f3388b3ce0ba10bff7cd856ed7d
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=497a343a5e908ac7418fb9f0977dcebbdf7cbaa0

Log:
Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt 
fails

Bugs:
https://bugs.php.net/61633

Changed paths:
  A  ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
  M  ext/sockets/tests/socket_create_pair-wrongparams.phpt


Diff:
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt 
b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
new file mode 100644
index 000..de33d95
--- /dev/null
+++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test parameter handling in socket_create_pair()
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+var_dump(socket_create_pair(AF_INET, null, null));
+
+$domain = 'unknown';
+var_dump(socket_create_pair($domain, SOCK_STREAM, 0, $sockets));
+
+var_dump(socket_create_pair(AF_INET, null, null, $sockets));
+
+var_dump(socket_create_pair(31337, null, null, $sockets));
+
+var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets));
+--EXPECTF--
+Warning: socket_create_pair() expects exactly 4 parameters, 3 given in %s on 
line %d
+NULL
+
+Warning: socket_create_pair() expects parameter 1 to be long, 
%unicode_string_optional% given in %s on line %d
+NULL
+bool(true)
+
+Warning: socket_create_pair(): invalid socket domain [31337] specified for 
argument 1, assuming AF_INET in %s on line %d
+bool(true)
+
+Warning: socket_create_pair(): invalid socket type [31337] specified for 
argument 2, assuming SOCK_STREAM in %s on line %d
+bool(true)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt 
b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
index 99512bc..afca2b8 100644
--- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt
+++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt
@@ -2,6 +2,9 @@
 Test parameter handling in socket_create_pair()
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails: ext/sockets/tests/socket_create_listen-win32.phpt ext/sockets/tests/socket_create_listen.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:83b48280c7610f60fa7941dbf955348e624b8805
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 12:57:10 
+0200
Parents:   31a3e831904b3ac9651fc0bf9528bd139d8f23d5
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=83b48280c7610f60fa7941dbf955348e624b8805

Log:
Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails

Bugs:
https://bugs.php.net/61632

Changed paths:
  A  ext/sockets/tests/socket_create_listen-win32.phpt
  M  ext/sockets/tests/socket_create_listen.phpt


Diff:
diff --git a/ext/sockets/tests/socket_create_listen-win32.phpt 
b/ext/sockets/tests/socket_create_listen-win32.phpt
new file mode 100644
index 000..23bf963
--- /dev/null
+++ b/ext/sockets/tests/socket_create_listen-win32.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test if socket binds on 31338
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+$sock = socket_create_listen(31338);
+socket_getsockname($sock, $addr, $port); 
+var_dump($addr, $port);
+--EXPECT--
+string(9) 127.0.0.1
+int(31338)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+PHP Testfest Berlin 2009-05-09
diff --git a/ext/sockets/tests/socket_create_listen.phpt 
b/ext/sockets/tests/socket_create_listen.phpt
index 440fade..76f2942 100644
--- a/ext/sockets/tests/socket_create_listen.phpt
+++ b/ext/sockets/tests/socket_create_listen.phpt
@@ -2,6 +2,9 @@
 Test if socket binds on 31338
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails: ext/sockets/tests/socket_create_listen-win32.phpt ext/sockets/tests/socket_create_listen.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:63ed8eb0a5264f3388b3ce0ba10bff7cd856ed7d
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 12:57:10 
+0200
Parents:   e33d209076e55a367b8a78cbf4bce7e4f1e08d20
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=63ed8eb0a5264f3388b3ce0ba10bff7cd856ed7d

Log:
Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails

Bugs:
https://bugs.php.net/61632

Changed paths:
  A  ext/sockets/tests/socket_create_listen-win32.phpt
  M  ext/sockets/tests/socket_create_listen.phpt


Diff:
diff --git a/ext/sockets/tests/socket_create_listen-win32.phpt 
b/ext/sockets/tests/socket_create_listen-win32.phpt
new file mode 100644
index 000..23bf963
--- /dev/null
+++ b/ext/sockets/tests/socket_create_listen-win32.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test if socket binds on 31338
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+$sock = socket_create_listen(31338);
+socket_getsockname($sock, $addr, $port); 
+var_dump($addr, $port);
+--EXPECT--
+string(9) 127.0.0.1
+int(31338)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+PHP Testfest Berlin 2009-05-09
diff --git a/ext/sockets/tests/socket_create_listen.phpt 
b/ext/sockets/tests/socket_create_listen.phpt
index 440fade..76f2942 100644
--- a/ext/sockets/tests/socket_create_listen.phpt
+++ b/ext/sockets/tests/socket_create_listen.phpt
@@ -2,6 +2,9 @@
 Test if socket binds on 31338
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails: ext/sockets/tests/unixloop.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:b3be5d920a7e084d04e7bd05d2d035d67506bd39
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:58:15 
+0200
Parents:   15e26c6d4a9431d40d65d50611794cb930c88b58
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b3be5d920a7e084d04e7bd05d2d035d67506bd39

Log:
Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails

Bugs:
https://bugs.php.net/61638

Changed paths:
  M  ext/sockets/tests/unixloop.phpt


Diff:
diff --git a/ext/sockets/tests/unixloop.phpt b/ext/sockets/tests/unixloop.phpt
index 1b547c3..4a19444 100644
--- a/ext/sockets/tests/unixloop.phpt
+++ b/ext/sockets/tests/unixloop.phpt
@@ -2,6 +2,9 @@
 Unix domain socket Loopback test
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}


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



[PHP-CVS] com php-src: Fix bug #61659 Test ext\spl\tests\bug60082.phpt fails: ext/spl/tests/bug60082.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:b2f2e1d6ccf5e4e282799c6639548833d766985a
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 14:03:19 
+0200
Parents:   b3be5d920a7e084d04e7bd05d2d035d67506bd39
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b2f2e1d6ccf5e4e282799c6639548833d766985a

Log:
Fix bug #61659 Test ext\spl\tests\bug60082.phpt fails

Bugs:
https://bugs.php.net/61659
https://bugs.php.net/60082

Changed paths:
  M  ext/spl/tests/bug60082.phpt


Diff:
diff --git a/ext/spl/tests/bug60082.phpt b/ext/spl/tests/bug60082.phpt
index 2cf9692..346bee7 100755
--- a/ext/spl/tests/bug60082.phpt
+++ b/ext/spl/tests/bug60082.phpt
@@ -7,6 +7,8 @@ if ((stristr(PHP_OS, 'freebsd')))  {
 die('skip.. this test causes the run-tests.php to hang on Freebsd, see 
#60186');
 }
 ?
+--INI--
+allow_call_time_pass_reference = Off
 --FILE--
 ?php
 $test = array();


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



[PHP-CVS] com php-src: Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt: ext/sockets/tests/socket_sentto_recvfrom_unix.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:15e26c6d4a9431d40d65d50611794cb930c88b58
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:54:22 
+0200
Parents:   af8646c188b39f811184f79c8011239e8b8a57f3
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=15e26c6d4a9431d40d65d50611794cb930c88b58

Log:
Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt

Bugs:
https://bugs.php.net/61637

Changed paths:
  M  ext/sockets/tests/socket_sentto_recvfrom_unix.phpt


Diff:
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt 
b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
index ab11189..4cfdebb 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
@@ -2,6 +2,9 @@
 Test if socket_recvfrom() receives data sent by socket_sendto() through a Unix 
domain socket
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt: ext/sockets/tests/socket_select-wrongparams-1-win32.phpt ext/sockets/tests/socket_select-wrongparams-1.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:af8646c188b39f811184f79c8011239e8b8a57f3
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:40:20 
+0200
Parents:   c4676ee99f5381de502cd6544a9c42a25b53b933
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=af8646c188b39f811184f79c8011239e8b8a57f3

Log:
Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt

Bugs:
https://bugs.php.net/61635

Changed paths:
  A  ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
  M  ext/sockets/tests/socket_select-wrongparams-1.phpt


Diff:
diff --git a/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt 
b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
new file mode 100644
index 000..34d46d6
--- /dev/null
+++ b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test parameter handling in socket_select().
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+$sockets = array();
+$domain = AF_INET;
+socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
+
+$write  = null;
+$except = null;
+$time   = -1;
+var_dump(socket_select($sockets, $write, $except, $time));
+--EXPECTF--
+int(0)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_select-wrongparams-1.phpt 
b/ext/sockets/tests/socket_select-wrongparams-1.phpt
index e786bc2..848088f 100644
--- a/ext/sockets/tests/socket_select-wrongparams-1.phpt
+++ b/ext/sockets/tests/socket_select-wrongparams-1.phpt
@@ -2,17 +2,16 @@
 Test parameter handling in socket_select().
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }
 --FILE--
 ?php
 $sockets = array();
-if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
-$domain = AF_INET;
-} else {
-$domain = AF_UNIX;
-}
+$domain = AF_UNIX;
 socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
 
 $write  = null;


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



[PHP-CVS] com php-src: Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt: ext/sockets/tests/socket_sentto_recvfrom_unix.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:bbab846adaa268cbce7c809f3d471177991877a9
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:54:22 
+0200
Parents:   70f2f30e67536b388817a4a3a88409f9eef24f94
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bbab846adaa268cbce7c809f3d471177991877a9

Log:
Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt

Bugs:
https://bugs.php.net/61637

Changed paths:
  M  ext/sockets/tests/socket_sentto_recvfrom_unix.phpt


Diff:
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt 
b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
index ab11189..4cfdebb 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
@@ -2,6 +2,9 @@
 Test if socket_recvfrom() receives data sent by socket_sendto() through a Unix 
domain socket
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails: ext/sockets/tests/unixloop.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:024cd2a124bcf54a050588d627308ac0426b46c2
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:58:15 
+0200
Parents:   bbab846adaa268cbce7c809f3d471177991877a9
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=024cd2a124bcf54a050588d627308ac0426b46c2

Log:
Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails

Bugs:
https://bugs.php.net/61638

Changed paths:
  M  ext/sockets/tests/unixloop.phpt


Diff:
diff --git a/ext/sockets/tests/unixloop.phpt b/ext/sockets/tests/unixloop.phpt
index 1b547c3..4a19444 100644
--- a/ext/sockets/tests/unixloop.phpt
+++ b/ext/sockets/tests/unixloop.phpt
@@ -2,6 +2,9 @@
 Unix domain socket Loopback test
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}


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



[PHP-CVS] com php-src: Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt: ext/sockets/tests/socket_select-wrongparams-1-win32.phpt ext/sockets/tests/socket_select-wrongparams-1.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:70f2f30e67536b388817a4a3a88409f9eef24f94
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:40:20 
+0200
Parents:   006b04da4a8a242c971b9641748323065d539069
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=70f2f30e67536b388817a4a3a88409f9eef24f94

Log:
Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt

Bugs:
https://bugs.php.net/61635

Changed paths:
  A  ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
  M  ext/sockets/tests/socket_select-wrongparams-1.phpt


Diff:
diff --git a/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt 
b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
new file mode 100644
index 000..34d46d6
--- /dev/null
+++ b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test parameter handling in socket_select().
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+$sockets = array();
+$domain = AF_INET;
+socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
+
+$write  = null;
+$except = null;
+$time   = -1;
+var_dump(socket_select($sockets, $write, $except, $time));
+--EXPECTF--
+int(0)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_select-wrongparams-1.phpt 
b/ext/sockets/tests/socket_select-wrongparams-1.phpt
index e786bc2..848088f 100644
--- a/ext/sockets/tests/socket_select-wrongparams-1.phpt
+++ b/ext/sockets/tests/socket_select-wrongparams-1.phpt
@@ -2,17 +2,16 @@
 Test parameter handling in socket_select().
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }
 --FILE--
 ?php
 $sockets = array();
-if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
-$domain = AF_INET;
-} else {
-$domain = AF_UNIX;
-}
+$domain = AF_UNIX;
 socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
 
 $write  = null;


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



[PHP-CVS] com php-src: Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails: ext/sockets/tests/unixloop.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:4d106f40a49f0ba2557a94780b8136cd668e33b9
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:58:15 
+0200
Parents:   e9e468914523f46d8453078b116e4cfd0a5f18f9
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4d106f40a49f0ba2557a94780b8136cd668e33b9

Log:
Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails

Bugs:
https://bugs.php.net/61638

Changed paths:
  M  ext/sockets/tests/unixloop.phpt


Diff:
diff --git a/ext/sockets/tests/unixloop.phpt b/ext/sockets/tests/unixloop.phpt
index 1b547c3..4a19444 100644
--- a/ext/sockets/tests/unixloop.phpt
+++ b/ext/sockets/tests/unixloop.phpt
@@ -2,6 +2,9 @@
 Unix domain socket Loopback test
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}


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



[PHP-CVS] com php-src: Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt: ext/sockets/tests/socket_sentto_recvfrom_unix.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:e9e468914523f46d8453078b116e4cfd0a5f18f9
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:54:22 
+0200
Parents:   882a3cf8a7f6aa7399c39f0dd616ac9a99c24049
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e9e468914523f46d8453078b116e4cfd0a5f18f9

Log:
Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt

Bugs:
https://bugs.php.net/61637

Changed paths:
  M  ext/sockets/tests/socket_sentto_recvfrom_unix.phpt


Diff:
diff --git a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt 
b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
index ab11189..4cfdebb 100644
--- a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
+++ b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
@@ -2,6 +2,9 @@
 Test if socket_recvfrom() receives data sent by socket_sendto() through a Unix 
domain socket
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }


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



[PHP-CVS] com php-src: Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt: ext/sockets/tests/socket_select-wrongparams-1-win32.phpt ext/sockets/tests/socket_select-wrongparams-1.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:882a3cf8a7f6aa7399c39f0dd616ac9a99c24049
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 13:40:20 
+0200
Parents:   b2bc9c41413d60d5d74652b08d2b8b92029dc059
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=882a3cf8a7f6aa7399c39f0dd616ac9a99c24049

Log:
Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt

Bugs:
https://bugs.php.net/61635

Changed paths:
  A  ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
  M  ext/sockets/tests/socket_select-wrongparams-1.phpt


Diff:
diff --git a/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt 
b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
new file mode 100644
index 000..34d46d6
--- /dev/null
+++ b/ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test parameter handling in socket_select().
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+   die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+?php
+$sockets = array();
+$domain = AF_INET;
+socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
+
+$write  = null;
+$except = null;
+$time   = -1;
+var_dump(socket_select($sockets, $write, $except, $time));
+--EXPECTF--
+int(0)
+--CREDITS--
+Till Klampaeckel, t...@php.net
+Berlin TestFest 2009
diff --git a/ext/sockets/tests/socket_select-wrongparams-1.phpt 
b/ext/sockets/tests/socket_select-wrongparams-1.phpt
index e786bc2..848088f 100644
--- a/ext/sockets/tests/socket_select-wrongparams-1.phpt
+++ b/ext/sockets/tests/socket_select-wrongparams-1.phpt
@@ -2,17 +2,16 @@
 Test parameter handling in socket_select().
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+   die('skip.. Not valid for Windows');
+}
 if (!extension_loaded('sockets')) {
 die('SKIP The sockets extension is not loaded.');
 }
 --FILE--
 ?php
 $sockets = array();
-if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
-$domain = AF_INET;
-} else {
-$domain = AF_UNIX;
-}
+$domain = AF_UNIX;
 socket_create_pair($domain, SOCK_STREAM, 0, $sockets);
 
 $write  = null;


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/standard/tests/file/rename_variation13-win32.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:a9eace9f6eafb8b66258eefadfefb644c17ee903
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 15:12:42 
+0200
Parents:   98001a849b78bac675bf25664a305f9709bf7ec9 
b0cb29db8718f0037de10947a63f90a3f4f4d6a9
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=a9eace9f6eafb8b66258eefadfefb644c17ee903

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed bug #61668 ext\standard\tests\file\rename_variation13-win32.phpt fails

Conflicts:
ext/standard/tests/file/rename_variation13-win32.phpt

Bugs:
https://bugs.php.net/61668

Changed paths:
  MM  ext/standard/tests/file/rename_variation13-win32.phpt


Diff:
diff --cc ext/standard/tests/file/rename_variation13-win32.phpt
index b4085c8,146faa1..dc44b35
Binary files differ


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



[PHP-CVS] com php-src: Fixed bug #61668 ext\standard\tests\file\rename_variation13-win32.phpt fails: ext/standard/tests/file/rename_variation13-win32.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:b0cb29db8718f0037de10947a63f90a3f4f4d6a9
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 15:09:21 
+0200
Parents:   b9cbb9e744f3fadf7b87e9fe2b8058ad1036962b
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b0cb29db8718f0037de10947a63f90a3f4f4d6a9

Log:
Fixed bug #61668 ext\standard\tests\file\rename_variation13-win32.phpt fails

Bugs:
https://bugs.php.net/61668

Changed paths:
  M  ext/standard/tests/file/rename_variation13-win32.phpt


Diff:
diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt 
b/ext/standard/tests/file/rename_variation13-win32.phpt
index 8e86d27..146faa1 100644
Binary files a/ext/standard/tests/file/rename_variation13-win32.phpt and 
b/ext/standard/tests/file/rename_variation13-win32.phpt differ


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



[PHP-CVS] com php-src: Fixed bug #61669 ext\standard\tests\file\rename_variation7-win32.phpt fails: ext/standard/tests/file/rename_variation7-win32.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:ed0ddd20c50d9b9c9e0b914194a66f91028074a2
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 15:16:48 
+0200
Parents:   b0cb29db8718f0037de10947a63f90a3f4f4d6a9
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ed0ddd20c50d9b9c9e0b914194a66f91028074a2

Log:
Fixed bug #61669 ext\standard\tests\file\rename_variation7-win32.phpt fails

Bugs:
https://bugs.php.net/61669

Changed paths:
  M  ext/standard/tests/file/rename_variation7-win32.phpt


Diff:
diff --git a/ext/standard/tests/file/rename_variation7-win32.phpt 
b/ext/standard/tests/file/rename_variation7-win32.phpt
index 7bef31f..6df0d9d 100644
--- a/ext/standard/tests/file/rename_variation7-win32.phpt
+++ b/ext/standard/tests/file/rename_variation7-win32.phpt
@@ -28,9 +28,9 @@ echo Done\n;
 --EXPECTF--
 Warning: symlink(): Could not fetch file information(error 2) in %s on line %d
 
-Warning: readlink(): Could not open file (error 2) in %s on line %d
+Warning: readlink(): readlink failed to read the symbolic link (%s), error 2) 
in %s on line %d
 bool(false)
 
-Warning: readlink(): Could not open file (error 2) in %s on line %d
+Warning: readlink(): readlink failed to read the symbolic link (%s), error 2) 
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] com php-src: Fix bug #61667 ext\standard\tests\file\glob_variation-win32.phpt fails: ext/standard/tests/file/glob_variation-win32.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:b9cbb9e744f3fadf7b87e9fe2b8058ad1036962b
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 15:00:03 
+0200
Parents:   fde96342e82a11ebeffd7385db1a3ae54663ef5f
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b9cbb9e744f3fadf7b87e9fe2b8058ad1036962b

Log:
Fix bug #61667 ext\standard\tests\file\glob_variation-win32.phpt fails

Bugs:
https://bugs.php.net/61667

Changed paths:
  M  ext/standard/tests/file/glob_variation-win32.phpt


Diff:
diff --git a/ext/standard/tests/file/glob_variation-win32.phpt 
b/ext/standard/tests/file/glob_variation-win32.phpt
index f3a3ff0..6552fe4 100644
--- a/ext/standard/tests/file/glob_variation-win32.phpt
+++ b/ext/standard/tests/file/glob_variation-win32.phpt
@@ -325,20 +325,12 @@ array(0) {
 }
 
 -- Iteration 8 --
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(1) {
-  [0]=
-  string(%d) %s/glob_variation/WONDER5
-}
-array(0) {
-}
-array(0) {
-}
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
 
 -- Iteration 9 --
 array(0) {
@@ -441,8 +433,7 @@ array(1) {
 array(0) {
 }
 -- Iteration 8 --
-array(0) {
-}
+bool(false)
 -- Iteration 9 --
 array(0) {
 }


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



[PHP-CVS] com php-src: Fixed bug #61666 ext\standard\tests\file\file_put_contents_variation8-win32.phpt fails: ext/standard/tests/file/file_put_contents_variation8-win32.phpt

2012-04-10 Thread Anatoliy Belsky
Commit:fde96342e82a11ebeffd7385db1a3ae54663ef5f
Author:Anatoliy Belsky a...@php.net Tue, 10 Apr 2012 14:13:15 
+0200
Parents:   b2f2e1d6ccf5e4e282799c6639548833d766985a
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fde96342e82a11ebeffd7385db1a3ae54663ef5f

Log:
Fixed bug #61666 
ext\standard\tests\file\file_put_contents_variation8-win32.phpt fails

Bugs:
https://bugs.php.net/61666

Changed paths:
  M  ext/standard/tests/file/file_put_contents_variation8-win32.phpt


Diff:
diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt 
b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
index 1609b10..5f2a4c7 100644
--- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt
@@ -77,8 +77,6 @@ Warning: file_put_contents( ): failed to open stream: 
Permission denied in %s on
 Failed to write data to:  
 
 -- Filename: \0 --
-
-Warning: file_put_contents(): Filename cannot be empty in %s on line %d
 Failed to write data to: \0
 
 -- Filename: array() --
@@ -95,4 +93,4 @@ Failed to write data to: /no/such/file/dir
 
 Warning: file_put_contents(php/php): failed to open stream: %s in %s on line %d
 Failed to write data to: php/php
-===Done===
\ No newline at end of file
+===Done===


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



[PHP-CVS] com php-src: Fix bug 61676 ext\tidy\tests\bug54682.phpt fails: ext/tidy/tests/bug54682.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:c981016e416507134e5fa8469a08d31346ff19b5
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 13:38:13 
+0200
Parents:   9a4cb732ed15088fff7b2cbbb23ef955bbaaadb2
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c981016e416507134e5fa8469a08d31346ff19b5

Log:
Fix bug 61676 ext\tidy\tests\bug54682.phpt fails

Bugs:
https://bugs.php.net/61676
https://bugs.php.net/54682

Changed paths:
  M  ext/tidy/tests/bug54682.phpt


Diff:
diff --git a/ext/tidy/tests/bug54682.phpt b/ext/tidy/tests/bug54682.phpt
index 8244406..2bebe11 100644
--- a/ext/tidy/tests/bug54682.phpt
+++ b/ext/tidy/tests/bug54682.phpt
@@ -10,4 +10,4 @@ $nx-diagnose();
 
 ?
 --EXPECTF--
-Warning: tidy::__construct(): Cannot Load '*' into memory in  %s on line %d
+Warning: tidy::__construct(): Cannot Load '*' into memory%win %s on line %d


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



[PHP-CVS] com php-src: Fix bug 61743 tests in ext\standard\tests\file\windows_acls\* fail: ext/standard/tests/file/windows_acls/common.inc

2012-04-16 Thread Anatoliy Belsky
Commit:9a4cb732ed15088fff7b2cbbb23ef955bbaaadb2
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 13:30:58 
+0200
Parents:   21d314a767561204cdeba896b85e61e1bb6cafac
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=9a4cb732ed15088fff7b2cbbb23ef955bbaaadb2

Log:
Fix bug 61743 tests in ext\standard\tests\file\windows_acls\* fail

Bugs:
https://bugs.php.net/61743

Changed paths:
  M  ext/standard/tests/file/windows_acls/common.inc


Diff:
diff --git a/ext/standard/tests/file/windows_acls/common.inc 
b/ext/standard/tests/file/windows_acls/common.inc
index c427601..c9be2f1 100644
--- a/ext/standard/tests/file/windows_acls/common.inc
+++ b/ext/standard/tests/file/windows_acls/common.inc
@@ -19,7 +19,13 @@ function skipif() {
 }
 
 function get_username(){
-   return getenv('USERNAME');
+   $user = getenv('USERNAME');
+
+   if (!$user) {
+   $user = get_current_user();
+   }
+
+   return $user;
 }
 
 function get_domainname()
@@ -28,6 +34,7 @@ function get_domainname()
 }
 
 function icacls_set($path, $mode, $perm) {
+   $icacls = 'c:\\Windows\\System32\\icacls.exe';
$user = get_username();
$path_escaped =  '' . $path . '';
$perm_entry = array();
@@ -38,7 +45,7 @@ function icacls_set($path, $mode, $perm) {
if ($perm  PHPT_ACL_FULL) $perm_entry[]  = 'F';
 
// Deny all
-   $cmd = 'icacls ' . $path_escaped . ' /inheritance:r /deny ' . $user . 
':(F,M,R,RX,W)';
+   $cmd = $icacls . ' ' . $path_escaped . ' /inheritance:r /deny ' . $user 
. ':(F,M,R,RX,W)';
exec($cmd);
 
if ($perm  PHPT_ACL_NONE) {
@@ -47,11 +54,9 @@ function icacls_set($path, $mode, $perm) {
 permission for the USER. Just granting permission doesn't
 remove the previously denied permission.
*/
-   $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:d';
-   $cmd .= ' ' . $user;
+   $cmd = $icacls . ' ' . $path_escaped . ' /remove:d ' . $user;
exec($cmd);
-   $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:g';
-   $cmd .= ' ' . $user;
+   $cmd = $icacls . ' ' . $path_escaped . ' /remove:g ' . $user;
exec($cmd);
return;
}
@@ -64,7 +69,7 @@ function icacls_set($path, $mode, $perm) {
 
 
// Deny all
-   $cmd = 'icacls ' . $path_escaped . ' /deny ' . $user . ':(F,M,R,RX,W)';
+   $cmd = $icacls . ' ' . $path_escaped . ' /deny ' . $user . 
':(F,M,R,RX,W)';
exec($cmd);
 
/*
@@ -72,11 +77,9 @@ function icacls_set($path, $mode, $perm) {
 permission for the USER. Just granting permission doesn't
 remove the previously denied permission.
*/
-   $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:d';
-   $cmd .= ' ' . $user;
+   $cmd = $icacls . ' ' . $path_escaped . ' /remove:d ' . $user;
exec($cmd);
-   $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:g';
-   $cmd .= ' ' . $user;
+   $cmd = $icacls . ' ' . $path_escaped . ' /remove:g ' . $user;
exec($cmd);
 
 
@@ -91,15 +94,12 @@ function icacls_set($path, $mode, $perm) {
 permission for the USER. Just granting permission doesn't
 remove the previously denied permission.
*/
-   $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:d';
-   $cmd .= ' ' . get_username();
+   $cmd = $icacls . ' ' . $path_escaped . ' /remove:d ' . $user;
exec($cmd);
-   $cmd = 'icacls ' . $path_escaped . ' /' . 'remove:g';
-   $cmd .= ' ' . get_username();
+   $cmd = $icacls . ' ' . $path_escaped . ' /remove:g ' . $user;
exec($cmd);
 
-   $cmd = 'icacls ' . $path_escaped . ' /' . $mode;
-   $cmd .= ' ' . get_username();
+   $cmd = $icacls . ' ' . $path_escaped . ' /' . $mode . ' ' . 
$user;
$cmd .= ':' . '(' . implode($perm_entry, ',') . ')';
exec($cmd);
}


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



[PHP-CVS] com php-src: Fix bug 61680 ext\zlib\tests\gzencode_variation1-win32.phpt fails: ext/zlib/tests/gzencode_variation1-win32.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:163c1a393f9163b1741f43dd0ab279c3c8c810ca
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 14:04:29 
+0200
Parents:   c981016e416507134e5fa8469a08d31346ff19b5
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=163c1a393f9163b1741f43dd0ab279c3c8c810ca

Log:
Fix bug 61680 ext\zlib\tests\gzencode_variation1-win32.phpt fails

Bugs:
https://bugs.php.net/61680

Changed paths:
  M  ext/zlib/tests/gzencode_variation1-win32.phpt


Diff:
diff --git a/ext/zlib/tests/gzencode_variation1-win32.phpt 
b/ext/zlib/tests/gzencode_variation1-win32.phpt
index efb223b..5ff5778 100644
--- a/ext/zlib/tests/gzencode_variation1-win32.phpt
+++ b/ext/zlib/tests/gzencode_variation1-win32.phpt
@@ -19,19 +19,28 @@ if (!extension_loaded(zlib)) {
  * Alias to functions: 
  */
 
+if(!function_exists(gzdecode)) {
+   function gzdecode($data) 
+   { 
+  return gzinflate(substr($data,10,-8)); 
+   }
+}
+
+
 include(dirname(__FILE__) . '/data.inc');
 
 echo *** Testing gzencode() : variation ***\n;
 
 echo \n-- Testing multiple compression --\n;
-$output = gzencode($data);
-var_dump(bin2hex(gzencode($output)));
+$output = gzencode(gzencode($data));
 
+$back = gzdecode(gzdecode($output));
+var_dump($data === $back);
 ?
 ===Done===
 --EXPECT--
 *** Testing gzencode() : variation ***
 
 -- Testing multiple compression --
-string(3658) 
1f8b080b010e07f1f81f8b080b6d574d6fe4c80dbdeb57d4ad2f3dfe01eb83e1ec22980e309b4562c067b64449159754dafab0b6e7d7e73d96da1e4c72184c4b2ab2c8f7c847fa25baabba98dc1a8b2b7c38bb324b713ee37f757f56cdc5c7f5b17b9d152f923b157c5ae335e0b75fedd0e2d781c6b98ea3a6ee05affe1dfc3a6527f8f09c52dcb38ba38bb5249934d6ecfe1e53a9ab76ff4c342cf2a64ed2028349fc9a8b139755685352acb82b9fbb67f8bade5cdcb698e1fcec94b7ceba3cb897e806cfc8114350dd1ebbdfa35b62d2478b0056d23ed809b9b95d696d91ce2aa97c911e3fa539c43f84c887554a4d125c9e63ff96711cc08c0866263cb37a0bbe2122ae8f6baecb2284abfb4ddf916db8354cddeef37c1afe5fa02fc7afb3db34f5b3acbdf2eb905490d8f38d7468d253a323d5ebb903760d7944d3b2024e834a99ddce77669bdd823cfbb8e899d4ad4c799677452e6029e80023a03b2374005590641f7d3877df2ad09f3c0e82a54d6a5644fd63049a37ed4bc362016fd9f51264f1e5c630727421ae930b7ed416e93e47b7c71a400390361ffbecb7561bb98f69b5da289e91becc27f08b3b724cb8704f9144d366431d0cb870c56b205deaa2e17636063761a911039fb7e4bf9f06c4f0aecd2ec80e8b41831ca7515e31286166458ea3ef71f2ce7cde2ae269c96d60525724a9c9170b713ed5750758f3cd2a361fc8b288fc92358ce884692e8ea0fe59bd969a0da2eed5831b715749eaae7178f3ebd30fb88c92105f367cce2c882955dc6bf8eca0d5d57540b3092894743ba0fd5b2dad021836191f1afc0bba14dde1642cb0b1aa6879c38907dcefa0720082b801bec61417469219175267dfa047df35b0bd1332001c28cdfafd3bcabe91e74368cdd8d8478e494c190e7ee90c67f2bde288e68ab6b15e883c995be4f8feb6c6dda4278e4f38578ddbdc7be36788daf0c3cb1d1819c73822f7000a0d1813fa94153b572315e51343b536bc64977dff163cebfd8418773261f524017e251fccc60ae29a5770ae097594d52e9c1229d87ce967a36401c46b69945afb249d101c9d420ffa9a123e232c20e76467d5d169202a2dd4c582949e013e745df7958d4b0cc4fd4377a737cd4feea797407f314d423e0634cb9a618fdf5dc64fd422181fd59c9230c9f6f9d18dc8fc23e9cccbc7188733b04aa57de83ebea0be3633cff5fa1ff83269be7f44f5a8d84550cc703255fd345dd402034d0b3e11a73ec6e3d4a77f4f685b614329f1b3132ae7af33d02e1e55e291fa6574b758d1f0200e7423dbc852211818043a7c9ce80aa9d59fce0401959f5ea2cf71fde90824f8c9192dbe9d329db143794675ddcf257dd7755273b67340414e3ccad12e3f661f8aad9cf9957dc1275d10a51d3934fa81e68dc6768fb8ee23e373936c8e13feab8b0f50d227f7af76f561fb0950f3d099bbc316c3892a42fb36806d8660e800fa4f43fd4b962d2097d71933a54b77ff948677848eb17bb3a88b621682cfb3bbb49cf42fed6b3944124ad8358ca688aa44dd5f2144c7c9ab16f25b9aca9654ef357ec9ad55c40d324d6cc3d9e3920b863c231d31a95d937fb5520f9c816c79b7dcecc593fb9593cc05a51ebb1eeddd5b49eb437769738d0f64adc579d372b8b7f7c0208487ee3915ebf5766e148ebd77cf4e01f3ec285047011e55838968b6494d517fe29224777b24dd3ddf933101695b102e87db805eef291b74dcfd91628fb2a53f93dbd2968ef2e598746c9204f89fba1f0246fc671610a0591806e46a1346f77c40d910a47c5e20ffb23f003c04b648327a4ed98032c1965bd35bb0044f5344248f56fdb99aa61d6451d68e33489a83bffbe6573541b2da5f64681ea12090f778b2075374778810f73965fa3626a9d41f4df2f83f7c34658cec921b5a9bde49dd5007ec882b02adc514f81aa85898b5cc98e1b137733c0a8789b7f5648d2d231b80bf74978f25d61ce08a8abd11801fd8f995e066676307192ff7641f1cc6e0dee68565b8b22ac3889cd067bf732754a6b270af1044c6a8776811a4f6d8bd0477a9f516064201b920b92d7cd4dc7eee13e6b3eb3528a82f9abb3f388ebe6a8f871393461b73816ec54c99d604174bc5a6801de13908f86aea6a7d0fea107d682bcf1ec348b83872e6b8a316ecd02eb8f8dc86a609bf59a2dd03f1dfa4079436d55e24617be1a2854d008b2b2b1705e2078a7f3946318df1c24f6bf70d4b456eca286ec2b585b28262cc048a098c3e2d5f325a92bb36f691afdc14c822da1b116c9c1c07bb362eb0a04b78834c812134230ebf2044ac2e3c0e3ad00f848dc5010f3bf917ec2fc700b7bf26dacea8440620e04f90f4d97d6dd77cfde8a05c7d3930f1e5811fb8ec5c70964dcc8187ec90e32fdd6b64eec7586413b7d55bed65c4cce39a9b6c15e70e9da94e53fc904e6286f01f5b5562c94211befbc23507e01b2a3865e2f45b5d7b591f

[PHP-CVS] com php-src: Fix bug 61683 tests\basic\bug20539.phpt fails: tests/basic/bug20539.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:aaed0af418e153de27d698b1a529914d86637d20
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 14:38:16 
+0200
Parents:   163c1a393f9163b1741f43dd0ab279c3c8c810ca
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=aaed0af418e153de27d698b1a529914d86637d20

Log:
Fix bug 61683 tests\basic\bug20539.phpt fails

Bugs:
https://bugs.php.net/61683
https://bugs.php.net/20539

Changed paths:
  M  tests/basic/bug20539.phpt


Diff:
diff --git a/tests/basic/bug20539.phpt b/tests/basic/bug20539.phpt
index 67cef3a..1406ce0 100644
--- a/tests/basic/bug20539.phpt
+++ b/tests/basic/bug20539.phpt
@@ -11,7 +11,8 @@ session.save_path=./tests/basic/
 ?php
print good :)\n;
$filename = __DIR__ . '/sess_' . session_id();
-   var_dump(unlink($filename));
+   var_dump(file_exists($filename));
+   @unlink($filename);
 ?
 --EXPECT--
 good :)


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



[PHP-CVS] com php-src: Fix bug 61717 ext\ldap\tests\ldap_sasl_bind_basic.phpt fails: ext/ldap/tests/ldap_sasl_bind_basic.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:47e7755785e49836ca9b0e5376ec81fa209b9386
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 15:20:03 
+0200
Parents:   4fa1743009888ab209539598a564ad0d8f5fc7cc
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=47e7755785e49836ca9b0e5376ec81fa209b9386

Log:
Fix bug 61717 ext\ldap\tests\ldap_sasl_bind_basic.phpt fails

Bugs:
https://bugs.php.net/61717

Changed paths:
  M  ext/ldap/tests/ldap_sasl_bind_basic.phpt


Diff:
diff --git a/ext/ldap/tests/ldap_sasl_bind_basic.phpt 
b/ext/ldap/tests/ldap_sasl_bind_basic.phpt
index 6ed14a5..efa1f82 100644
--- a/ext/ldap/tests/ldap_sasl_bind_basic.phpt
+++ b/ext/ldap/tests/ldap_sasl_bind_basic.phpt
@@ -6,6 +6,13 @@ Patrick Allaert patrickalla...@php.net
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
 ?php if (!function_exists(ldap_sasl_bind)) die(skip LDAP extension not 
compiled with SASL support); ?
+?php
+   require connect.inc;
+   $link = fsockopen($host, $port);
+   if (!$link) {
+   die(skip no server listening);
+   }
+?
 --FILE--
 ?php
 require connect.inc;


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



[PHP-CVS] com php-src: Fix bug 61716 tests\basic\021.phpt fails: tests/basic/021.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:4fa1743009888ab209539598a564ad0d8f5fc7cc
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 15:14:26 
+0200
Parents:   aaed0af418e153de27d698b1a529914d86637d20
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4fa1743009888ab209539598a564ad0d8f5fc7cc

Log:
Fix bug 61716 tests\basic\021.phpt fails

Bugs:
https://bugs.php.net/61716

Changed paths:
  M  tests/basic/021.phpt


Diff:
diff --git a/tests/basic/021.phpt b/tests/basic/021.phpt
index e79ac7d..eeaf588 100644
--- a/tests/basic/021.phpt
+++ b/tests/basic/021.phpt
@@ -2,6 +2,7 @@
 Bug #37276 (problems witch $_POST array)
 --INI--
 file_uploads=1
+upload_tmp_dir=.
 --POST_RAW--
 Content-Type: multipart/form-data; 
boundary=---20896060251896012921717172737
 -20896060251896012921717172737


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



[PHP-CVS] com php-src: Fix bug 61718 ext\ldap\tests\ldap_set_rebind_proc_error.phpt fails: ext/ldap/tests/ldap_set_rebind_proc_error.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:1c435ae498bb89c466e5c74e3be8c85cff17835a
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 15:25:20 
+0200
Parents:   47e7755785e49836ca9b0e5376ec81fa209b9386
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1c435ae498bb89c466e5c74e3be8c85cff17835a

Log:
Fix bug 61718 ext\ldap\tests\ldap_set_rebind_proc_error.phpt fails

Bugs:
https://bugs.php.net/61718

Changed paths:
  M  ext/ldap/tests/ldap_set_rebind_proc_error.phpt


Diff:
diff --git a/ext/ldap/tests/ldap_set_rebind_proc_error.phpt 
b/ext/ldap/tests/ldap_set_rebind_proc_error.phpt
index 3b4cd69..966612f 100644
--- a/ext/ldap/tests/ldap_set_rebind_proc_error.phpt
+++ b/ext/ldap/tests/ldap_set_rebind_proc_error.phpt
@@ -5,6 +5,16 @@ Patrick Allaert patrickalla...@php.net
 # Belgian PHP Testfest 2009
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
+?php
+   if (!function_exists(ldap_set_rebind_proc)) {
+   die(skip ldap_set_rebind_proc() does not exist);
+   }
+   require connect.inc;
+   $link = fsockopen($host, $port);
+   if (!$link) {
+   die(skip no server listening);
+   }
+?
 --FILE--
 ?php
 require connect.inc;


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/soap/tests/bugs/bug31422.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:4ac6862fc461ff475994a2c3f001cde353034ca3
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 15:40:10 
+0200
Parents:   5d1565088fe57c7d0dc711e7a1271bc7c8bd948a 
9c8907ec10aa7af751c9717293c707fe717831e4
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4ac6862fc461ff475994a2c3f001cde353034ca3

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails

Bugs:
https://bugs.php.net/61719
https://bugs.php.net/31422

Changed paths:
  MM  ext/soap/tests/bugs/bug31422.phpt


Diff:
diff --cc ext/soap/tests/bugs/bug31422.phpt
index c4cf7e9,40e8973..c8ddcfe
--- a/ext/soap/tests/bugs/bug31422.phpt
+++ b/ext/soap/tests/bugs/bug31422.phpt
@@@ -1,10 -1,14 +1,15 @@@
  --TEST--
  Bug #31422 (No Error-Logging on SoapServer-Side)
  --SKIPIF--
- ?php require_once('skipif.inc'); ?
+ ?php
+ if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip not valid for windows');
+ }
+ require_once('skipif.inc');
+ ?
  --INI--
  log_errors=1
 +error_log=
  --FILE--
  ?php
  function Add($x,$y) {


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



[PHP-CVS] com php-src: Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails: ext/soap/tests/bugs/bug31422-win.phpt ext/soap/tests/bugs/bug31422.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:9c8907ec10aa7af751c9717293c707fe717831e4
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 15:38:46 
+0200
Parents:   1c435ae498bb89c466e5c74e3be8c85cff17835a
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=9c8907ec10aa7af751c9717293c707fe717831e4

Log:
Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails

Bugs:
https://bugs.php.net/61719
https://bugs.php.net/31422

Changed paths:
  A  ext/soap/tests/bugs/bug31422-win.phpt
  M  ext/soap/tests/bugs/bug31422.phpt


Diff:
diff --git a/ext/soap/tests/bugs/bug31422-win.phpt 
b/ext/soap/tests/bugs/bug31422-win.phpt
new file mode 100644
index 000..ba8df07
--- /dev/null
+++ b/ext/soap/tests/bugs/bug31422-win.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #31422 (No Error-Logging on SoapServer-Side)
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+die('skip not valid for non windows');
+}
+require_once('skipif.inc');
+?
+--INI--
+log_errors=1
+--FILE--
+?php
+function Add($x,$y) {
+   fopen();
+   user_error(Hello, E_USER_ERROR);
+  return $x+$y;
+}
+
+$server = new SoapServer(null,array('uri'=http://testuri.org;));
+$server-addfunction(Add);
+
+$HTTP_RAW_POST_DATA = EOF
+?xml version=1.0 encoding=ISO-8859-1?
+SOAP-ENV:Envelope
+  SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
+  xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
+  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
+  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xmlns:si=http://soapinterop.org/xsd;
+  SOAP-ENV:Body
+ns1:Add xmlns:ns1=http://testuri.org;
+  x xsi:type=xsd:int22/x
+  y xsi:type=xsd:int33/y
+/ns1:Add
+  /SOAP-ENV:Body
+/SOAP-ENV:Envelope
+EOF;
+
+$server-handle($HTTP_RAW_POST_DATA);
+echo ok\n;
+?
+--EXPECTF--
+?xml version=1.0 encoding=UTF-8?
+SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;SOAP-ENV:BodySOAP-ENV:FaultfaultcodeSOAP-ENV:Server/faultcodefaultstringHello/faultstring/SOAP-ENV:Fault/SOAP-ENV:Body/SOAP-ENV:Envelope
+PHP Warning:  fopen() expects at least 2 parameters, 0 given in 
%sbug31422-win.php on line %d
+PHP Fatal error:  Hello in %sbug31422-win.php on line %d
diff --git a/ext/soap/tests/bugs/bug31422.phpt 
b/ext/soap/tests/bugs/bug31422.phpt
index 459da78..40e8973 100644
--- a/ext/soap/tests/bugs/bug31422.phpt
+++ b/ext/soap/tests/bugs/bug31422.phpt
@@ -1,7 +1,12 @@
 --TEST--
 Bug #31422 (No Error-Logging on SoapServer-Side)
 --SKIPIF--
-?php require_once('skipif.inc'); ?
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip not valid for windows');
+}
+require_once('skipif.inc');
+?
 --INI--
 log_errors=1
 --FILE--


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



[PHP-CVS] com php-src: Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails: ext/soap/tests/bugs/bug31422-win.phpt ext/soap/tests/bugs/bug31422.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:eaeeb0f5e88c7e68c6fc44abb597af10e7b925d7
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 15:35:47 
+0200
Parents:   a688e69baed276ab65a0c96d7d5647dd0c4f3e37
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=eaeeb0f5e88c7e68c6fc44abb597af10e7b925d7

Log:
Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails

Bugs:
https://bugs.php.net/61719
https://bugs.php.net/31422

Changed paths:
  A  ext/soap/tests/bugs/bug31422-win.phpt
  M  ext/soap/tests/bugs/bug31422.phpt


Diff:
diff --git a/ext/soap/tests/bugs/bug31422-win.phpt 
b/ext/soap/tests/bugs/bug31422-win.phpt
new file mode 100644
index 000..ba8df07
--- /dev/null
+++ b/ext/soap/tests/bugs/bug31422-win.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #31422 (No Error-Logging on SoapServer-Side)
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+die('skip not valid for non windows');
+}
+require_once('skipif.inc');
+?
+--INI--
+log_errors=1
+--FILE--
+?php
+function Add($x,$y) {
+   fopen();
+   user_error(Hello, E_USER_ERROR);
+  return $x+$y;
+}
+
+$server = new SoapServer(null,array('uri'=http://testuri.org;));
+$server-addfunction(Add);
+
+$HTTP_RAW_POST_DATA = EOF
+?xml version=1.0 encoding=ISO-8859-1?
+SOAP-ENV:Envelope
+  SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
+  xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
+  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
+  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xmlns:si=http://soapinterop.org/xsd;
+  SOAP-ENV:Body
+ns1:Add xmlns:ns1=http://testuri.org;
+  x xsi:type=xsd:int22/x
+  y xsi:type=xsd:int33/y
+/ns1:Add
+  /SOAP-ENV:Body
+/SOAP-ENV:Envelope
+EOF;
+
+$server-handle($HTTP_RAW_POST_DATA);
+echo ok\n;
+?
+--EXPECTF--
+?xml version=1.0 encoding=UTF-8?
+SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;SOAP-ENV:BodySOAP-ENV:FaultfaultcodeSOAP-ENV:Server/faultcodefaultstringHello/faultstring/SOAP-ENV:Fault/SOAP-ENV:Body/SOAP-ENV:Envelope
+PHP Warning:  fopen() expects at least 2 parameters, 0 given in 
%sbug31422-win.php on line %d
+PHP Fatal error:  Hello in %sbug31422-win.php on line %d
diff --git a/ext/soap/tests/bugs/bug31422.phpt 
b/ext/soap/tests/bugs/bug31422.phpt
index c4cf7e9..c8ddcfe 100644
--- a/ext/soap/tests/bugs/bug31422.phpt
+++ b/ext/soap/tests/bugs/bug31422.phpt
@@ -1,7 +1,12 @@
 --TEST--
 Bug #31422 (No Error-Logging on SoapServer-Side)
 --SKIPIF--
-?php require_once('skipif.inc'); ?
+?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+die('skip not valid for windows');
+}
+require_once('skipif.inc');
+?
 --INI--
 log_errors=1
 error_log=


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



[PHP-CVS] com php-src: Fix bug 61720 ext\libxml\tests\bug61367-read.phpt fails: ext/libxml/tests/bug61367-read.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:bceafee879785b176e6b4564908d0b2c82cb6a0b
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 15:45:03 
+0200
Parents:   9c8907ec10aa7af751c9717293c707fe717831e4
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bceafee879785b176e6b4564908d0b2c82cb6a0b

Log:
Fix bug 61720 ext\libxml\tests\bug61367-read.phpt fails

Bugs:
https://bugs.php.net/61720
https://bugs.php.net/61367

Changed paths:
  M  ext/libxml/tests/bug61367-read.phpt


Diff:
diff --git a/ext/libxml/tests/bug61367-read.phpt 
b/ext/libxml/tests/bug61367-read.phpt
index 722b8e7..3deecfc 100644
--- a/ext/libxml/tests/bug61367-read.phpt
+++ b/ext/libxml/tests/bug61367-read.phpt
@@ -15,6 +15,7 @@ class StreamExploiter {
$doc-resolveExternals = true;
$doc-substituteEntities = true;
$dir = htmlspecialchars(dirname(getcwd()));
+   $dir = str_replace('\\', '/', $dir); // fix for windows
$doc-loadXML( XML
 !DOCTYPE doc [
!ENTITY file SYSTEM file:///$dir/bad


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



[PHP-CVS] com php-src: Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*: ext/standard/tests/file/windows_links/bug48746.phpt ext/standard/tests/file/windows_links/bug48746_1.phpt

2012-04-16 Thread Anatoliy Belsky
Commit:f3d86b314f4977f95844aa4eaa41759c8d71c247
Author:Anatoliy Belsky a...@php.net Mon, 16 Apr 2012 17:06:30 
+0200
Parents:   bceafee879785b176e6b4564908d0b2c82cb6a0b
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f3d86b314f4977f95844aa4eaa41759c8d71c247

Log:
Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*

Bugs:
https://bugs.php.net/61746

Changed paths:
  M  ext/standard/tests/file/windows_links/bug48746.phpt
  M  ext/standard/tests/file/windows_links/bug48746_1.phpt
  M  ext/standard/tests/file/windows_links/bug48746_2.phpt


Diff:
diff --git a/ext/standard/tests/file/windows_links/bug48746.phpt 
b/ext/standard/tests/file/windows_links/bug48746.phpt
index 6c88c63..a47b7cb 100644
--- a/ext/standard/tests/file/windows_links/bug48746.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746.phpt
@@ -17,13 +17,14 @@ if (count($output) == 0) {
 ?
 --FILE--
 ?php
+$mountvol = c:\\Windows\\System32\\mountvol.exe;
 $old_dir = __DIR__;
 $dirname = __DIR__ . \\mnt\\test\\directory;
 mkdir($dirname, 0700, true);
 chdir(__DIR__ . \\mnt\\test);
 $drive = substr(__DIR__, 0, 2);
 $pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec(mountvol  . $drive .  /L, $output, $ret_val);
+$ret = exec($mountvol .   . $drive .  /L, $output, $ret_val);
 exec(mklink /j mounted_volume  . $ret, $output, $ret_val);
 $fullpath = mounted_volume . $pathwithoutdrive;
 exec(mklink /j mklink_junction directory, $output, $ret_val);
diff --git a/ext/standard/tests/file/windows_links/bug48746_1.phpt 
b/ext/standard/tests/file/windows_links/bug48746_1.phpt
index ca8450a..716c656 100644
--- a/ext/standard/tests/file/windows_links/bug48746_1.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_1.phpt
@@ -17,13 +17,14 @@ if (count($output) == 0) {
 ?
 --FILE--
 ?php
+$mountvol = c:\\Windows\\System32\\mountvol.exe;
 $old_dir = __DIR__;
 $dirname = __DIR__ . \\mnt\\test\\directory;
 exec(mkdir  . $dirname, $output, $ret_val);
 chdir(__DIR__ . \\mnt\\test);
 $drive = substr(__DIR__, 0, 2);
 $pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec(mountvol  . $drive .  /L, $output, $ret_val);
+$ret = exec($mountvol .   . $drive .  /L, $output, $ret_val);
 exec(mklink /j mounted_volume  . $ret, $output, $ret_val);
 $fullpath = mounted_volume . $pathwithoutdrive;
 exec(mklink /j mklink_junction directory, $output, $ret_val);
diff --git a/ext/standard/tests/file/windows_links/bug48746_2.phpt 
b/ext/standard/tests/file/windows_links/bug48746_2.phpt
index 7beed16..637152c 100644
--- a/ext/standard/tests/file/windows_links/bug48746_2.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_2.phpt
@@ -17,13 +17,14 @@ unlink('mklink bug48746_tmp.lnk');
 ?
 --FILE--
 ?php
+$mountvol = c:\\Windows\\System32\\mountvol.exe;
 $old_dir = __DIR__;
 $dirname = __DIR__ . \\mnt\\test\\directory;
 exec(mkdir  . $dirname, $output, $ret_val);
 chdir(__DIR__ . \\mnt\\test);
 $drive = substr(__DIR__, 0, 2);
 $pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec(mountvol  . $drive .  /L, $output, $ret_val);
+$ret = exec($mountvol .   . $drive .  /L, $output, $ret_val);
 exec(mklink /j mounted_volume  . $ret, $output, $ret_val);
 $fullpath = mounted_volume . $pathwithoutdrive;
 exec(mklink /j mklink_junction directory, $output, $ret_val);


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



[PHP-CVS] com php-src: Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails: ext/spl/spl_directory.c ext/spl/tests/SplFileObject_fflush_basic_001.phpt ext/spl/tests/SplFileObject_ftruncate_error_001.

2012-04-19 Thread Anatoliy Belsky
Commit:adfb4c62b76ef241978814e10cae70498f52ea29
Author:Anatoliy Belsky a...@php.net Thu, 19 Apr 2012 11:20:16 
+0200
Parents:   4650b2164b641ba3fd9d733e8cc82e386aa98772
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=adfb4c62b76ef241978814e10cae70498f52ea29

Log:
Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails

The solution was already introduced in 5.4 by Etienne Kneuss and
Pierre but wasn't merged back into 5.3 . SplFileObject should
not be used with directories. So just putting together all the
necessary pieces from 5.4

Bugs:
https://bugs.php.net/61671

Changed paths:
  M  ext/spl/spl_directory.c
  M  ext/spl/tests/SplFileObject_fflush_basic_001.phpt
  M  ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
  M  ext/spl/tests/fileobject_003.phpt


Diff:
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 04da4e6..aaa256d 100755
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -271,7 +271,18 @@ static void spl_filesystem_dir_open(spl_filesystem_object* 
intern, char *path TS
 
 static int spl_filesystem_file_open(spl_filesystem_object *intern, int 
use_include_path, int silent TSRMLS_DC) /* {{{ */
 {
+   zval  tmp;
+
intern-type = SPL_FS_FILE;
+
+   php_stat(intern-file_name, intern-file_name_len, FS_IS_DIR, tmp 
TSRMLS_CC);
+   if (Z_LVAL(tmp)) {
+   intern-u.file.open_mode = NULL;
+   intern-file_name = NULL;
+   zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, 
Cannot use SplFileObject with directories);
+   return FAILURE;
+   }
+
intern-u.file.context = 
php_stream_context_from_zval(intern-u.file.zcontext, 0);
intern-u.file.stream = php_stream_open_wrapper_ex(intern-file_name, 
intern-u.file.open_mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE 
| REPORT_ERRORS, NULL, intern-u.file.context);
 
diff --git a/ext/spl/tests/SplFileObject_fflush_basic_001.phpt 
b/ext/spl/tests/SplFileObject_fflush_basic_001.phpt
index baab156..2d8a9c8 100644
--- a/ext/spl/tests/SplFileObject_fflush_basic_001.phpt
+++ b/ext/spl/tests/SplFileObject_fflush_basic_001.phpt
@@ -17,9 +17,12 @@ class VariableStream {
 var $varname;
 
 function stream_open($path, $mode, $options, $opened_path)
-{  
+{
 return true;
 }
+
+function url_stat() {
+}
 }
 stream_wrapper_register(SPLtest, VariableStream);
 $ftruncate_test = ;
diff --git a/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt 
b/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
index 90b27ec..a2eef60 100644
--- a/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
+++ b/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
@@ -12,6 +12,9 @@ class VariableStream {
 {
 return true;
 }
+
+function url_stat() {
+}
 }
 stream_wrapper_register(SPLtest, VariableStream);
 $ftruncate_test = ;
diff --git a/ext/spl/tests/fileobject_003.phpt 
b/ext/spl/tests/fileobject_003.phpt
index 6679673..6cc650b 100755
--- a/ext/spl/tests/fileobject_003.phpt
+++ b/ext/spl/tests/fileobject_003.phpt
@@ -18,20 +18,27 @@ function test($name, $lc, $lp)
var_dump($o == $c);
var_dump($o-getPathname() == $c-getPathname());

-   $f = new SplFileObject($name);
-   var_dump($name);
-   var_dump($f-getPathName());
-   $l = substr($f-getPathName(), -1);
-   var_dump($l != '/'  $l != '\\'  $l == $lc);
-   var_dump($f-getFileName());
-   $l = substr($f-getFileName(), -1);
-   var_dump($l != '/'  $l != '\\'  $l == $lc);
-   var_dump($f-getPath());
-   $l = substr($f-getPath(), -1);
-   var_dump($l != '/'  $l != '\\'  $l == $lp);
-
-   $fo = $o-openFile();
-   var_dump($fo-getPathName(), $fo-getFileName(), $fo-getPath());
+   try {
+   $f = new SplFileObject($name);
+   var_dump($name);
+   var_dump($f-getPathName());
+   $l = substr($f-getPathName(), -1);
+   var_dump($l != '/'  $l != '\\'  $l == $lc);
+   var_dump($f-getFileName());
+   $l = substr($f-getFileName(), -1);
+   var_dump($l != '/'  $l != '\\'  $l == $lc);
+   var_dump($f-getPath());
+   $l = substr($f-getPath(), -1);
+   var_dump($l != '/'  $l != '\\'  $l == $lp);
+   } catch (LogicException $e) {
+   echo LogicException: .$e-getMessage().\n;
+   }
+   try {
+   $fo = $o-openFile();
+   var_dump($fo-getPathName(), $fo-getFileName(), 
$fo-getPath());
+   } catch (LogicException $e) {
+   echo LogicException: .$e-getMessage().\n;
+   }
 }
 
 test(dirname(__FILE__) . '/' . 'fileobject_001a.txt', 't', 
substr(dirname(__FILE__),-1));
@@ -84,16 +91,8 @@ object(SplFileInfo)#%d (2) {
 bool(false)
 bool(true)
 bool(true)
-%s(%d) %stests/
-string(%d) %stests
-bool(true)
-string(5) tests
-bool(true)
-string(%d

[PHP-CVS] com php-src: Fix bug #61811 three of finfo tests failed, see also #61812.: ext/fileinfo/tests/finfo_open_001.phpt ext/fileinfo/tests/finfo_open_error.phpt

2012-04-22 Thread Anatoliy Belsky
Commit:da1b5346017899d1f09c908eee2d166249160293
Author:Anatoliy Belsky a...@php.net Sun, 22 Apr 2012 19:26:54 
+0200
Parents:   f13b0ede0764f63762f105fb6c62de460f7b7490
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=da1b5346017899d1f09c908eee2d166249160293

Log:
Fix bug #61811 three of finfo tests failed, see also #61812.

The remaining two was assidentially merged back from 5.4

Bugs:
https://bugs.php.net/61811
https://bugs.php.net/61812

Changed paths:
  M  ext/fileinfo/tests/finfo_open_001.phpt
  M  ext/fileinfo/tests/finfo_open_error.phpt


Diff:
diff --git a/ext/fileinfo/tests/finfo_open_001.phpt 
b/ext/fileinfo/tests/finfo_open_001.phpt
index 17935c3..69696eb 100644
--- a/ext/fileinfo/tests/finfo_open_001.phpt
+++ b/ext/fileinfo/tests/finfo_open_001.phpt
@@ -14,28 +14,10 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent'));
 
 ?
 --EXPECTF--
-Warning: finfo_open() expects parameter 2 to be a valid path, string given in 
%s on line %d
+Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
 bool(false)
 resource(%d) of type (file_info)
 resource(%d) of type (file_info)
-
-Warning: finfo_open(%s123): failed to open stream: No such file or directory 
in %s on line %d
-
-Warning: finfo_open(%s123): failed to open stream: No such file or directory 
in %s on line %d
-
-Warning: finfo_open(): Failed to load magic database at '%s123'. in %s on line 
%d
 bool(false)
-
-Warning: finfo_open(%s1): failed to open stream: No such file or directory in 
%s on line %d
-
-Warning: finfo_open(%s1): failed to open stream: No such file or directory in 
%s on line %d
-
-Warning: finfo_open(): Failed to load magic database at '%s1'. in %s on line %d
 bool(false)
-
-Warning: finfo_open(%sinexistent): failed to open stream: No such file or 
directory in %s on line %d
-
-Warning: finfo_open(%sinexistent): failed to open stream: No such file or 
directory in %s on line %d
-
-Warning: finfo_open(): Failed to load magic database at '%sinexistent'. in %s 
on line %d
 bool(false)
diff --git a/ext/fileinfo/tests/finfo_open_error.phpt 
b/ext/fileinfo/tests/finfo_open_error.phpt
index 19ae7a6..aae229f 100644
--- a/ext/fileinfo/tests/finfo_open_error.phpt
+++ b/ext/fileinfo/tests/finfo_open_error.phpt
@@ -26,12 +26,6 @@ var_dump( new finfo('foobar') );
 ===DONE===
 --EXPECTF--
 *** Testing finfo_open() : error functionality ***
-
-Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or 
directory in %s on line %d
-
-Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or 
directory in %s on line %d
-
-Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %s 
on line %d
 bool(false)
 
 Warning: finfo_open() expects parameter 1 to be long, array given in %s on 
line %d
@@ -43,9 +37,9 @@ bool(false)
 Notice: finfo_open(): Warning: using regular magic file `%s' in %s on line %d
 resource(%d) of type (file_info)
 
-Warning: finfo_open() expects parameter 1 to be long, string given in %s on 
line %d
+Warning: finfo_open() expects parameter 1 to be long, 
%unicode_string_optional% given in %s on line %d
 bool(false)
 
-Warning: finfo::finfo() expects parameter 1 to be long, string given in %s on 
line %d
+Warning: finfo::finfo() expects parameter 1 to be long, 
%unicode_string_optional% given in %s on line %d
 NULL
 ===DONE===


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



[PHP-CVS] com php-src: Bug 61610 adopted expected warnings for 5.4: ext/date/tests/date_default_timezone_get-1-win32.phpt

2012-04-24 Thread Anatoliy Belsky
Commit:c7f9f54a2374847fe079c86ed07a90bc501f5660
Author:Anatoliy Belsky a...@php.net Tue, 24 Apr 2012 13:36:43 
+0200
Parents:   485638a09c23e48820e0160c26098b0ef571c533
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c7f9f54a2374847fe079c86ed07a90bc501f5660

Log:
Bug 61610 adopted expected warnings for 5.4

Bugs:
https://bugs.php.net/61610

Changed paths:
  M  ext/date/tests/date_default_timezone_get-1-win32.phpt


Diff:
diff --git a/ext/date/tests/date_default_timezone_get-1-win32.phpt 
b/ext/date/tests/date_default_timezone_get-1-win32.phpt
index a12418f..ed9ac1a 100644
--- a/ext/date/tests/date_default_timezone_get-1-win32.phpt
+++ b/ext/date/tests/date_default_timezone_get-1-win32.phpt
@@ -17,8 +17,8 @@ date.timezone=
   parametrized so there is no hardcoded timezone data.*/
 ?
 --EXPECTF--
-Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 3
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected the timezone '%s' for now, but please set date.timezone 
to select your timezone. in %s on line %d
 %s
 
-Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1-win32.php on line 4
+Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected the timezone '%s' for now, but please set date.timezone 
to select your timezone. in %s on line %d
 %s


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



[PHP-CVS] com php-src: Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only: ext/openssl/openssl.c

2012-04-24 Thread Anatoliy Belsky
Commit:270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e
Author:Anatoliy Belsky a...@php.net Tue, 24 Apr 2012 14:05:35 
+0200
Parents:   8d748e5de519867d9b6ce40e3ea28a209b07768f
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e

Log:
Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only

Bugs:
https://bugs.php.net/61413

Changed paths:
  M  ext/openssl/openssl.c


Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 7c5afc5..779a91d 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -4677,7 +4677,7 @@ PHP_FUNCTION(openssl_encrypt)
int data_len, method_len, password_len, iv_len = 0, max_iv_len;
const EVP_CIPHER *cipher_type;
EVP_CIPHER_CTX cipher_ctx;
-   int i, outlen, keylen;
+   int i = 0, outlen, keylen;
unsigned char *outbuf, *key;
zend_bool free_iv;


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



[PHP-CVS] com php-src: Partial fix for bug 61743 to get correct icacls path: ext/standard/tests/file/windows_acls/common.inc

2012-04-25 Thread Anatoliy Belsky
Commit:433290e199e29f38cfebf54ba213f4abff4e328a
Author:Anatoliy Belsky a...@php.net Wed, 25 Apr 2012 18:38:27 
+0200
Parents:   270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=433290e199e29f38cfebf54ba213f4abff4e328a

Log:
Partial fix for bug 61743 to get correct icacls path

Bugs:
https://bugs.php.net/61743

Changed paths:
  M  ext/standard/tests/file/windows_acls/common.inc


Diff:
diff --git a/ext/standard/tests/file/windows_acls/common.inc 
b/ext/standard/tests/file/windows_acls/common.inc
index c9be2f1..4007ad0 100644
--- a/ext/standard/tests/file/windows_acls/common.inc
+++ b/ext/standard/tests/file/windows_acls/common.inc
@@ -25,16 +25,29 @@ function get_username(){
$user = get_current_user();
}
 
+   if (!$user) {
+   $user =  exec('echo %USERNAME%');
+   }
+
return $user;
 }
 
 function get_domainname()
 {
-   return getenv('USERDOMAIN');
+   $domain = getenv('USERDOMAIN');
+
+   return $domain;
+}
+
+function get_icacls()
+{
+   $sysroot = exec('echo %SYSTEMROOT%');
+
+   return $sysroot\\System32\\icacls.exe;
 }
 
 function icacls_set($path, $mode, $perm) {
-   $icacls = 'c:\\Windows\\System32\\icacls.exe';
+   $icacls = get_icacls();
$user = get_username();
$path_escaped =  '' . $path . '';
$perm_entry = array();


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



[PHP-CVS] com php-src: Fix bug #61800 ext\standard\tests\streams\bug61371.phpt fails: ext/standard/tests/streams/bug61371-win.phpt ext/standard/tests/streams/bug61371.phpt

2012-04-26 Thread Anatoliy Belsky
Commit:4e9db5ba9fd0dcaa5f86dc644dfa8a7897ae8dd7
Author:Anatoliy Belsky a...@php.net Thu, 26 Apr 2012 13:27:01 
+0200
Parents:   433290e199e29f38cfebf54ba213f4abff4e328a
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4e9db5ba9fd0dcaa5f86dc644dfa8a7897ae8dd7

Log:
Fix bug #61800 ext\standard\tests\streams\bug61371.phpt fails

Bugs:
https://bugs.php.net/61800
https://bugs.php.net/61371

Changed paths:
  A  ext/standard/tests/streams/bug61371-win.phpt
  M  ext/standard/tests/streams/bug61371.phpt


Diff:
diff --git a/ext/standard/tests/streams/bug61371-win.phpt 
b/ext/standard/tests/streams/bug61371-win.phpt
new file mode 100644
index 000..dc70530
--- /dev/null
+++ b/ext/standard/tests/streams/bug61371-win.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Bug #61371: stream_context_create() causes memory leaks on use 
streams_socket_create
+--SKIPIF--
+?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+   die('skip windows only test');
+}
+--FILE--
+?php
+function test($doFclose) {
+$previous = null;
+$current = null;
+for($test=1;$test=3;$test++) {
+   $current = memory_get_usage(true);
+   if (!is_null($previous)) {
+   var_dump($previous == $current);
+   }
+   $previous = $current;
+   echo 'memory: '.round($current / 1024, 0).kb\n;
+   for($i=0;$i=100;$i++) {
+   $context = stream_context_create(array());
+   $stream = stream_socket_client('udp://127.0.0.1:80', $errno, 
$errstr, 10, STREAM_CLIENT_CONNECT, $context);
+   if ($doFclose) fclose($stream);
+   unset($context);
+   unset($stream);
+   unset($errno);
+   unset($errstr);
+   }
+}
+}
+
+test(true);
+test(false);
+?
+--EXPECTF--
+memory: %dkb
+bool(true)
+memory: %dkb
+bool(true)
+memory: %dkb
+memory: %dkb
+bool(true)
+memory: %dkb
+bool(true)
+memory: %dkb
diff --git a/ext/standard/tests/streams/bug61371.phpt 
b/ext/standard/tests/streams/bug61371.phpt
index 7fbfa56..7c64d1d 100644
--- a/ext/standard/tests/streams/bug61371.phpt
+++ b/ext/standard/tests/streams/bug61371.phpt
@@ -1,5 +1,10 @@
 --TEST--
 Bug #61371: stream_context_create() causes memory leaks on use 
streams_socket_create
+--SKIPIF--
+?php
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+   die('skip non windows test');
+}
 --FILE--
 ?php
 function test($doFclose) {


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



[PHP-CVS] com php-src: Fix bug #61791 ext\sqlite3\tests\sqlite3_15_open_error.phpt fails: ext/sqlite3/tests/sqlite3_15_open_error-win.phpt ext/sqlite3/tests/sqlite3_15_open_error.phpt

2012-04-26 Thread Anatoliy Belsky
Commit:4daab0abecd5ee583c005d8e7b6affc08af8639d
Author:Anatoliy Belsky a...@php.net Thu, 26 Apr 2012 15:14:26 
+0200
Parents:   4e9db5ba9fd0dcaa5f86dc644dfa8a7897ae8dd7
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4daab0abecd5ee583c005d8e7b6affc08af8639d

Log:
Fix bug #61791 ext\sqlite3\tests\sqlite3_15_open_error.phpt fails

Bugs:
https://bugs.php.net/61791

Changed paths:
  A  ext/sqlite3/tests/sqlite3_15_open_error-win.phpt
  M  ext/sqlite3/tests/sqlite3_15_open_error.phpt


Diff:
diff --git a/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt 
b/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt
new file mode 100644
index 000..6289fac
--- /dev/null
+++ b/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt
@@ -0,0 +1,37 @@
+--TEST--
+SQLite3::open error test
+--SKIPIF--
+?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+   die('skip windows only test');
+}
+require_once(__DIR__ . '/skipif.inc');
+?
+--FILE--
+?php
+$sysroot = exec('echo %systemroot%');
+$icacls = $sysroot\\System32\\icacls.exe;
+$user = get_current_user();
+$unreadable = __DIR__ . '/unreadable.db';
+
+touch($unreadable);
+$cmd = $icacls . ' ' . $unreadable . ' /inheritance:r /deny ' . $user . 
':(F,M,R,RX,W)';
+exec($cmd);
+
+try {
+   $db = new SQLite3($unreadable);
+} catch (Exception $e) {
+   echo $e . \n;
+}
+echo Done\n;
+
+$cmd = $icacls . ' ' . $unreadable . ' /grant ' . $user . ':(F,M,R,RX,W)';
+exec($cmd);
+unlink($unreadable);
+?
+--EXPECTF--
+exception 'Exception' with message 'Unable to open database: %s' in 
%ssqlite3_15_open_error-win.php:%d
+Stack trace:
+#0 %ssqlite3_15_open_error-win.php(%d): SQLite3-__construct('%s')
+#1 {main}
+Done
diff --git a/ext/sqlite3/tests/sqlite3_15_open_error.phpt 
b/ext/sqlite3/tests/sqlite3_15_open_error.phpt
index f296f82..9b0496f 100644
--- a/ext/sqlite3/tests/sqlite3_15_open_error.phpt
+++ b/ext/sqlite3/tests/sqlite3_15_open_error.phpt
@@ -2,6 +2,9 @@
 SQLite3::open error test
 --SKIPIF--
 ?php
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+   die('skip non windows test');
+}
 require_once(dirname(__FILE__) . '/skipif.inc');
 if (posix_geteuid() == 0) {
 die('SKIP Cannot run test as root.');


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/sqlite3/tests/sqlite3_15_open_error.phpt

2012-04-26 Thread Anatoliy Belsky
Commit:94d96f77826e46f114d4bc1777e1edcdfef002a2
Author:Anatoliy Belsky a...@php.net Thu, 26 Apr 2012 15:17:46 
+0200
Parents:   19df3c1b1c3bcb120ba63d3537e7177b8826fb96 
4daab0abecd5ee583c005d8e7b6affc08af8639d
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=94d96f77826e46f114d4bc1777e1edcdfef002a2

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix bug #61791 ext\sqlite3\tests\sqlite3_15_open_error.phpt fails

Conflicts:
ext/sqlite3/tests/sqlite3_15_open_error.phpt

Bugs:
https://bugs.php.net/61791

Changed paths:
  MM  ext/sqlite3/tests/sqlite3_15_open_error.phpt


Diff:
diff --cc ext/sqlite3/tests/sqlite3_15_open_error.phpt
index ea1ee42,9b0496f..fc05b87
--- a/ext/sqlite3/tests/sqlite3_15_open_error.phpt
+++ b/ext/sqlite3/tests/sqlite3_15_open_error.phpt
@@@ -2,7 -2,10 +2,10 @@@
  SQLite3::open error test
  --SKIPIF--
  ?php
+ if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+   die('skip non windows test');
+ }
 -require_once(dirname(__FILE__) . '/skipif.inc');
 +require_once(__DIR__ . '/skipif.inc');
  if (posix_geteuid() == 0) {
  die('SKIP Cannot run test as root.');
  }


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



[PHP-CVS] com php-src: Fix bug 61786 Failing tests in ext\session\tests\*: ext/session/tests/rfc1867_invalid_settings-win.phpt ext/session/tests/rfc1867_invalid_settings.phpt ext/session/tests/rfc1867

2012-04-26 Thread Anatoliy Belsky
Commit:3dbe48762fedfefeebd253da96fc84ad669fc10d
Author:Anatoliy Belsky a...@php.net Thu, 26 Apr 2012 15:39:45 
+0200
Parents:   94d96f77826e46f114d4bc1777e1edcdfef002a2
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=3dbe48762fedfefeebd253da96fc84ad669fc10d

Log:
Fix bug 61786 Failing tests in ext\session\tests\*

Bugs:
https://bugs.php.net/61786

Changed paths:
  A  ext/session/tests/rfc1867_invalid_settings-win.phpt
  M  ext/session/tests/rfc1867_invalid_settings.phpt
  A  ext/session/tests/rfc1867_invalid_settings_2-win.phpt
  M  ext/session/tests/rfc1867_invalid_settings_2.phpt
  M  ext/session/tests/session_set_save_handler_class_002.phpt
  M  ext/session/tests/session_set_save_handler_iface_001.phpt
  M  ext/session/tests/session_set_save_handler_iface_002.phpt


Diff:
diff --git a/ext/session/tests/rfc1867_invalid_settings-win.phpt 
b/ext/session/tests/rfc1867_invalid_settings-win.phpt
new file mode 100644
index 000..ed854e8
--- /dev/null
+++ b/ext/session/tests/rfc1867_invalid_settings-win.phpt
@@ -0,0 +1,19 @@
+--TEST--
+session rfc1867 invalid settings
+--INI--
+session.upload_progress.freq=-1
+error_log=
+--SKIPIF--
+?php 
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) != WIN)
+die(skip windows only test);
+?
+--FILE--
+?php
+var_dump(ini_get(session.upload_progress.freq));
+?
+--EXPECTF--
+Warning: PHP Startup: session.upload_progress.freq must be greater than or 
equal to zero in %s
+string(2) 1%
+PHP Warning:  PHP Startup: session.upload_progress.freq must be greater than 
or equal to zero in %s
diff --git a/ext/session/tests/rfc1867_invalid_settings.phpt 
b/ext/session/tests/rfc1867_invalid_settings.phpt
index d954563..640c4d2 100644
--- a/ext/session/tests/rfc1867_invalid_settings.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings.phpt
@@ -4,7 +4,11 @@ session rfc1867 invalid settings
 session.upload_progress.freq=-1
 error_log=
 --SKIPIF--
-?php include('skipif.inc'); ?
+?php 
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) == WIN)
+die(skip Not for Windows);
+?
 --FILE--
 ?php
 var_dump(ini_get(session.upload_progress.freq));
diff --git a/ext/session/tests/rfc1867_invalid_settings_2-win.phpt 
b/ext/session/tests/rfc1867_invalid_settings_2-win.phpt
new file mode 100644
index 000..f8e6b6d
--- /dev/null
+++ b/ext/session/tests/rfc1867_invalid_settings_2-win.phpt
@@ -0,0 +1,19 @@
+--TEST--
+session rfc1867 invalid settings 2
+--INI--
+session.upload_progress.freq=200%
+error_log=
+--SKIPIF--
+?php 
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) != WIN)
+die(skip windows only test);
+?
+--FILE--
+?php
+var_dump(ini_get(session.upload_progress.freq));
+?
+--EXPECTF--
+Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
+string(2) 1%
+PHP Warning:  PHP Startup: session.upload_progress.freq cannot be over 100% in 
%s
diff --git a/ext/session/tests/rfc1867_invalid_settings_2.phpt 
b/ext/session/tests/rfc1867_invalid_settings_2.phpt
index 544510e..c2a0c6a 100644
--- a/ext/session/tests/rfc1867_invalid_settings_2.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings_2.phpt
@@ -4,7 +4,11 @@ session rfc1867 invalid settings 2
 session.upload_progress.freq=200%
 error_log=
 --SKIPIF--
-?php include('skipif.inc'); ?
+?php 
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) == WIN)
+die(skip Not for Windows);
+?
 --FILE--
 ?php
 var_dump(ini_get(session.upload_progress.freq));
diff --git a/ext/session/tests/session_set_save_handler_class_002.phpt 
b/ext/session/tests/session_set_save_handler_class_002.phpt
index 9d5f732..6fb831f 100644
--- a/ext/session/tests/session_set_save_handler_class_002.phpt
+++ b/ext/session/tests/session_set_save_handler_class_002.phpt
@@ -23,7 +23,7 @@ class MySession2 extends SessionHandler {
 
public function open($path, $name) {
if (!$path) {
-   $path = '/tmp';
+   $path = sys_get_temp_dir();
}
$this-path = $path . '/u_sess_' . $name;
return true;
diff --git a/ext/session/tests/session_set_save_handler_iface_001.phpt 
b/ext/session/tests/session_set_save_handler_iface_001.phpt
index c8199ff..39a4b99 100644
--- a/ext/session/tests/session_set_save_handler_iface_001.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_001.phpt
@@ -23,7 +23,7 @@ class MySession2 implements SessionHandlerInterface {
 
public function open($path, $name) {
if (!$path) {
-   $path = '/tmp';
+   $path = sys_get_temp_dir();
}
$this-path = $path . '/u_sess_' . $name;
return true;
diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt 
b/ext/session/tests/session_set_save_handler_iface_002.phpt
index 42e8fbe..40c9ac6 100644
--- a/ext/session/tests/session_set_save_handler_iface_002.phpt
+++ b/ext/session/tests

[PHP-CVS] com php-src: Fix bug 61685 putenv('TZ=UTC') doesn't update timezone for localtime(): ext/calendar/tests/unixtojd.phpt

2012-04-28 Thread Anatoliy Belsky
Commit:dc6d283b1c277c2c99a794d17a2e2540a9f2e60e
Author:Matt Ficken mattfic...@php.net Sat, 28 Apr 2012 11:42:42 
+0200
Committer: Anatoliy Belsky a...@php.net  Sat, 28 Apr 2012 11:42:42 +0200
Parents:   4daab0abecd5ee583c005d8e7b6affc08af8639d
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=dc6d283b1c277c2c99a794d17a2e2540a9f2e60e

Log:
Fix bug 61685 putenv('TZ=UTC') doesn't update timezone for localtime()

Bugs:
https://bugs.php.net/61685

Changed paths:
  M  ext/calendar/tests/unixtojd.phpt


Diff:
diff --git a/ext/calendar/tests/unixtojd.phpt b/ext/calendar/tests/unixtojd.phpt
index 11edde5..4eeb1ca 100644
--- a/ext/calendar/tests/unixtojd.phpt
+++ b/ext/calendar/tests/unixtojd.phpt
@@ -2,9 +2,34 @@
 unixtojd()
 --SKIPIF--
 ?php include 'skipif.inc'; ?
+--ENV--
+TZ=UTC
 --FILE--
 ?php
+// this line has no impact on test output on Windows
 putenv('TZ=UTC');
+// getenv('TZ') returns 'UTC' here
+// putenv (basic_functions.c) does call tzset() when the env var being put is 
'TZ'
+//  -adding a call direct to GetEnvironmentVariableA just before tzset() 
is called to check the value of 'TZ' returns 'UTC'
+// putting a call to date_default_timezone_set() here doesn't help
+//
+// on Windows, the only thing that gets this test to pass is to put TZ=UTC in 
--ENV-- section
+// -since putenv() is written to call tzset() when env var is TZ, 
I assume that putenv(TZ=UTC) is intended to work
+// and should work on all platforms(including Windows).
+// easter_date.phpt passes
+// -doesn't use --ENV-- section
+// -uses --INI-- section with date.timezone=UTC
+// -uses putenv('TZ=UTC')
+// date.timezone=UTC
+// -if ommitted from easter_date.phpt, outputs DATE_TZ_ERRMSG 
warning
+// -easter_date() calls mktime() and localtime()
+// -whereas unixtojd(10) calls 
localtime(10)
+// -if ommitted from unixtojd.phpt, does NOT output DATE_TZ_ERRMSG
+//
+// unixtojd() calls php_localtime_r() which for Pacific timezone systems, 
returns a time -8 hours
+// -this incorrect localtime is passed to the julian date 
conversion (GregorianToSDN) function which works (probably correctly)
+// but returns -1 day from expected because its input is 
-1 from expected
+
 echo unixtojd(4). \n;
 echo unixtojd(10). \n;
 echo unixtojd(1152459009). \n;


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



[PHP-CVS] com php-src: Fix bug ext\filter\tests\bug52209.phpt fails: ext/filter/tests/bug52209.phpt

2012-04-30 Thread Anatoliy Belsky
Commit:8249581a2df0c2546721f6a55e58ba9d5e72653b
Author:Anatoliy Belsky a...@php.net Mon, 30 Apr 2012 10:25:54 
+0200
Parents:   a601605f14ce12977b2d3771fd19421ad2aa2f47
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8249581a2df0c2546721f6a55e58ba9d5e72653b

Log:
Fix bug ext\filter\tests\bug52209.phpt fails

Bugs:
https://bugs.php.net/52209

Changed paths:
  M  ext/filter/tests/bug52209.phpt


Diff:
diff --git a/ext/filter/tests/bug52209.phpt b/ext/filter/tests/bug52209.phpt
index bf2ed6c..79db749 100644
--- a/ext/filter/tests/bug52209.phpt
+++ b/ext/filter/tests/bug52209.phpt
@@ -1,7 +1,13 @@
 --TEST--
 Bug #52209 (INPUT_ENV returns NULL for set variables (CLI))
 --SKIPIF--
-?php if (!extension_loaded(filter) || !empty($_ENV['PWD'])) die(skip); ?
+?php
+/* This test makes no sense on windows as an empty variable 
+   would never show up in the set list. Which means, it's 
+   always undefined in PHP. */
+if(substr(PHP_OS, 0, 3) == WIN) die(skip Not for Windows);
+if (!extension_loaded(filter) || !empty($_ENV['PWD'])) die(skip);
+?
 --INI--
 variables_order=GPCSE
 --FILE--


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



[PHP-CVS] com php-src: Fix bug 61870 ext\session\tests\bug42596.phpt fails: ext/session/tests/bug42596.phpt

2012-04-30 Thread Anatoliy Belsky
Commit:680685127fc60fb1891effb7afb33639aa231502
Author:Anatoliy Belsky a...@php.net Mon, 30 Apr 2012 12:06:28 
+0200
Parents:   8249581a2df0c2546721f6a55e58ba9d5e72653b
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=680685127fc60fb1891effb7afb33639aa231502

Log:
Fix bug 61870 ext\session\tests\bug42596.phpt fails

Bugs:
https://bugs.php.net/61870
https://bugs.php.net/42596

Changed paths:
  M  ext/session/tests/bug42596.phpt


Diff:
diff --git a/ext/session/tests/bug42596.phpt b/ext/session/tests/bug42596.phpt
index fd9a602..3d11607 100644
--- a/ext/session/tests/bug42596.phpt
+++ b/ext/session/tests/bug42596.phpt
@@ -1,7 +1,10 @@
 --TEST--
 Bug #42596 (session.save_path MODE option will not set write bit for group 
or world)
 --SKIPIF--
-?php include('skipif.inc'); ?
+?php
+   if(substr(PHP_OS, 0, 3) == WIN) die(skip not for Windows);
+   include('skipif.inc');
+?
 --INI--
 session.use_cookies=0
 session.cache_limiter=


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



[PHP-CVS] com php-src: Additional fixs for bug 61746 - prepare/clean acls: ext/standard/tests/file/windows_acls/bug44859.phpt ext/standard/tests/file/windows_acls/bug44859_2.phpt ext/standard/tests/fi

2012-04-30 Thread Anatoliy Belsky
Commit:ec5421d04403ac3e7b013e65fdd7b3ad6fc82c18
Author:Anatoliy Belsky a...@php.net Mon, 30 Apr 2012 14:33:48 
+0200
Parents:   680685127fc60fb1891effb7afb33639aa231502
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ec5421d04403ac3e7b013e65fdd7b3ad6fc82c18

Log:
Additional fixs for bug 61746 - prepare/clean acls

Bugs:
https://bugs.php.net/61746

Changed paths:
  M  ext/standard/tests/file/windows_acls/bug44859.phpt
  M  ext/standard/tests/file/windows_acls/bug44859_2.phpt
  M  ext/standard/tests/file/windows_acls/bug44859_3.phpt
  M  ext/standard/tests/file/windows_acls/bug44859_4.phpt
  M  ext/standard/tests/file/windows_acls/common.inc


Diff:
diff --git a/ext/standard/tests/file/windows_acls/bug44859.phpt 
b/ext/standard/tests/file/windows_acls/bug44859.phpt
index bb22a5c..952b6eb 100644
--- a/ext/standard/tests/file/windows_acls/bug44859.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859.phpt
@@ -8,6 +8,7 @@ skipif();
 --FILE--
 ?php
 include_once __DIR__ . '/common.inc';
+fix_acls();
 
 $iteration = array(
PHPT_ACL_READ = false,
diff --git a/ext/standard/tests/file/windows_acls/bug44859_2.phpt 
b/ext/standard/tests/file/windows_acls/bug44859_2.phpt
index 3cc4ed1..d741156 100644
--- a/ext/standard/tests/file/windows_acls/bug44859_2.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859_2.phpt
@@ -8,6 +8,7 @@ skipif();
 --FILE--
 ?php
 include_once __DIR__ . '/common.inc';
+fix_acls();
 
 $iteration = array(
PHPT_ACL_READ = true,
diff --git a/ext/standard/tests/file/windows_acls/bug44859_3.phpt 
b/ext/standard/tests/file/windows_acls/bug44859_3.phpt
index 7300112..ed57abb 100644
--- a/ext/standard/tests/file/windows_acls/bug44859_3.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859_3.phpt
@@ -8,6 +8,7 @@ skipif();
 --FILE--
 ?php
 include_once __DIR__ . '/common.inc';
+fix_acls();
 
 $iteration = array(
'tiny.exe' = true,
diff --git a/ext/standard/tests/file/windows_acls/bug44859_4.phpt 
b/ext/standard/tests/file/windows_acls/bug44859_4.phpt
index c1768d0..954c100 100644
--- a/ext/standard/tests/file/windows_acls/bug44859_4.phpt
+++ b/ext/standard/tests/file/windows_acls/bug44859_4.phpt
@@ -10,6 +10,7 @@ skipif();
 --FILE--
 ?php
 include_once __DIR__ . '/common.inc';
+fix_acls();
 
 $iteration = array(
PHPT_ACL_READ = true,
diff --git a/ext/standard/tests/file/windows_acls/common.inc 
b/ext/standard/tests/file/windows_acls/common.inc
index 4007ad0..26fadf3 100644
--- a/ext/standard/tests/file/windows_acls/common.inc
+++ b/ext/standard/tests/file/windows_acls/common.inc
@@ -46,6 +46,16 @@ function get_icacls()
return $sysroot\\System32\\icacls.exe;
 }
 
+function fix_acls() {
+   $user = get_username();
+   /* Current user needs to be owner of the test files. As well
+  all the other users having acls on the files must loose them.
+  The following fixes this just partially, as dynamically reading
+  all the users having acls on a file could be sophisticated. */
+   exec(get_icacls() . ' . /setowner $user /T /L /Q 2 nul');
+   exec(get_icacls() . ' . /remove:g Administrators /T /L /Q 2 nul');
+}
+
 function icacls_set($path, $mode, $perm) {
$icacls = get_icacls();
$user = get_username();


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



[PHP-CVS] com php-src: Fix bug 61868 ext\dom\tests\DOMDocument_validate_on_parse_variation.phpt fails: ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt ext/dom/tests/note.dtd ext/dom/tests/n

2012-04-30 Thread Anatoliy Belsky
Commit:d26e006d7f01db6fab3942ebbf073beaabf57e2d
Author:Anatoliy Belsky a...@php.net Mon, 30 Apr 2012 17:23:49 
+0200
Parents:   ec5421d04403ac3e7b013e65fdd7b3ad6fc82c18
Branches:  PHP-5.3 PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d26e006d7f01db6fab3942ebbf073beaabf57e2d

Log:
Fix bug 61868 ext\dom\tests\DOMDocument_validate_on_parse_variation.phpt fails

Bugs:
https://bugs.php.net/61868

Changed paths:
  M  ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
  A  ext/dom/tests/note.dtd
  A  ext/dom/tests/note.xml


Diff:
diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt 
b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
index 403e01a..d0cea29 100644
--- a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
+++ b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
@@ -12,7 +12,7 @@ require_once('skipif.inc');
 
 require_once('dom_test.inc');
 
-chdir(__DIR__ . /../examples);
+chdir(__DIR__);
 $XMLStringGood = file_get_contents('note.xml');
 
 $dom = new DOMDocument;
diff --git a/ext/dom/tests/note.dtd b/ext/dom/tests/note.dtd
new file mode 100644
index 000..c2d558e
--- /dev/null
+++ b/ext/dom/tests/note.dtd
@@ -0,0 +1,6 @@
+?xml version=1.0 encoding=utf-8 ?
+!ELEMENT note (to,from,heading,body)
+!ELEMENT to (#PCDATA)
+!ELEMENT from (#PCDATA)
+!ELEMENT heading (#PCDATA)
+!ELEMENT body (#PCDATA)
diff --git a/ext/dom/tests/note.xml b/ext/dom/tests/note.xml
new file mode 100644
index 000..49614a1
--- /dev/null
+++ b/ext/dom/tests/note.xml
@@ -0,0 +1,8 @@
+?xml version=1.0?
+!DOCTYPE note SYSTEM note.dtd
+note
+toPHP User Group/to
+fromShane/from
+headingReminder/heading
+bodyDon't forget the meeting tonight!/body
+/note


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



[PHP-CVS] com php-src: Fix bug 61902 ext\phar\tests\phar_setsignaturealgo2.phpt falis: ext/phar/tests/files/openssl.cnf ext/phar/tests/phar_setsignaturealgo2.phpt

2012-05-02 Thread Anatoliy Belsky
Commit:69ed09a31c6ebb07c85013d1fab33b48efb438e1
Author:Anatoliy Belsky a...@php.net Wed, 2 May 2012 21:38:32 +0200
Parents:   b42d000471a1da27626d4fecb538069409ed61fd
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=69ed09a31c6ebb07c85013d1fab33b48efb438e1

Log:
Fix bug 61902 ext\phar\tests\phar_setsignaturealgo2.phpt falis

openssl needs explicit openssl.cnf on windows

Bugs:
https://bugs.php.net/61902

Changed paths:
  A  ext/phar/tests/files/openssl.cnf
  M  ext/phar/tests/phar_setsignaturealgo2.phpt


Diff:
diff --git a/ext/phar/tests/files/openssl.cnf b/ext/phar/tests/files/openssl.cnf
new file mode 100644
index 000..10e6907
--- /dev/null
+++ b/ext/phar/tests/files/openssl.cnf
@@ -0,0 +1,43 @@
+[ req ]
+default_bits   = 1024
+default_keyfile= privkey.pem
+distinguished_name = req_distinguished_name
+attributes = req_attributes
+x509_extensions= v3_ca # The extentions to add to the self signed cert
+string_mask = MASK:4294967295
+
+
+[ req_distinguished_name ]
+countryName= Country Name (2 letter code)
+countryName_default= AU
+countryName_min= 2
+countryName_max= 2
+stateOrProvinceName= State or Province Name (full name)
+stateOrProvinceName_default= Some-State
+localityName   = Locality Name (eg, city)
+0.organizationName = Organization Name (eg, company)
+0.organizationName_default = Internet Widgits Pty Ltd
+organizationalUnitName = Organizational Unit Name (eg, section)
+commonName = Common Name (eg, YOUR name)
+commonName_max = 64
+emailAddress   = Email Address
+emailAddress_max   = 64
+
+[ req_attributes ]
+challengePassword  = A challenge password
+challengePassword_min  = 4
+challengePassword_max  = 20
+unstructuredName   = An optional company name
+
+[ v3_req ]
+basicConstraints = CA:FALSE
+keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+[ v3_ca ]
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid:always,issuer:always
+basicConstraints = CA:true
+
+[ usr_cert ]
+basicConstraints=CA:FALSE
+
diff --git a/ext/phar/tests/phar_setsignaturealgo2.phpt 
b/ext/phar/tests/phar_setsignaturealgo2.phpt
index 66edb61..9f548d0 100644
--- a/ext/phar/tests/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/phar_setsignaturealgo2.phpt
@@ -34,9 +34,11 @@ var_dump($p-getSignature());
 echo $e-getMessage();
 }
 try {
+$config = dirname(__FILE__) . '/files/openssl.cnf';
+$config_arg = array('config' = $config);
 $private = openssl_get_privatekey(file_get_contents(dirname(__FILE__) . 
'/files/private.pem'));
 $pkey = '';
-openssl_pkey_export($private, $pkey);
+openssl_pkey_export($private, $pkey, NULL, $config_arg);
 $p-setSignatureAlgorithm(Phar::OPENSSL, $pkey);
 var_dump($p-getSignature());
 } catch (Exception $e) {


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



[PHP-CVS] com php-src: Fix bug #61904 ext\phar\tests\tar\phar_setsignaturealgo2.phpt: ext/phar/tests/tar/phar_setsignaturealgo2.phpt

2012-05-04 Thread Anatoliy Belsky
Commit:6c12252790cdd75bd79335013badc657fd78af1a
Author:Anatoliy Belsky a...@php.net Fri, 4 May 2012 11:29:49 +0200
Parents:   0956c00af999c295c5a13644ec835da8f96ad48d
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=6c12252790cdd75bd79335013badc657fd78af1a

Log:
Fix bug #61904 ext\phar\tests\tar\phar_setsignaturealgo2.phpt

Bugs:
https://bugs.php.net/61904

Changed paths:
  M  ext/phar/tests/tar/phar_setsignaturealgo2.phpt


Diff:
diff --git a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt 
b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
index 422ca90..c16e752 100644
--- a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
@@ -32,9 +32,11 @@ var_dump($p-getSignature());
 echo $e-getMessage();
 }
 try {
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' = $config);
 $private = openssl_get_privatekey(file_get_contents(dirname(dirname(__FILE__)) 
. '/files/private.pem'));
 $pkey = '';
-openssl_pkey_export($private, $pkey);
+openssl_pkey_export($private, $pkey, NULL, $config_arg);
 $p-setSignatureAlgorithm(Phar::OPENSSL, $pkey);
 var_dump($p-getSignature());
 } catch (Exception $e) {


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



[PHP-CVS] com php-src: Fix bug #61906 ext\phar\tests\zip\phar_setsignaturealgo2.phpt fails: ext/phar/tests/zip/phar_setsignaturealgo2.phpt

2012-05-04 Thread Anatoliy Belsky
Commit:8a10259642f05b11f5fefa1399605a08957f5e59
Author:Anatoliy Belsky a...@php.net Fri, 4 May 2012 11:40:49 +0200
Parents:   6c12252790cdd75bd79335013badc657fd78af1a
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8a10259642f05b11f5fefa1399605a08957f5e59

Log:
Fix bug #61906 ext\phar\tests\zip\phar_setsignaturealgo2.phpt fails

Bugs:
https://bugs.php.net/61906

Changed paths:
  M  ext/phar/tests/zip/phar_setsignaturealgo2.phpt


Diff:
diff --git a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt 
b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
index 372f7dd..7d3730c 100644
--- a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
+++ b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
@@ -49,8 +49,10 @@ var_dump($p-getSignature());
 echo $e-getMessage();
 }
 try {
-$keys=openssl_pkey_new();
-openssl_pkey_export($keys, $privkey);
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' = $config);
+$keys=openssl_pkey_new($config_arg);
+openssl_pkey_export($keys, $privkey, NULL, $config_arg);
 $pubkey=openssl_pkey_get_details($keys);
 $p-setSignatureAlgorithm(Phar::OPENSSL, $privkey);


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



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Anatoliy Belsky
Hi Chris,

please see my comment in the #61940.

Regards

Anatoliy

Am Fr, 4.05.2012, 19:16 schrieb Christopher Jones:


 On 03/28/2012 03:06 AM, Anatoliy Belsky wrote:
 Commit:11f04c3524cc86a5c4cdf748a107801116604184
 Author:Anatoliy Belskya...@php.net  Wed, 28 Mar 2012
 12:06:09 +0200
 Parents:   e7fa402c7ccbff8a6ff8af776192416747db0d77
 Branches:  PHP-5.3 PHP-5.4 master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=11f04c3524cc86a5c4cdf748a107801116604184

 Log:
 Bug 61504 updated libmagic.patch

 Bugs:
 https://bugs.php.net/61504

 Changed paths:
M  ext/fileinfo/libmagic.patch





 Anatoliy, Pierre,

 Can you review https://bugs.php.net/bug.php?id=61940 which claims the fix
 for 61504 broke it.

 Thanks,

 Chris

 --
 christopher.jo...@oracle.com
 http://twitter.com/#!/ghrd




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



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Anatoliy Belsky

Sean, thanks for reporting that :)

Chris, theoretically there were a possibility to apply the patch for 5.04 which 
was made first (it's attached in #61504) ... but I wouldn't call that quite 
rational. As Sean mentioned, it's already done. For the current patch 5.11 
tests was fixed, some fixes was done over it, and it's released. Besides this, 
patching for 7 versions forwards wasn't that easy, so the longer it's waiting, 
the worst it gets. Therefore I'd really suggest here to document this and to 
make the warnings more meaningful.

Hannes, I agree here even more than you :) . But, that was a security 
conditioned upgrade. The patch for 5.04 has existed shortly before the patch 
5.11, but finally the 5.11 one was considered as better. The notices come 
directly from libmagic, so no wonder some of them are not handled properly (and 
they were not before). The development was concentrated more on the usage with 
the compiled in data (as use of the externals is rare), so I think at the end 
of he day a security fix is worth it.

Thanks for the help guys and regards

Anatoliy

On Fri, 04 May 2012 15:02:21 -0700
Christopher Jones christopher.jo...@oracle.com wrote:

 
 
 On 05/04/2012 02:22 PM, Anatoliy Belsky wrote:
  Hi Chris,
 
  that's not documented on the php.net yet.
 
  I think shortening that notice is a good idea. Probably it should just
  stop on the first fail and warn about the incompatibility.
 
  Cheers
 
  Anatoliy
 
 
 Hi Anatoliy,
 
 What are the options for reverting this fix (while keeping security)?
 
 Do you have an action item to document it the change?
 (https://edit.php.net/ is a convenient way to update doc)
 
 Chris
 
 -- 
 christopher.jo...@oracle.com
 http://twitter.com/#!/ghrd


-- 
Anatoliy Belsky a...@php.net

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



Re: [PHP-CVS] com php-src: Bug 61504 updated libmagic.patch: ext/fileinfo/libmagic.patch

2012-05-04 Thread Anatoliy Belsky
Chris,

it's already in the news

http://git.php.net/?p=php-src.git;a=blob;f=NEWS;h=d26ffea8ab357a44e37044193c8b316dfaa61662;hb=704bbb3263d0ec9a6b4a767bbc516e55388f4b0e

Regards

Anatoliy

On Fri, 04 May 2012 15:19:31 -0700
Christopher Jones christopher.jo...@oracle.com wrote:

 
 
 On 05/04/2012 03:10 PM, Sean Coates wrote:
  What are the options for reverting this fix (while keeping security)?
 
  Thanks for the help on this, Anatoliy and Chris.
 
  In my opinion, it is too late to revert the new behaviour.
 
  This really should never have gone into .11 in the first place. The damage 
  is done; let's not make it worse.
 
 
 Anatoliy,
 
 Do you recall why bug 61504 isn't in NEWS?  Can you make sure some kind of 
 entry in
 NEWS mentions the change?
 
 Thanks,
 
 Chris
 
 -- 
 christopher.jo...@oracle.com
 http://twitter.com/#!/ghrd


-- 
Anatoliy Belsky a...@php.net

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



[PHP-CVS] com php-src: Fix bug 61769 Random failure of php_cli_server*phpt tests: sapi/cli/tests/php_cli_server.inc sapi/cli/tests/php_cli_server_014.phpt

2012-05-06 Thread Anatoliy Belsky
Commit:87a011d3723aa9500e12a3f982df6b1f5cdfaedd
Author:Matt Ficken mattfic...@php.net Sun, 6 May 2012 18:05:02 
+0200
Committer: Anatoliy Belsky a...@php.net  Sun, 6 May 2012 18:05:02 +0200
Parents:   ad3a42c26c185d47aee8e69aad255c8824af4ded
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=87a011d3723aa9500e12a3f982df6b1f5cdfaedd

Log:
Fix bug 61769 Random failure of php_cli_server*phpt tests

Bugs:
https://bugs.php.net/61769

Changed paths:
  M  sapi/cli/tests/php_cli_server.inc
  M  sapi/cli/tests/php_cli_server_014.phpt


Diff:
diff --git a/sapi/cli/tests/php_cli_server.inc 
b/sapi/cli/tests/php_cli_server.inc
index 44ee76e..d24a679 100644
--- a/sapi/cli/tests/php_cli_server.inc
+++ b/sapi/cli/tests/php_cli_server.inc
@@ -1,5 +1,7 @@
 ?php
-define (PHP_CLI_SERVER_ADDRESS, localhost:8964);
+define (PHP_CLI_SERVER_HOSTNAME, localhost);
+define (PHP_CLI_SERVER_PORT, 8964);
+define (PHP_CLI_SERVER_ADDRESS, 
PHP_CLI_SERVER_HOSTNAME.:.PHP_CLI_SERVER_PORT);
 
 function php_cli_server_start($code = 'echo Hello world;', $no_router = 
FALSE) {
$php_executable = getenv('TEST_PHP_EXECUTABLE');
@@ -32,6 +34,19 @@ function php_cli_server_start($code = 'echo Hello world;', 
$no_router = FALSE)
 
$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}
+   
+   // note: even when server prints 'Listening on localhost:8964...Press 
Ctrl-C to quit.'
+   //   it might not be listening yet...need to wait until fsockopen() 
call returns
+   $fp = fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT);
+   if ($fp) {
+   // server will report Unexpected EOF error (socket opened, 
closed without writing
+   // anything) but that can be ignored
+   fclose($fp);
+   } else {
+   // test will fail to connect if server doesn't start 
listening/accepting
+   // in the next few microseconds
+   }
+
 
register_shutdown_function(
function($handle) use($router) {
@@ -40,7 +55,11 @@ function php_cli_server_start($code = 'echo Hello world;', 
$no_router = FALSE)
},
$handle
);
-   usleep(5);
+   // don't bother sleeping, server is already up
+   //usleep(5);
+   // server can take a variable amount of time to be up, so just sleeping 
a guessed amount of time
+   // does not work. this is why tests sometimes pass and sometimes fail. 
to get a reliable pass
+   // sleeping doesn't work.
 }
 ?
 
diff --git a/sapi/cli/tests/php_cli_server_014.phpt 
b/sapi/cli/tests/php_cli_server_014.phpt
index 4b56caa..2eca870 100644
--- a/sapi/cli/tests/php_cli_server_014.phpt
+++ b/sapi/cli/tests/php_cli_server_014.phpt
@@ -13,6 +13,10 @@ list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
 $port = intval($port)?:80;
 $output = '';
 
+// note: select() on Windows ( some other platforms) has historical issues 
with
+//   timeouts less than 1000 millis(0.5). it may be better to increase 
these
+//   timeouts to 1000 millis(1.0) (fsockopen eventually calls select()).
+//   see articles like: http://support.microsoft.com/kb/257821
 $fp = fsockopen($host, $port, $errno, $errstr, 0.5);
 if (!$fp) {
   die(connect failed);


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



[PHP-CVS] com php-src: Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails: ext/phar/tests/tar/phar_commitwrite.phpt

2012-05-07 Thread Anatoliy Belsky
Commit:ce59121c5f3f67f570f462e93354de0cff1bd31a
Author:Anatoliy Belsky a...@php.net Mon, 7 May 2012 15:37:29 +0200
Parents:   99076bc24fae6b159c783e4772b0eaf046b5dc2e
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ce59121c5f3f67f570f462e93354de0cff1bd31a

Log:
Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails

Bugs:
https://bugs.php.net/61903

Changed paths:
  M  ext/phar/tests/tar/phar_commitwrite.phpt


Diff:
diff --git a/ext/phar/tests/tar/phar_commitwrite.phpt 
b/ext/phar/tests/tar/phar_commitwrite.phpt
index b926b9a..262ea1d 100644
--- a/ext/phar/tests/tar/phar_commitwrite.phpt
+++ b/ext/phar/tests/tar/phar_commitwrite.phpt
@@ -5,6 +5,9 @@ Phar::setStub()/stopBuffering() tar-based
 --INI--
 phar.require_hash=0
 phar.readonly=0
+--ENV--
+TEMP=.
+TMP=.
 --FILE--
 ?php
 $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.tar', 0, 
'brandnewphar.phar');
@@ -41,4 +44,4 @@ include 'phar://brandnewphar.phar/startup.php';
 __HALT_COMPILER(); ?
 
 bool(true)
-===DONE===
\ No newline at end of file
+===DONE===


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



[PHP-CVS] com php-src: Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails: ext/phar/tests/zip/phar_commitwrite.phpt

2012-05-07 Thread Anatoliy Belsky
Commit:2068419ae5c24781714e9d60c4baf64d254d573d
Author:Anatoliy Belsky a...@php.net Mon, 7 May 2012 15:39:07 +0200
Parents:   ce59121c5f3f67f570f462e93354de0cff1bd31a
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2068419ae5c24781714e9d60c4baf64d254d573d

Log:
Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails

Bugs:
https://bugs.php.net/61905

Changed paths:
  M  ext/phar/tests/zip/phar_commitwrite.phpt


Diff:
diff --git a/ext/phar/tests/zip/phar_commitwrite.phpt 
b/ext/phar/tests/zip/phar_commitwrite.phpt
index 84bccb9..4e18a6b 100644
--- a/ext/phar/tests/zip/phar_commitwrite.phpt
+++ b/ext/phar/tests/zip/phar_commitwrite.phpt
@@ -5,6 +5,9 @@ Phar::setStub()/stopBuffering() zip-based
 --INI--
 phar.require_hash=0
 phar.readonly=0
+--ENV--
+TEMP=.
+TMP=.
 --FILE--
 ?php
 $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.zip', 0, 
'brandnewphar.phar');
@@ -41,4 +44,4 @@ include 'phar://brandnewphar.phar/startup.php';
 __HALT_COMPILER(); ?
 
 bool(true)
-===DONE===
\ No newline at end of file
+===DONE===


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



[PHP-CVS] com php-src: Fix bug #61713 ext\standard\tests\strings\htmlentities10.phpt fails: ext/standard/html.c

2012-05-08 Thread Anatoliy Belsky
Commit:3a4a25358fe3f389c434f68e59bfd70b25b93b29
Author:Anatoliy Belsky a...@php.net Tue, 8 May 2012 17:42:01 +0200
Parents:   e120a0c7f30953774d3ff2ac1a14b2ab623a047c
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=3a4a25358fe3f389c434f68e59bfd70b25b93b29

Log:
Fix bug #61713 ext\standard\tests\strings\htmlentities10.phpt fails

There is a logic error in charset detection part for htmlentities.
When mbstring is compiled shared and mbstring.internal_encoding
is set to pass, it prevents default_charset from being checked
resulting iso-8859-1 being choosed.

Bugs:
https://bugs.php.net/61713

Changed paths:
  M  ext/standard/html.c


Diff:
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 81c69de..c813af5 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -793,8 +793,11 @@ static enum entity_charset determine_charset(char 
*charset_hint TSRMLS_DC)
charset_hint = NULL;
len = 0;
}
+   } else {
+   /* Jump to det_charset only if mbstring isn't 
one of above eq pass, auto, none.
+  Otherwise try default_charset next */
+   goto det_charset;
}
-   goto det_charset;
}
}
 #endif


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



[PHP-CVS] com php-src: Fix bug 61713 check also that mbstring's found any internal_encoding: ext/standard/html.c

2012-05-08 Thread Anatoliy Belsky
Commit:d776a933eb270c7aa094c937168966fa89e2fa5c
Author:Anatoliy Belsky a...@php.net Tue, 8 May 2012 18:31:11 +0200
Parents:   3a4a25358fe3f389c434f68e59bfd70b25b93b29
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d776a933eb270c7aa094c937168966fa89e2fa5c

Log:
Fix bug 61713 check also that mbstring's found any internal_encoding

Bugs:
https://bugs.php.net/61713

Changed paths:
  M  ext/standard/html.c


Diff:
diff --git a/ext/standard/html.c b/ext/standard/html.c
index c813af5..058708e 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -785,18 +785,20 @@ static enum entity_charset determine_charset(char 
*charset_hint TSRMLS_DC)
charset_hint = Z_STRVAL_P(uf_result);
len = Z_STRLEN_P(uf_result);

-   if (len == 4) { /* sizeof(none|auto|pass)-1 */
-   if (!memcmp(pass, charset_hint, 
sizeof(pass) - 1) || 
-   !memcmp(auto, charset_hint, 
sizeof(auto) - 1) || 
-   !memcmp(none, charset_hint, 
sizeof(none) - 1)) {
-   
-   charset_hint = NULL;
-   len = 0;
+   if (charset_hint != NULL  len != 0) {
+   if (len == 4) { /* sizeof(none|auto|pass)-1 */
+   if (!memcmp(pass, charset_hint, 
sizeof(pass) - 1) ||
+   !memcmp(auto, charset_hint, 
sizeof(auto) - 1) ||
+   !memcmp(none, charset_hint, 
sizeof(none) - 1)) {
+
+   charset_hint = NULL;
+   len = 0;
+   }
+   } else {
+   /* Jump to det_charset only if mbstring 
isn't one of above eq pass, auto, none.
+  Otherwise try default_charset next */
+   goto det_charset;
}
-   } else {
-   /* Jump to det_charset only if mbstring isn't 
one of above eq pass, auto, none.
-  Otherwise try default_charset next */
-   goto det_charset;
}
}
}


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



[PHP-CVS] com php-src: updated NEWS: NEWS

2012-05-08 Thread Anatoliy Belsky
Commit:838b4b8ff7d78dfb0da99e0b17568558a85a1c2a
Author:Anatoliy Belsky a...@php.net Tue, 8 May 2012 18:51:49 +0200
Parents:   d776a933eb270c7aa094c937168966fa89e2fa5c
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=838b4b8ff7d78dfb0da99e0b17568558a85a1c2a

Log:
updated NEWS

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index c354b39..bd194be 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ PHP   
 NEWS
   . Fixed bug #61764 ('I' unpacks n as signed if n  2^31-1 on LP64). (Gustavo)
   . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
 set to null). (Anatoliy)
+  . Fixed bug #61713 (Logic error in charset detection for htmlentities).
+(Anatoliy)
 
 - Fileinfo:
   . Fixed bug #61812 (Uninitialised value used in libmagic).


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



[PHP-CVS] com php-src: Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*: ext/standard/tests/file/windows_links/bug48746.phpt ext/standard/tests/file/windows_links/bug48746_1.phpt

2012-05-08 Thread Anatoliy Belsky
Commit:c12fdbde5fe1da3f5ddd3be70a807b46755ff118
Author:Matt Ficken mattfic...@php.net Tue, 8 May 2012 19:31:41 
+0200
Committer: Anatoliy Belsky a...@php.net  Tue, 8 May 2012 19:31:41 +0200
Parents:   838b4b8ff7d78dfb0da99e0b17568558a85a1c2a
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c12fdbde5fe1da3f5ddd3be70a807b46755ff118

Log:
Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*

Fixed that again for systems having their %SYSTEMROOT% not in
c:\windows

Bugs:
https://bugs.php.net/61746

Changed paths:
  M  ext/standard/tests/file/windows_links/bug48746.phpt
  M  ext/standard/tests/file/windows_links/bug48746_1.phpt
  M  ext/standard/tests/file/windows_links/bug48746_2.phpt
  M  ext/standard/tests/file/windows_links/bug48746_3.phpt
  A  ext/standard/tests/file/windows_links/common.inc


Diff:
diff --git a/ext/standard/tests/file/windows_links/bug48746.phpt 
b/ext/standard/tests/file/windows_links/bug48746.phpt
index a47b7cb..55465ae 100644
--- a/ext/standard/tests/file/windows_links/bug48746.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746.phpt
@@ -9,7 +9,8 @@ Venkat Raman Don (don.ra...@microsoft.com)
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
 die('skip windows only test');
 }
-$cmd = mklink.exe /?;
+include_once __DIR__ . '/common.inc';
+$cmd = mklink /?;
 $ret = @exec($cmd, $output, $return_val);
 if (count($output) == 0) {
 die(mklink.exe not found in PATH);
@@ -17,7 +18,8 @@ if (count($output) == 0) {
 ?
 --FILE--
 ?php
-$mountvol = c:\\Windows\\System32\\mountvol.exe;
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
 $old_dir = __DIR__;
 $dirname = __DIR__ . \\mnt\\test\\directory;
 mkdir($dirname, 0700, true);
diff --git a/ext/standard/tests/file/windows_links/bug48746_1.phpt 
b/ext/standard/tests/file/windows_links/bug48746_1.phpt
index 716c656..5d8e685 100644
--- a/ext/standard/tests/file/windows_links/bug48746_1.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_1.phpt
@@ -9,7 +9,8 @@ Venkat Raman Don (don.ra...@microsoft.com)
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
 die('skip windows only test');
 }
-$cmd = mklink.exe /?;
+include_once __DIR__ . '/common.inc';
+$cmd = mklink /?;
 $ret = @exec($cmd, $output, $return_val);
 if (count($output) == 0) {
 die(mklink.exe not found in PATH);
@@ -17,7 +18,8 @@ if (count($output) == 0) {
 ?
 --FILE--
 ?php
-$mountvol = c:\\Windows\\System32\\mountvol.exe;
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
 $old_dir = __DIR__;
 $dirname = __DIR__ . \\mnt\\test\\directory;
 exec(mkdir  . $dirname, $output, $ret_val);
@@ -54,4 +56,4 @@ I am included.
 I am included.
 bool(true)
 bool(true)
-bool(true)
+bool(true)
diff --git a/ext/standard/tests/file/windows_links/bug48746_2.phpt 
b/ext/standard/tests/file/windows_links/bug48746_2.phpt
index 637152c..56924a5 100644
--- a/ext/standard/tests/file/windows_links/bug48746_2.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_2.phpt
@@ -9,15 +9,17 @@ Venkat Raman Don (don.ra...@microsoft.com)
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
 die('skip windows only test');
 }
+include_once __DIR__ . '/common.inc';
 $ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 21', $out);
 if (strpos($ret, 'privilege')) {
die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
 }
-unlink('mklink bug48746_tmp.lnk');
+unlink('bug48746_tmp.lnk');
 ?
 --FILE--
 ?php
-$mountvol = c:\\Windows\\System32\\mountvol.exe;
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
 $old_dir = __DIR__;
 $dirname = __DIR__ . \\mnt\\test\\directory;
 exec(mkdir  . $dirname, $output, $ret_val);
@@ -64,4 +66,4 @@ Array
 [1] = ..
 [2] = a.php
 [3] = b.php
-)
+)
diff --git a/ext/standard/tests/file/windows_links/bug48746_3.phpt 
b/ext/standard/tests/file/windows_links/bug48746_3.phpt
index a0dcbdc..b88ab76 100644
--- a/ext/standard/tests/file/windows_links/bug48746_3.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_3.phpt
@@ -9,7 +9,8 @@ Venkat Raman Don (don.ra...@microsoft.com)
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
 }
-$ret = exec('junction /? 21', $out);
+include_once __DIR__ . '/common.inc';
+$ret = exec(get_junction().' /? 21', $out);
 if (strpos($out[0], 'recognized')) {
die('skip. junction.exe not found in PATH.');
 }
@@ -17,11 +18,12 @@ if (strpos($out[0], 'recognized')) {
 ?
 --FILE--
 ?php
+include_once __DIR__ . '/common.inc';
 $old_dir = __DIR__;
 $dirname = __DIR__ . \\mnt\\test\\directory;
 exec(mkdir  . $dirname, $output, $ret_val);
 chdir(__DIR__ . \\mnt\\test);
-exec(junction junction directory, $output, $ret_val);
+exec(get_junction(). junction directory, $output, $ret_val);
 file_put_contents(junction\\a.php, ?php echo \I am included.\n\ ?);
 file_put_contents(junction\\b.php, ?php echo \I am included.\n\ ?);
 include junction/a.php;
@@ -45,4 +47,4 @@ Array
 [1

  1   2   3   >