[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/streamsfuncs.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/streamsfuncs.c trunk/ext/standard/streamsfuncs.c

2009-08-03 Thread Antony Dovgal
tony2001 Mon, 03 Aug 2009 08:45:28 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286719

Log:
revert bogus memleak fix causing Valgrind to scream

Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
U   php/php-src/trunk/ext/standard/streamsfuncs.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-08-03 07:30:49 UTC (rev 286718)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-08-03 08:45:28 UTC (rev 286719)
@@ -3,7 +3,6 @@
 ?? ??? 2009, PHP 5.2.11
 - Fixed regression in cURL extension that prevented flush of data to output
   defined as a file handle. (Ilia)
-- Fixed memory leak in stream_is_local(). (Felipe)

 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)

Modified: php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
07:30:49 UTC (rev 286718)
+++ php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
08:45:28 UTC (rev 286719)
@@ -1399,7 +1399,6 @@
} else {
convert_to_string_ex(zstream);
wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), 
NULL, 0 TSRMLS_CC);
-   zval_ptr_dtor(zstream);
}

if(!wrapper) {

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-03 07:30:49 UTC (rev 286718)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-03 08:45:28 UTC (rev 286719)
@@ -6,7 +6,6 @@
 - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz,
   Stas)
 - Fixed signature generation/validation for zip archives in ext/phar. (Greg)
-- Fixed memory leak in stream_is_local(). (Felipe)

 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)

Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
07:30:49 UTC (rev 286718)
+++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
08:45:28 UTC (rev 286719)
@@ -1465,7 +1465,6 @@
} else {
convert_to_string_ex(zstream);
wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), 
NULL, 0 TSRMLS_CC);
-   zval_ptr_dtor(zstream);
}

if(!wrapper) {

Modified: php/php-src/trunk/ext/standard/streamsfuncs.c
===
--- php/php-src/trunk/ext/standard/streamsfuncs.c   2009-08-03 07:30:49 UTC 
(rev 286718)
+++ php/php-src/trunk/ext/standard/streamsfuncs.c   2009-08-03 08:45:28 UTC 
(rev 286719)
@@ -1752,7 +1752,6 @@
} else {
convert_to_string_ex(zstream);
wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), 
NULL, 0 TSRMLS_CC);
-   zval_ptr_dtor(zstream);
}

if(!wrapper) {

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

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/date/tests/ bug48058.phpt

2009-08-03 Thread Derick Rethans
On Sun, 2 Aug 2009, Rasmus Lerdorf wrote:

 rasmus   Sun, 02 Aug 2009 22:37:07 +
 
 Revision: http://svn.php.net/viewvc?view=revisionrevision=286707
 
 Log:
 Fix test on 32-bit

I'd rather see we had a test for both platforms instead of making this 
one vague...

regards,
Derick


 
 Changed paths:
 U   php/php-src/branches/PHP_5_3/ext/date/tests/bug48058.phpt
 
 Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug48058.phpt
 ===
 --- php/php-src/branches/PHP_5_3/ext/date/tests/bug48058.phpt 2009-08-02 
 22:31:19 UTC (rev 286706)
 +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug48058.phpt 2009-08-02 
 22:37:07 UTC (rev 286707)
 @@ -13,12 +13,12 @@
  $dt = date_create( $base_time +100 years );
  echo date_format( $dt, DATE_ISO8601 );
  ?
 ---EXPECT--
 +--EXPECTF--
  array(5) {
[ts]=
 -  int(-9223372036854775808)
 +  int(-%d)
[time]=
 -  string(33) -292277022657-01-27T08:29:52+
 +  string(%d) %s
[offset]=
int(3600)
[isdst]=
 
 

-- 
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
twitter: @derickr

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



[PHP-CVS] svn: /php/phpruntests/trunk/tests/configuration/ rtExternalToolTest.php rtMemoryToolTest.php

2009-08-03 Thread Zoe Slattery
zoe  Mon, 03 Aug 2009 09:48:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286720

Log:
oops

Changed paths:
D   php/phpruntests/trunk/tests/configuration/rtExternalToolTest.php
A + php/phpruntests/trunk/tests/configuration/rtMemoryToolTest.php
(from 
php/phpruntests/trunk/tests/configuration/rtExternalToolTest.php:r286467)

Deleted: php/phpruntests/trunk/tests/configuration/rtExternalToolTest.php
===
--- php/phpruntests/trunk/tests/configuration/rtExternalToolTest.php
2009-08-03 08:45:28 UTC (rev 286719)
+++ php/phpruntests/trunk/tests/configuration/rtExternalToolTest.php
2009-08-03 09:48:53 UTC (rev 286720)
@@ -1,38 +0,0 @@
-?php
-require_once 'PHPUnit/Framework.php';
-require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
-
-class rtExternalToolTest extends PHPUnit_Framework_TestCase
-{
-
-
-public function testCreate()
-{
-
-$config = rtRuntestsConfiguration::getInstance(array('run-tests.php', 
'-m', 'test.phpt'));
-$this-externalTool = rtExternalTool::getInstance($config);
-$this-externalTool-checkAvailable($config);
-$this-externalTool-init($config);
-
-$string = substr($this-externalTool-getCommand(), 0, 48);
-
-$this-assertEquals('valgrind -q --tool=memcheck 
--trace-children=yes', $string);
-
-}
-
-public function testCreate2()
-{
-
-$config = rtRuntestsConfiguration::getInstance(array('run-tests.php', 
'-m', '--mopts', 'blah blah', 'test.phpt'));
-$this-externalTool = rtExternalTool::getInstance($config);
-$this-externalTool-checkAvailable($config);
-$this-externalTool-init($config);
-
-$string = substr($this-externalTool-getCommand(), 0, 58);
-$this-assertEquals('valgrind -q --tool=memcheck --trace-children=yes 
blah blah', $string);
-
-}
-
-}
-?
-

Copied: php/phpruntests/trunk/tests/configuration/rtMemoryToolTest.php (from 
rev 286467, php/phpruntests/trunk/tests/configuration/rtExternalToolTest.php)
===
--- php/phpruntests/trunk/tests/configuration/rtMemoryToolTest.php  
(rev 0)
+++ php/phpruntests/trunk/tests/configuration/rtMemoryToolTest.php  
2009-08-03 09:48:53 UTC (rev 286720)
@@ -0,0 +1,38 @@
+?php
+require_once 'PHPUnit/Framework.php';
+require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+
+class rtMemoryToolTest extends PHPUnit_Framework_TestCase
+{
+
+
+public function testCreate()
+{
+
+$config = rtRuntestsConfiguration::getInstance(array('run-tests.php', 
'-m', 'test.phpt'));
+$this-memoryTool = rtMemoryTool::getInstance($config);
+$this-memoryTool-checkAvailable($config);
+$this-memoryTool-init($config);
+
+$string = substr($this-memoryTool-getCommand(), 0, 48);
+
+$this-assertEquals('valgrind -q --tool=memcheck 
--trace-children=yes', $string);
+
+}
+
+public function testCreate2()
+{
+
+$config = rtRuntestsConfiguration::getInstance(array('run-tests.php', 
'-m', '--mopts', 'blah blah', 'test.phpt'));
+$this-memoryTool = rtMemoryTool::getInstance($config);
+$this-memoryTool-checkAvailable($config);
+$this-memoryTool-init($config);
+
+$string = substr($this-memoryTool-getCommand(), 0, 58);
+$this-assertEquals('valgrind -q --tool=memcheck --trace-children=yes 
blah blah', $string);
+
+}
+
+}
+?
+

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

[PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c

2009-08-03 Thread Uwe Schindler
thetaphi Mon, 03 Aug 2009 10:12:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286721

Log:
Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX

Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 
on HPUX, #define HPUX
  
Changed paths:
U   php/php-src/trunk/sapi/nsapi/nsapi.c

Modified: php/php-src/trunk/sapi/nsapi/nsapi.c
===
--- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC (rev 
286720)
+++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC (rev 
286721)
@@ -57,6 +57,13 @@
 #endif

 /*
+ * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to 
detect HPUX
+ */
+#ifdef __hpux
+#define HPUX
+#endif
+
+/*
  * NSAPI includes
  */
 #include nsapi.h

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS sapi/nsapi/nsapi.c

2009-08-03 Thread Uwe Schindler
thetaphi Mon, 03 Aug 2009 10:13:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286722

Log:
MFH: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX

Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 
on HPUX, #define HPUX
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-03 10:12:30 UTC (rev 286721)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-03 10:13:49 UTC (rev 286722)
@@ -7,6 +7,8 @@
   Stas)
 - Fixed signature generation/validation for zip archives in ext/phar. (Greg)

+- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
+  (Uwe Schindler)
 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)
 - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)

Modified: php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c
===
--- php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c 2009-08-03 10:12:30 UTC 
(rev 286721)
+++ php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c 2009-08-03 10:13:49 UTC 
(rev 286722)
@@ -55,6 +55,13 @@
 #define XP_UNIX
 #endif
 #endif
+
+/*
+ * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to 
detect HPUX
+ */
+#ifdef __hpux
+#define HPUX
+#endif

 /*
  * NSAPI includes

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS sapi/nsapi/nsapi.c

2009-08-03 Thread Uwe Schindler
thetaphi Mon, 03 Aug 2009 10:14:20 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286723

Log:
MFH: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX

Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 
on HPUX, #define HPUX
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-08-03 10:13:49 UTC (rev 286722)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-08-03 10:14:20 UTC (rev 286723)
@@ -4,6 +4,8 @@
 - Fixed regression in cURL extension that prevented flush of data to output
   defined as a file handle. (Ilia)

+- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
+  (Uwe Schindler)
 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)
 - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)

Modified: php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c
===
--- php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c 2009-08-03 10:13:49 UTC 
(rev 286722)
+++ php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c 2009-08-03 10:14:20 UTC 
(rev 286723)
@@ -57,6 +57,13 @@
 #endif

 /*
+ * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to 
detect HPUX
+ */
+#ifdef __hpux
+#define HPUX
+#endif
+
+/*
  * NSAPI includes
  */
 #include nsapi.h

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/strings/htmlentities02.phpt branches/PHP_5_2/ext/standard/tests/strings/htmlentities04.phpt branches/PHP_5_2/ext/standard/tests/strings

2009-08-03 Thread Jani Taskinen
jani Mon, 03 Aug 2009 10:23:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286724

Log:
- These tests fail if mbstring is enabled, not because of bad libc..

Changed paths:
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities02.phpt
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities04.phpt
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities15.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities02.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities04.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities15.phpt
U   php/php-src/trunk/ext/standard/tests/strings/htmlentities02.phpt
U   php/php-src/trunk/ext/standard/tests/strings/htmlentities04.phpt
U   php/php-src/trunk/ext/standard/tests/strings/htmlentities15.phpt

Modified: 
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities02.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities02.phpt 
2009-08-03 10:14:20 UTC (rev 286723)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities02.phpt 
2009-08-03 10:23:23 UTC (rev 286724)
@@ -6,7 +6,6 @@
 if (!$result) {
die(skip setlocale() failed\n);
 }
-echo warn possibly braindead libc\n;
 ?
 --INI--
 output_handler=

Modified: 
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities04.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities04.phpt 
2009-08-03 10:14:20 UTC (rev 286723)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities04.phpt 
2009-08-03 10:23:23 UTC (rev 286724)
@@ -6,7 +6,6 @@
 if (!$result || preg_match('/EUC[^a-zA-Z]*JP/i', setlocale(LC_CTYPE, 0)) == 0) 
{
die(skip setlocale() failed\n);
 }
-echo warn possibly braindead libc\n;
 ?
 --INI--
 output_handler=

Modified: 
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities15.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities15.phpt 
2009-08-03 10:14:20 UTC (rev 286723)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities15.phpt 
2009-08-03 10:23:23 UTC (rev 286724)
@@ -10,7 +10,6 @@
 if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) {
die(skip setlocale() failed\n);
 }
-echo warn possibly braindead libc\n;
 ?
 --FILE--
 ?php

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities02.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities02.phpt 
2009-08-03 10:14:20 UTC (rev 286723)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities02.phpt 
2009-08-03 10:23:23 UTC (rev 286724)
@@ -6,7 +6,6 @@
 if (!$result) {
die(skip setlocale() failed\n);
 }
-echo warn possibly braindead libc\n;
 ?
 --INI--
 output_handler=

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities04.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities04.phpt 
2009-08-03 10:14:20 UTC (rev 286723)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities04.phpt 
2009-08-03 10:23:23 UTC (rev 286724)
@@ -6,7 +6,6 @@
 if (!$result || preg_match('/EUC[^a-zA-Z]*JP/i', setlocale(LC_CTYPE, 0)) == 0) 
{
die(skip setlocale() failed\n);
 }
-echo warn possibly braindead libc\n;
 ?
 --INI--
 output_handler=

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities15.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities15.phpt 
2009-08-03 10:14:20 UTC (rev 286723)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities15.phpt 
2009-08-03 10:23:23 UTC (rev 286724)
@@ -10,7 +10,6 @@
 if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) {
die(skip setlocale() failed\n);
 }
-echo warn possibly braindead libc\n;
 ?
 --FILE--
 ?php

Modified: php/php-src/trunk/ext/standard/tests/strings/htmlentities02.phpt
===
--- php/php-src/trunk/ext/standard/tests/strings/htmlentities02.phpt
2009-08-03 10:14:20 UTC (rev 286723)
+++ php/php-src/trunk/ext/standard/tests/strings/htmlentities02.phpt
2009-08-03 10:23:23 UTC (rev 286724)
@@ -6,7 +6,6 @@
 if (!$result) {
die(skip setlocale() failed\n);
 }
-echo warn possibly braindead libc\n;
 ?
 --INI--
 output_handler=

Modified: php/php-src/trunk/ext/standard/tests/strings/htmlentities04.phpt

Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c

2009-08-03 Thread Jani Taskinen

Please use the single-commit way instead of doing multiple commits.
Especially when you fix bugs..now there are 3 commit entries in that 
report. :D


See also:

  http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions

--Jani


On 08/03/2009 01:12 PM, Uwe Schindler wrote:

thetaphi Mon, 03 Aug 2009 10:12:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286721

Log:
Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX

Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 
on HPUX, #define HPUX

Changed paths:
 U   php/php-src/trunk/sapi/nsapi/nsapi.c

Modified: php/php-src/trunk/sapi/nsapi/nsapi.c
===
--- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC (rev 
286720)
+++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC (rev 
286721)
@@ -57,6 +57,13 @@
  #endif

  /*
+ * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to 
detect HPUX
+ */
+#ifdef __hpux
+#define HPUX
+#endif
+
+/*
   * NSAPI includes
   */
  #include nsapi.h





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



RE: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c

2009-08-03 Thread Uwe Schindler
Thanks Jani,

I thought it is still optional to do this.

The question is, how to do that on Windows with TortoiseSVN using the GUI?
We had a similar discussion on the Lucene-Java Mailinglist about updating
the backwards-compatibility tests branch with one commit together with
trunk.

-
Uwe Schindler
theta...@php.net - http://www.php.net
NSAPI SAPI developer
Bremen, Germany


 -Original Message-
 From: Jani Taskinen [mailto:j...@php.net]
 Sent: Monday, August 03, 2009 12:26 PM
 To: Uwe Schindler
 Cc: php-cvs@lists.php.net; gwy...@php.net
 Subject: Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
 
 Please use the single-commit way instead of doing multiple commits.
 Especially when you fix bugs..now there are 3 commit entries in that
 report. :D
 
 See also:
 
http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions
 
 --Jani
 
 
 On 08/03/2009 01:12 PM, Uwe Schindler wrote:
  thetaphi Mon, 03 Aug 2009 10:12:30 +
 
  Revision: http://svn.php.net/viewvc?view=revisionrevision=286721
 
  Log:
  Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define
 HPUX
 
  Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web
 Server 7.0 on HPUX, #define HPUX
 
  Changed paths:
   U   php/php-src/trunk/sapi/nsapi/nsapi.c
 
  Modified: php/php-src/trunk/sapi/nsapi/nsapi.c
  ===
  --- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC
 (rev 286720)
  +++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC
 (rev 286721)
  @@ -57,6 +57,13 @@
#endif
 
/*
  + * The manual define of HPUX is to fix bug #46020, nsapi.h needs this
 to detect HPUX
  + */
  +#ifdef __hpux
  +#define HPUX
  +#endif
  +
  +/*
 * NSAPI includes
 */
#include nsapi.h
 
 



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



Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c

2009-08-03 Thread Jani Taskinen

On 08/03/2009 01:36 PM, Uwe Schindler wrote:

Thanks Jani,

I thought it is still optional to do this.


Semi-optional. Since we use svn, why not fully make use of the features 
it provides?



The question is, how to do that on Windows with TortoiseSVN using the GUI?


No idea..is it not possible? Use some other svn client? Or commit from 
command line, it's not that hard..? (no idea if that's possible in 
windows..I don't do clickety-click stuff)


--Jani




We had a similar discussion on the Lucene-Java Mailinglist about updating
the backwards-compatibility tests branch with one commit together with
trunk.

-
Uwe Schindler
theta...@php.net - http://www.php.net
NSAPI SAPI developer
Bremen, Germany



-Original Message-
From: Jani Taskinen [mailto:j...@php.net]
Sent: Monday, August 03, 2009 12:26 PM
To: Uwe Schindler
Cc: php-cvs@lists.php.net; gwy...@php.net
Subject: Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c

Please use the single-commit way instead of doing multiple commits.
Especially when you fix bugs..now there are 3 commit entries in that
report. :D

See also:

http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions

--Jani


On 08/03/2009 01:12 PM, Uwe Schindler wrote:

thetaphi Mon, 03 Aug 2009 10:12:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286721

Log:
Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define

HPUX

Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web

Server 7.0 on HPUX, #define HPUX

Changed paths:
  U   php/php-src/trunk/sapi/nsapi/nsapi.c

Modified: php/php-src/trunk/sapi/nsapi/nsapi.c
===
--- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC

(rev 286720)

+++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC

(rev 286721)

@@ -57,6 +57,13 @@
   #endif

   /*
+ * The manual define of HPUX is to fix bug #46020, nsapi.h needs this

to detect HPUX

+ */
+#ifdef __hpux
+#define HPUX
+#endif
+
+/*
* NSAPI includes
*/
   #include nsapi.h









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



Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c

2009-08-03 Thread Kalle Sommer Nielsen
Hi Uwe

2009/8/3 Uwe Schindler theta...@php.net:
 Thanks Jani,

 I thought it is still optional to do this.

 The question is, how to do that on Windows with TortoiseSVN using the GUI?
 We had a similar discussion on the Lucene-Java Mailinglist about updating
 the backwards-compatibility tests branch with one commit together with
 trunk.


The way I did it was to download a separate client for command line,
doing my sparse checkouts there and then use TortoiseSVN to commit and
it worked pretty well :)

-- 
regrads,

Kalle Sommer Nielsen
ka...@php.net

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



Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS sapi/nsapi/nsapi.c

2009-08-03 Thread Kalle Sommer Nielsen
Hi


 +- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define 
 HPUX).
 +  (Uwe Schindler)
  - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)
  - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot 
 edu)

Please order bug reports by their id, the lower the id, the lower the
list, see README.SVN-RULES :)


-- 
regrads,

Kalle Sommer Nielsen
ka...@php.net

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



RE: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c

2009-08-03 Thread Uwe Schindler
 On 08/03/2009 01:36 PM, Uwe Schindler wrote:
  Thanks Jani,
 
  I thought it is still optional to do this.
 
 Semi-optional. Since we use svn, why not fully make use of the features
 it provides?

+1. But excuse my fault, it was my first commit since the SVN migration.

  The question is, how to do that on Windows with TortoiseSVN using the
 GUI?
 
 No idea..is it not possible? Use some other svn client? Or commit from
 command line, it's not that hard..? (no idea if that's possible in
 windows..I don't do clickety-click stuff)

I got it, it works with TortoiseSVN, too. You can specify in the GUI to
checkout only the immediates and so on. When you want to checkout one branch
in complete, you can just use the Update to revision menu item and specify
HEAD (as we do not want to update a specific revision like the menu item
name suggests) and then use fully recursive.

I think I could update the Wiki with a short HowTo.

I like TortoiseSVN to manage my checkouts, because it colors the folder and
file icons and you can quickly see whats updated.

  We had a similar discussion on the Lucene-Java Mailinglist about
 updating
  the backwards-compatibility tests branch with one commit together with
  trunk.
 
  -
  Uwe Schindler
  theta...@php.net - http://www.php.net
  NSAPI SAPI developer
  Bremen, Germany
 
 
  -Original Message-
  From: Jani Taskinen [mailto:j...@php.net]
  Sent: Monday, August 03, 2009 12:26 PM
  To: Uwe Schindler
  Cc: php-cvs@lists.php.net; gwy...@php.net
  Subject: Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
 
  Please use the single-commit way instead of doing multiple commits.
  Especially when you fix bugs..now there are 3 commit entries in that
  report. :D
 
  See also:
 
 
 http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions
 
  --Jani
 
 
  On 08/03/2009 01:12 PM, Uwe Schindler wrote:
  thetaphi Mon, 03 Aug 2009 10:12:30
 +
 
  Revision: http://svn.php.net/viewvc?view=revisionrevision=286721
 
  Log:
  Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define
  HPUX
  Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web
  Server 7.0 on HPUX, #define HPUX
  Changed paths:
U   php/php-src/trunk/sapi/nsapi/nsapi.c
 
  Modified: php/php-src/trunk/sapi/nsapi/nsapi.c
  ===
  --- php/php-src/trunk/sapi/nsapi/nsapi.c  2009-08-03 09:48:53 UTC
  (rev 286720)
  +++ php/php-src/trunk/sapi/nsapi/nsapi.c  2009-08-03 10:12:30 UTC
  (rev 286721)
  @@ -57,6 +57,13 @@
 #endif
 
 /*
  + * The manual define of HPUX is to fix bug #46020, nsapi.h needs this
  to detect HPUX
  + */
  +#ifdef __hpux
  +#define HPUX
  +#endif
  +
  +/*
  * NSAPI includes
  */
 #include nsapi.h
 
 
 
 
 



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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/readline/config.m4 branches/PHP_5_3/ext/readline/config.m4 trunk/ext/readline/config.m4

2009-08-03 Thread Jani Taskinen
jani Mon, 03 Aug 2009 11:21:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286725

Log:
- Fixed bBug #48873 (Using both --with-libedit and --with-readline cause 
unknown option warning)

# This isn't worth of NEWS entry, it's just cosmetic

Bug: http://bugs.php.net/48873 (Assigned) Using both --with-libedit and 
--with-readline cause unknown option warning
  
Changed paths:
U   php/php-src/branches/PHP_5_2/ext/readline/config.m4
U   php/php-src/branches/PHP_5_3/ext/readline/config.m4
U   php/php-src/trunk/ext/readline/config.m4

Modified: php/php-src/branches/PHP_5_2/ext/readline/config.m4
===
--- php/php-src/branches/PHP_5_2/ext/readline/config.m4 2009-08-03 10:23:23 UTC 
(rev 286724)
+++ php/php-src/branches/PHP_5_2/ext/readline/config.m4 2009-08-03 11:21:44 UTC 
(rev 286725)
@@ -8,6 +8,9 @@
 if test $PHP_LIBEDIT = no; then
   PHP_ARG_WITH(readline,for readline support,
   [  --with-readline[=DIR]   Include readline support (CLI/CGI only)])
+else
+  dnl register the --with-readline option to preven invalid unknown 
configure option warning
+  php_with_readline=no
 fi

 if test $PHP_READLINE  test $PHP_READLINE != no; then

Modified: php/php-src/branches/PHP_5_3/ext/readline/config.m4
===
--- php/php-src/branches/PHP_5_3/ext/readline/config.m4 2009-08-03 10:23:23 UTC 
(rev 286724)
+++ php/php-src/branches/PHP_5_3/ext/readline/config.m4 2009-08-03 11:21:44 UTC 
(rev 286725)
@@ -8,6 +8,9 @@
 if test $PHP_LIBEDIT = no; then
   PHP_ARG_WITH(readline,for readline support,
   [  --with-readline[=DIR]   Include readline support (CLI/CGI only)])
+else
+  dnl register the --with-readline option to preven invalid unknown 
configure option warning
+  php_with_readline=no
 fi

 if test $PHP_READLINE  test $PHP_READLINE != no; then

Modified: php/php-src/trunk/ext/readline/config.m4
===
--- php/php-src/trunk/ext/readline/config.m42009-08-03 10:23:23 UTC (rev 
286724)
+++ php/php-src/trunk/ext/readline/config.m42009-08-03 11:21:44 UTC (rev 
286725)
@@ -8,6 +8,9 @@
 if test $PHP_LIBEDIT = no; then
   PHP_ARG_WITH(readline,for readline support,
   [  --with-readline[=DIR]   Include readline support (CLI/CGI only)])
+else
+  dnl register the --with-readline option to preven invalid unknown 
configure option warning
+  php_with_readline=no
 fi

 if test $PHP_READLINE  test $PHP_READLINE != no; then

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/strings/htmlentities02.phpt branches/PHP_5_2/ext/standard/tests/strings/htmlentities04.phpt branches/PHP_5_2/ext/standard/tests/s

2009-08-03 Thread Jani Taskinen

On 08/03/2009 01:53 PM, Hannes Magnusson wrote:

On Mon, Aug 3, 2009 at 12:23, Jani Taskinenj...@php.net  wrote:

jani Mon, 03 Aug 2009 10:23:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286724

Log:
- These tests fail if mbstring is enabled, not because of bad libc..


Shouldn't the SKIPIF then be updated to check for mbstring?


No. This is a bug that needs to be fixed. It's not supposed to be 
skipped in that case. :)


--Jani


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



[PHP-CVS] svn: /php/phpruntests/trunk/src/testcase/sections/configurationsections/ rtStdinSection.php

2009-08-03 Thread Zoe Slattery
zoe  Mon, 03 Aug 2009 11:59:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286729

Log:
fixing to run on Windows

Changed paths:
U   
php/phpruntests/trunk/src/testcase/sections/configurationsections/rtStdinSection.php

Modified: 
php/phpruntests/trunk/src/testcase/sections/configurationsections/rtStdinSection.php
===
--- 
php/phpruntests/trunk/src/testcase/sections/configurationsections/rtStdinSection.php
2009-08-03 11:41:53 UTC (rev 286728)
+++ 
php/phpruntests/trunk/src/testcase/sections/configurationsections/rtStdinSection.php
2009-08-03 11:59:30 UTC (rev 286729)
@@ -19,7 +19,8 @@

 protected function init()
 {
-$this-inputString = join($this-sectionContents, PHP_EOL) . PHP_EOL;
+//This really does need to be \n not PHPEOL.
+$this-inputString = join($this-sectionContents, \n) . \n;
 }

 public function getInputString() {

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/imap/php_imap.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/imap/php_imap.c trunk/ext/imap/php_imap.c

2009-08-03 Thread Jani Taskinen
jani Mon, 03 Aug 2009 13:02:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286732

Log:
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE 
flag)

Bug: http://bugs.php.net/48400 (Assigned) imap crashes when closing stream 
opened with OP_PROTOTYPE option
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/imap/php_imap.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/imap/php_imap.c
U   php/php-src/trunk/ext/imap/php_imap.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2009-08-03 12:59:05 UTC (rev 286731)
+++ php/php-src/branches/PHP_5_2/NEWS	2009-08-03 13:02:53 UTC (rev 286732)
@@ -4,8 +4,6 @@
 - Fixed regression in cURL extension that prevented flush of data to output
   defined as a file handle. (Ilia)

-- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
-  (Uwe Schindler)
 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)
 - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
@@ -28,6 +26,8 @@
 - Fixed bug #48801 (Problem with imagettfbbox). (Takeshi Abe)
 - Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked
   directories). (Ilia)
+- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
+  (Sriram Natarajan)
 - Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at
   gmail dot com, Pierre)
 - Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)
@@ -57,25 +57,27 @@
 - Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
   TMPDIR). (Ilia)
 - Fixed bug #48450 (Compile failure under IRIX 6.5.30 building gd.c). (Kalle)
+- Fixed bug #48400 (imap crashes when closing stream opened with
+  OP_PROTOTYPE flag). (Jani)
 - Fixed bug #48276 (date(Y) on big endian machines produces the
   wrong result). (Scott)
 - Fixed bug #48247 (Infinite loop and possible crash during startup with
   errors when errors are logged). (Jani)
 - Fixed bug #48116 (Fixed build with Openssl 1.0). (Pierre,
   Al dot Smith at aeschi dot ch dot eu dot org)
+- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
+  (Sriram Natarajan)
 - Fixed bug #48057 (Only the date fields of the first row are fetched,
   others are empty). (info at programmiernutte dot net)
 - Fixed bug #47481 (natcasesort() does not sort extended ASCII characters
   correctly). (Herman Radtke)
 - Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
+- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
+  (Uwe Schindler)
 - Fixed bug #45905 (imagefilledrectangle() clipping error).
   (markril at hotmail dot com, Pierre)
 - Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to crash)
   (Paul Richards, Kalle)
-- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
-  (Sriram Natarajan)
-- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
-  (Sriram Natarajan)
 - Fixed bug #45141 (setcookie will output expires years of 4 digits). (Ilia)
 - Fixed bug #44144 (spl_autoload_functions() should return object instance
   when appropriate). (Hannes, Etienne)

Modified: php/php-src/branches/PHP_5_2/ext/imap/php_imap.c
===
--- php/php-src/branches/PHP_5_2/ext/imap/php_imap.c	2009-08-03 12:59:05 UTC (rev 286731)
+++ php/php-src/branches/PHP_5_2/ext/imap/php_imap.c	2009-08-03 13:02:53 UTC (rev 286732)
@@ -221,7 +221,10 @@
 {
 	pils *imap_le_struct = (pils *)rsrc-ptr;

-	mail_close_full(imap_le_struct-imap_stream, imap_le_struct-flags);
+	/* Do not try to close prototype streams */
+	if (!(imap_le_struct-flags  OP_PROTOTYPE)) {
+		mail_close_full(imap_le_struct-imap_stream, imap_le_struct-flags);
+	}

 	if (IMAPG(imap_user)) {
 		efree(IMAPG(imap_user));
@@ -783,6 +786,9 @@
 			cl_flags = CL_EXPUNGE;
 			flags ^= PHP_EXPUNGE;
 		}
+		if (flags  OP_PROTOTYPE) {
+			cl_flags |= OP_PROTOTYPE;
+		}
 	}

 	if (IMAPG(imap_user)) {

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-08-03 12:59:05 UTC (rev 286731)
+++ php/php-src/branches/PHP_5_3/NEWS	2009-08-03 13:02:53 UTC (rev 286732)
@@ -7,8 +7,6 @@
   Stas)
 - Fixed signature generation/validation for zip archives in ext/phar. (Greg)

-- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
-  (Uwe Schindler)
 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)
 - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
@@ -60,6 +58,8 @@
 - Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/streamsfuncs.c branches/PHP_5_2/ext/standard/tests/streams/stream_is_local.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/

2009-08-03 Thread Felipe Pena
felipe   Mon, 03 Aug 2009 13:16:24 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286733

Log:
- Re-fix stream_is_local() memory leaks

Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/streams/stream_is_local.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/streams/stream_is_local.phpt
U   php/php-src/trunk/ext/standard/streamsfuncs.c
A   php/php-src/trunk/ext/standard/tests/streams/stream_is_local.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-08-03 13:02:53 UTC (rev 286732)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-08-03 13:16:24 UTC (rev 286733)
@@ -3,6 +3,7 @@
 ?? ??? 2009, PHP 5.2.11
 - Fixed regression in cURL extension that prevented flush of data to output
   defined as a file handle. (Ilia)
+- Fixed memory leak in stream_is_local(). (Felipe)

 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)

Modified: php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
13:02:53 UTC (rev 286732)
+++ php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
13:16:24 UTC (rev 286733)
@@ -1397,8 +1397,17 @@
}
wrapper = stream-wrapper;
} else {
-   convert_to_string_ex(zstream);
-   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), 
NULL, 0 TSRMLS_CC);
+   zval *copy_tmp;
+
+   ALLOC_ZVAL(copy_tmp);
+   *copy_tmp = *zstream;
+   zval_copy_ctor(copy_tmp);
+   INIT_PZVAL(copy_tmp);
+   convert_to_string(copy_tmp);
+
+   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(copy_tmp), 
NULL, 0 TSRMLS_CC);
+
+   zval_ptr_dtor(copy_tmp);
}

if(!wrapper) {

Added: 
php/php-src/branches/PHP_5_2/ext/standard/tests/streams/stream_is_local.phpt
===
--- 
php/php-src/branches/PHP_5_2/ext/standard/tests/streams/stream_is_local.phpt
(rev 0)
+++ 
php/php-src/branches/PHP_5_2/ext/standard/tests/streams/stream_is_local.phpt
2009-08-03 13:16:24 UTC (rev 286733)
@@ -0,0 +1,17 @@
+--TEST--
+Testing stream_is_local()
+--FILE--
+?php
+
+$a = 1;
+$b = $a;
+var_dump(stream_is_local($b));
+var_dump($b);
+
+var_dump(stream_is_local(fopen(__FILE__, 'r')));
+
+?
+--EXPECT--
+bool(true)
+int(1)
+bool(true)


Property changes on: 
php/php-src/branches/PHP_5_2/ext/standard/tests/streams/stream_is_local.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-03 13:02:53 UTC (rev 286732)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-03 13:16:24 UTC (rev 286733)
@@ -6,6 +6,7 @@
 - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz,
   Stas)
 - Fixed signature generation/validation for zip archives in ext/phar. (Greg)
+- Fixed memory leak in stream_is_local(). (Felipe)

 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)

Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
13:02:53 UTC (rev 286732)
+++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
13:16:24 UTC (rev 286733)
@@ -1463,8 +1463,17 @@
}
wrapper = stream-wrapper;
} else {
-   convert_to_string_ex(zstream);
-   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), 
NULL, 0 TSRMLS_CC);
+   zval *copy_tmp;
+
+   ALLOC_ZVAL(copy_tmp);
+   *copy_tmp = *zstream;
+   zval_copy_ctor(copy_tmp);
+   INIT_PZVAL(copy_tmp);
+   convert_to_string(copy_tmp);
+
+   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(copy_tmp), 
NULL, 0 TSRMLS_CC);
+
+   zval_ptr_dtor(copy_tmp);
}

if(!wrapper) {

Added: 
php/php-src/branches/PHP_5_3/ext/standard/tests/streams/stream_is_local.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/streams/stream_is_local.phpt
  

[PHP-CVS] svn: /SVNROOT/ pear_avail

2009-08-03 Thread Brett Bieber
saltybeagle  Mon, 03 Aug 2009 13:24:35 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286735

Log:
Grant Michiel Rook access to pear/packages/VersionControl_SVN

Changed paths:
U   SVNROOT/pear_avail

Modified: SVNROOT/pear_avail
===
--- SVNROOT/pear_avail  2009-08-03 13:22:24 UTC (rev 286734)
+++ SVNROOT/pear_avail  2009-08-03 13:24:35 UTC (rev 286735)
@@ -170,6 +170,7 @@
 
avail|rodrigosprimo|pear/packages/Text_Wiki,pear/packages/Text_Wiki_Tiki,pear/packages/Text_Wiki_Mediawiki
 avail|hschletz|pear/packages/MDB2
 avail|tacker|pear/packages/File_Bittorrent,pear/packages/File_Bittorrent2
+avail|mrook|pear/packages/VersionControl_SVN

 # But members of the PHP Group get access to everything.
 # Note: This line MUST be at the end so that it overrides any unavail settings

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/streamsfuncs.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/streamsfuncs.c trunk/ext/standard/streamsfuncs.c

2009-08-03 Thread Felipe Pena
felipe   Mon, 03 Aug 2009 13:26:15 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286736

Log:
- Improved. No ugly copy. (Tony)

Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
U   php/php-src/trunk/ext/standard/streamsfuncs.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-08-03 13:24:35 UTC (rev 286735)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-08-03 13:26:15 UTC (rev 286736)
@@ -3,7 +3,7 @@
 ?? ??? 2009, PHP 5.2.11
 - Fixed regression in cURL extension that prevented flush of data to output
   defined as a file handle. (Ilia)
-- Fixed memory leak in stream_is_local(). (Felipe)
+- Fixed memory leak in stream_is_local(). (Felipe, Tony)

 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)

Modified: php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
13:24:35 UTC (rev 286735)
+++ php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
13:26:15 UTC (rev 286736)
@@ -1382,32 +1382,24 @@
 */
 PHP_FUNCTION(stream_is_local)
 {
-   zval *zstream;
+   zval **zstream;
php_stream *stream = NULL;
php_stream_wrapper *wrapper = NULL;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, zstream) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, zstream) == 
FAILURE) {
RETURN_FALSE;
}

-   if(Z_TYPE_P(zstream) == IS_RESOURCE) {
-   php_stream_from_zval(stream, zstream);
+   if(Z_TYPE_PP(zstream) == IS_RESOURCE) {
+   php_stream_from_zval(stream, zstream);
if(stream == NULL) {
RETURN_FALSE;
}
wrapper = stream-wrapper;
} else {
-   zval *copy_tmp;
+   convert_to_string_ex(zstream);

-   ALLOC_ZVAL(copy_tmp);
-   *copy_tmp = *zstream;
-   zval_copy_ctor(copy_tmp);
-   INIT_PZVAL(copy_tmp);
-   convert_to_string(copy_tmp);
-
-   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(copy_tmp), 
NULL, 0 TSRMLS_CC);
-
-   zval_ptr_dtor(copy_tmp);
+   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_PP(zstream), 
NULL, 0 TSRMLS_CC);
}

if(!wrapper) {

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-03 13:24:35 UTC (rev 286735)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-03 13:26:15 UTC (rev 286736)
@@ -6,7 +6,7 @@
 - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz,
   Stas)
 - Fixed signature generation/validation for zip archives in ext/phar. (Greg)
-- Fixed memory leak in stream_is_local(). (Felipe)
+- Fixed memory leak in stream_is_local(). (Felipe, Tony)

 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)

Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
13:24:35 UTC (rev 286735)
+++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
13:26:15 UTC (rev 286736)
@@ -1448,32 +1448,24 @@
 */
 PHP_FUNCTION(stream_is_local)
 {
-   zval *zstream;
+   zval **zstream;
php_stream *stream = NULL;
php_stream_wrapper *wrapper = NULL;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, zstream) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, zstream) == 
FAILURE) {
RETURN_FALSE;
}

-   if(Z_TYPE_P(zstream) == IS_RESOURCE) {
-   php_stream_from_zval(stream, zstream);
+   if(Z_TYPE_PP(zstream) == IS_RESOURCE) {
+   php_stream_from_zval(stream, zstream);
if(stream == NULL) {
RETURN_FALSE;
}
wrapper = stream-wrapper;
} else {
-   zval *copy_tmp;
+   convert_to_string_ex(zstream);

-   ALLOC_ZVAL(copy_tmp);
-   *copy_tmp = *zstream;
-   zval_copy_ctor(copy_tmp);
-   INIT_PZVAL(copy_tmp);
-   convert_to_string(copy_tmp);
-
-   wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(copy_tmp), 
NULL, 0 TSRMLS_CC);
-
-   zval_ptr_dtor(copy_tmp);
+   wrapper = 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/mysqlnd/ mysqlnd.h

2009-08-03 Thread Andrey Hristov
andrey   Mon, 03 Aug 2009 14:46:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286738

Log:
test

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h  2009-08-03 14:34:17 UTC 
(rev 286737)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h  2009-08-03 14:46:11 UTC 
(rev 286738)
@@ -17,7 +17,6 @@
   |  Ulf Wendel uwen...@mysql.com  |
   +--+
 */
-
 /* $Id$ */

 #ifndef MYSQLND_H

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/mysqlnd/ mysqlnd.h

2009-08-03 Thread Andrey Hristov
andrey   Mon, 03 Aug 2009 14:50:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286739

Log:
test 2

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h  2009-08-03 14:46:11 UTC 
(rev 286738)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h  2009-08-03 14:50:10 UTC 
(rev 286739)
@@ -28,7 +28,6 @@
 /* This forces inlining of some accessor functions */
 #define MYSQLND_USE_OPTIMISATIONS 1

-
 #define MYSQLND_STRING_TO_INT_CONVERSION
 /*
   This force mysqlnd to do a single (or more depending on ammount of data)

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/streamsfuncs.c branches/PHP_5_3/ext/standard/streamsfuncs.c trunk/ext/standard/streamsfuncs.c

2009-08-03 Thread Felipe Pena
felipe   Mon, 03 Aug 2009 15:58:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286744

Log:
- CS

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
U   php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
U   php/php-src/trunk/ext/standard/streamsfuncs.c

Modified: php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
15:24:31 UTC (rev 286743)
+++ php/php-src/branches/PHP_5_2/ext/standard/streamsfuncs.c2009-08-03 
15:58:18 UTC (rev 286744)
@@ -565,7 +565,7 @@

if ((url_stream_wrappers_hash = 
php_stream_get_url_stream_wrappers_hash())) {
array_init(return_value);
-   for(zend_hash_internal_pointer_reset(url_stream_wrappers_hash);
+   for (zend_hash_internal_pointer_reset(url_stream_wrappers_hash);
(key_flags = 
zend_hash_get_current_key_ex(url_stream_wrappers_hash, stream_protocol, 
stream_protocol_len, num_key, 0, NULL)) != HASH_KEY_NON_EXISTANT;
zend_hash_move_forward(url_stream_wrappers_hash)) {
if (key_flags == HASH_KEY_IS_STRING) {
@@ -1390,9 +1390,9 @@
RETURN_FALSE;
}

-   if(Z_TYPE_PP(zstream) == IS_RESOURCE) {
+   if (Z_TYPE_PP(zstream) == IS_RESOURCE) {
php_stream_from_zval(stream, zstream);
-   if(stream == NULL) {
+   if (stream == NULL) {
RETURN_FALSE;
}
wrapper = stream-wrapper;
@@ -1402,7 +1402,7 @@
wrapper = php_stream_locate_url_wrapper(Z_STRVAL_PP(zstream), 
NULL, 0 TSRMLS_CC);
}

-   if(!wrapper) {
+   if (!wrapper) {
RETURN_FALSE;
}


Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
15:24:31 UTC (rev 286743)
+++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2009-08-03 
15:58:18 UTC (rev 286744)
@@ -573,7 +573,7 @@
if ((url_stream_wrappers_hash = 
php_stream_get_url_stream_wrappers_hash())) {
HashPosition pos;
array_init(return_value);
-   
for(zend_hash_internal_pointer_reset_ex(url_stream_wrappers_hash, pos);
+   for 
(zend_hash_internal_pointer_reset_ex(url_stream_wrappers_hash, pos);
(key_flags = 
zend_hash_get_current_key_ex(url_stream_wrappers_hash, stream_protocol, 
stream_protocol_len, num_key, 0, pos)) != HASH_KEY_NON_EXISTANT;
zend_hash_move_forward_ex(url_stream_wrappers_hash, 
pos)) {
if (key_flags == HASH_KEY_IS_STRING) {
@@ -1456,9 +1456,9 @@
RETURN_FALSE;
}

-   if(Z_TYPE_PP(zstream) == IS_RESOURCE) {
+   if (Z_TYPE_PP(zstream) == IS_RESOURCE) {
php_stream_from_zval(stream, zstream);
-   if(stream == NULL) {
+   if (stream == NULL) {
RETURN_FALSE;
}
wrapper = stream-wrapper;
@@ -1468,7 +1468,7 @@
wrapper = php_stream_locate_url_wrapper(Z_STRVAL_PP(zstream), 
NULL, 0 TSRMLS_CC);
}

-   if(!wrapper) {
+   if (!wrapper) {
RETURN_FALSE;
}


Modified: php/php-src/trunk/ext/standard/streamsfuncs.c
===
--- php/php-src/trunk/ext/standard/streamsfuncs.c   2009-08-03 15:24:31 UTC 
(rev 286743)
+++ php/php-src/trunk/ext/standard/streamsfuncs.c   2009-08-03 15:58:18 UTC 
(rev 286744)
@@ -613,7 +613,7 @@
if ((url_stream_wrappers_hash = 
php_stream_get_url_stream_wrappers_hash())) {
HashPosition pos;
array_init(return_value);
-   
for(zend_hash_internal_pointer_reset_ex(url_stream_wrappers_hash, pos);
+   for 
(zend_hash_internal_pointer_reset_ex(url_stream_wrappers_hash, pos);
(key_flags = 
zend_hash_get_current_key_ex(url_stream_wrappers_hash, stream_protocol, 
stream_protocol_len, num_key, 0, pos)) != HASH_KEY_NON_EXISTANT;
zend_hash_move_forward_ex(url_stream_wrappers_hash, 
pos)) {
if (key_flags == HASH_KEY_IS_STRING) {
@@ -1743,9 +1743,9 @@
RETURN_FALSE;
}

-   if(Z_TYPE_PP(zstream) == IS_RESOURCE) {
+   if (Z_TYPE_PP(zstream) == IS_RESOURCE) {
php_stream_from_zval(stream, zstream);
-   if(stream == NULL) {
+   if (stream == NULL) {
RETURN_FALSE;
}
wrapper = stream-wrapper;
@@ -1755,7 +1755,7 @@
   

[PHP-CVS] svn: /php/php-src/trunk/ext/zlib/ zlib.c

2009-08-03 Thread Jani Taskinen
jani Mon, 03 Aug 2009 18:08:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286749

Log:
- Fix output compression

Changed paths:
U   php/php-src/trunk/ext/zlib/zlib.c

Modified: php/php-src/trunk/ext/zlib/zlib.c
===
--- php/php-src/trunk/ext/zlib/zlib.c   2009-08-03 17:38:38 UTC (rev 286748)
+++ php/php-src/trunk/ext/zlib/zlib.c   2009-08-03 18:08:46 UTC (rev 286749)
@@ -70,7 +70,7 @@
if (!ZLIBG(compression_coding)) {
zend_is_auto_global(ZEND_STRL(_SERVER) TSRMLS_CC);

-   if (PG(http_globals)[TRACK_VARS_SERVER]  SUCCESS == 
zend_ascii_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), 
HTTP_ACCEPT_ENCODING, sizeof(HTTP_ACCEPT_ENCODING), (void *) enc)) {
+   if (PG(http_globals)[TRACK_VARS_SERVER]  SUCCESS == 
zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), 
HTTP_ACCEPT_ENCODING, sizeof(HTTP_ACCEPT_ENCODING), (void *) enc)) {
convert_to_string(*enc);
if (strstr(Z_STRVAL_PP(enc), gzip)) {
ZLIBG(compression_coding) = 
PHP_ZLIB_ENCODING_GZIP;

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

[PHP-CVS] svn: /php/php-src/trunk/ext/zlib/ php_zlib.h zlib.c

2009-08-03 Thread Jani Taskinen
jani Mon, 03 Aug 2009 18:09:19 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286750

Log:
- Cleanup

Changed paths:
U   php/php-src/trunk/ext/zlib/php_zlib.h
U   php/php-src/trunk/ext/zlib/zlib.c

Modified: php/php-src/trunk/ext/zlib/php_zlib.h
===
--- php/php-src/trunk/ext/zlib/php_zlib.h	2009-08-03 18:08:46 UTC (rev 286749)
+++ php/php-src/trunk/ext/zlib/php_zlib.h	2009-08-03 18:09:19 UTC (rev 286750)
@@ -55,14 +55,6 @@
 	php_zlib_buffer buffer;
 } php_zlib_context;

-int php_zlib_output_encoding(TSRMLS_D);
-int php_zlib_encode(const char *in_buf, size_t in_len, char **out_buf, size_t *out_len, int encoding, int level TSRMLS_DC);
-int php_zlib_decode(const char *in_buf, size_t in_len, char **out_buf, size_t *out_len, int encoding, size_t max_len TSRMLS_DC);
-php_output_handler *php_zlib_output_handler_init(zval *handler_name, size_t chunk_size, int flags TSRMLS_DC);
-int php_zlib_output_handler(void **handler_context, php_output_context *output_context);
-void php_zlib_output_handler_dtor(void *opaq TSRMLS_DC);
-int php_zlib_output_conflict_check(zval *handler_name TSRMLS_DC);
-
 php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
 extern php_stream_ops php_stream_gzio_ops;
 extern php_stream_wrapper php_stream_gzip_wrapper;
@@ -71,28 +63,6 @@
 #define zlib_module_ptr php_zlib_module_entry
 #define phpext_zlib_ptr zlib_module_ptr

-PHP_MINIT_FUNCTION(zlib);
-PHP_MSHUTDOWN_FUNCTION(zlib);
-PHP_RINIT_FUNCTION(zlib);
-PHP_MINFO_FUNCTION(zlib);
-
-PHP_FUNCTION(gzfile);
-PHP_FUNCTION(gzopen);
-PHP_FUNCTION(readgzfile);
-
-PHP_FUNCTION(gzcompress);
-PHP_FUNCTION(gzuncompress);
-PHP_FUNCTION(gzdeflate);
-PHP_FUNCTION(gzinflate);
-PHP_FUNCTION(gzencode);
-PHP_FUNCTION(gzdecode);
-
-PHP_FUNCTION(zlib_encode);
-PHP_FUNCTION(zlib_decode);
-
-PHP_FUNCTION(zlib_get_coding_type);
-
-
 #ifdef ZTS
 #	define ZLIBG(v) TSRMG(zlib_globals_id, zend_zlib_globals *, v)
 #else

Modified: php/php-src/trunk/ext/zlib/zlib.c
===
--- php/php-src/trunk/ext/zlib/zlib.c	2009-08-03 18:08:46 UTC (rev 286749)
+++ php/php-src/trunk/ext/zlib/zlib.c	2009-08-03 18:09:19 UTC (rev 286750)
@@ -50,7 +50,7 @@
 /* }}} */

 /* {{{ php_zlib_output_conflict_check() */
-int php_zlib_output_conflict_check(zval *handler_name TSRMLS_DC)
+static int php_zlib_output_conflict_check(zval *handler_name TSRMLS_DC)
 {
 	if (php_output_get_level(TSRMLS_C)  0) {
 		PHP_OUTPUT_CONFLICT(PHP_ZLIB_OUTPUT_HANDLER_NAME, return FAILURE);
@@ -63,7 +63,7 @@
 /* }}} */

 /* {{{ php_zlib_output_encoding() */
-int php_zlib_output_encoding(TSRMLS_D)
+static int php_zlib_output_encoding(TSRMLS_D)
 {
 	zval **enc;

@@ -84,58 +84,8 @@
 }
 /* }}} */

-/* {{{ php_zlib_output_compression_start() */
-void php_zlib_output_compression_start(TSRMLS_D)
-{
-	zval *zoh, *tmp;
-	php_output_handler *h;
-
-	switch (ZLIBG(output_compression)) {
-		case 0:
-			break;
-		case 1:
-			ZLIBG(output_compression) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
-			/* break omitted intentionally */
-		default:
-			MAKE_STD_ZVAL(tmp);
-			ZVAL_ASCII_STRING(tmp, PHP_ZLIB_OUTPUT_HANDLER_NAME, ZSTR_DUPLICATE);
-			if (	(h = php_zlib_output_handler_init(tmp, ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC)) 
-	(SUCCESS == php_output_handler_start(h TSRMLS_CC))) {
-if (ZLIBG(output_handler)  *ZLIBG(output_handler)) {
-	MAKE_STD_ZVAL(zoh);
-	ZVAL_ASCII_STRING(zoh, ZLIBG(output_handler), ZSTR_DUPLICATE);
-	php_output_start_user(zoh, ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC);
-	zval_ptr_dtor(zoh);
-}
-			}
-			zval_ptr_dtor(tmp);
-			break;
-	}
-}
-/* }}} */
-
-/* {{{ php_zlib_output_handler_init() */
-php_output_handler *php_zlib_output_handler_init(zval *handler_name, size_t chunk_size, int flags TSRMLS_DC)
-{
-	php_output_handler *h = NULL;
-	php_zlib_context   *ctx;
-
-	if (!ZLIBG(output_compression)) {
-		ZLIBG(output_compression) = chunk_size ? chunk_size : PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
-	}
-	if ((h = php_output_handler_create_internal(handler_name, php_zlib_output_handler, chunk_size, flags TSRMLS_CC))) {
-		ctx = (php_zlib_context *) ecalloc(1, sizeof(php_zlib_context));
-		ctx-Z.zalloc = php_zlib_alloc;
-		ctx-Z.zfree = php_zlib_free;
-		php_output_handler_set_context(h, ctx, php_zlib_output_handler_dtor TSRMLS_CC);
-	}
-
-	return h;
-}
-/* }}} */
-
 /* {{{ php_zlib_output_handler() */
-int php_zlib_output_handler(void **handler_context, php_output_context *output_context)
+static int php_zlib_output_handler(void **handler_context, php_output_context *output_context)
 {
 	php_zlib_context *ctx = *(php_zlib_context **) handler_context;
 	int flags = Z_SYNC_FLUSH;
@@ -262,7 +212,7 @@
 /* }}} */

 /* {{{ php_zlib_output_handler_dtor() */
-void 

[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/NEWS PHP_5_2/ext/zlib/php_zlib.h PHP_5_2/main/SAPI.c PHP_5_3/NEWS PHP_5_3/ext/zlib/php_zlib.h PHP_5_3/main/SAPI.c

2009-08-03 Thread Jani Taskinen
jani Mon, 03 Aug 2009 18:15:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286751

Log:
- Fixed bug #48994 (zlib.output_compression does not ouput HTTP headers when 
set to a string value)
# also fixes bug #35936 (ini.zlib.output-compression Documentation :)

Bugs: http://bugs.php.net/48994 (Assigned) zlib.output_compression does not 
ouput HTTP headers when set to a string value
  http://bugs.php.net/35936 (Open) ini.zlib.output-compression Documentation
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/zlib/php_zlib.h
U   php/php-src/branches/PHP_5_2/main/SAPI.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/zlib/php_zlib.h
U   php/php-src/branches/PHP_5_3/main/SAPI.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-08-03 18:09:19 UTC (rev 286750)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-08-03 18:15:30 UTC (rev 286751)
@@ -16,6 +16,8 @@
   (Jani)
 - Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars
   restrictions). (Ilia)
+- Fixed bug #48994 (zlib.output_compression does not ouput HTTP headers when
+  set to a string value). (Jani)
 - Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe)
 - Fixed bug #48962 (cURL does not upload files with specified filename).
   (Ilia)

Modified: php/php-src/branches/PHP_5_2/ext/zlib/php_zlib.h
===
--- php/php-src/branches/PHP_5_2/ext/zlib/php_zlib.h2009-08-03 18:09:19 UTC 
(rev 286750)
+++ php/php-src/branches/PHP_5_2/ext/zlib/php_zlib.h2009-08-03 18:15:30 UTC 
(rev 286751)
@@ -35,6 +35,8 @@
char *output_handler;
 ZEND_END_MODULE_GLOBALS(zlib)

+PHPAPI ZEND_EXTERN_MODULE_GLOBALS(zlib)
+
 extern php_stream_filter_factory php_zlib_filter_factory;
 extern zend_module_entry php_zlib_module_entry;
 #define zlib_module_ptr php_zlib_module_entry

Modified: php/php-src/branches/PHP_5_2/main/SAPI.c
===
--- php/php-src/branches/PHP_5_2/main/SAPI.c2009-08-03 18:09:19 UTC (rev 
286750)
+++ php/php-src/branches/PHP_5_2/main/SAPI.c2009-08-03 18:15:30 UTC (rev 
286751)
@@ -768,7 +768,7 @@
/* Add output compression headers at this late stage in order to make
   it possible to switch it off inside the script. */

-   if (zend_ini_long(zlib.output_compression, 
sizeof(zlib.output_compression), 0)) {
+   if (ZLIBG(output_compression)) {
zval nm_zlib_get_coding_type;
zval *uf_result = NULL;


Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-03 18:09:19 UTC (rev 286750)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-03 18:15:30 UTC (rev 286751)
@@ -38,6 +38,8 @@
   a chunk). (andreas dot streichardt at globalpark dot com, Ilia)
 - Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes
   when including files from function). (Stas)
+- Fixed bug #48994 (zlib.output_compression does not ouput HTTP headers when
+  set to a string value). (Jani)
 - Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe)
 - Fixed bug #48962 (cURL does not upload files with specified filename).
   (Ilia)

Modified: php/php-src/branches/PHP_5_3/ext/zlib/php_zlib.h
===
--- php/php-src/branches/PHP_5_3/ext/zlib/php_zlib.h2009-08-03 18:09:19 UTC 
(rev 286750)
+++ php/php-src/branches/PHP_5_3/ext/zlib/php_zlib.h2009-08-03 18:15:30 UTC 
(rev 286751)
@@ -35,6 +35,8 @@
char *output_handler;
 ZEND_END_MODULE_GLOBALS(zlib)

+PHPAPI ZEND_EXTERN_MODULE_GLOBALS(zlib)
+
 extern php_stream_filter_factory php_zlib_filter_factory;
 extern zend_module_entry php_zlib_module_entry;
 #define zlib_module_ptr php_zlib_module_entry

Modified: php/php-src/branches/PHP_5_3/main/SAPI.c
===
--- php/php-src/branches/PHP_5_3/main/SAPI.c2009-08-03 18:09:19 UTC (rev 
286750)
+++ php/php-src/branches/PHP_5_3/main/SAPI.c2009-08-03 18:15:30 UTC (rev 
286751)
@@ -793,7 +793,7 @@
/* Add output compression headers at this late stage in order to make
   it possible to switch it off inside the script. */

-   if (zend_ini_long(zlib.output_compression, 
sizeof(zlib.output_compression), 0)) {
+   if (ZLIBG(output_compression)) {
zval nm_zlib_get_coding_type;
zval *uf_result = NULL;


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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/proc_open.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/proc_open.c trunk/ext/standard/proc_open.c

2009-08-03 Thread Felipe Pena
felipe   Mon, 03 Aug 2009 19:05:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286752

Log:
- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32)

Bug: http://bugs.php.net/49095 (Closed) proc_get_status['exitcode'] fails on 
win32
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/standard/proc_open.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/proc_open.c
U   php/php-src/trunk/ext/standard/proc_open.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-08-03 18:15:30 UTC (rev 286751)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-08-03 19:05:56 UTC (rev 286752)
@@ -8,6 +8,7 @@
 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)
 - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
+- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32). (Felipe)
 - Fixed bug #49074 (private class static fields can be modified by using
   reflection). (Jani)
 - Fixed bug #49052 (context option headers freed too early when using

Modified: php/php-src/branches/PHP_5_2/ext/standard/proc_open.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/proc_open.c   2009-08-03 
18:15:30 UTC (rev 286751)
+++ php/php-src/branches/PHP_5_2/ext/standard/proc_open.c   2009-08-03 
19:05:56 UTC (rev 286752)
@@ -412,7 +412,7 @@
GetExitCodeProcess(proc-childHandle, wstatus);

running = wstatus == STILL_ACTIVE;
-   exitcode == STILL_ACTIVE ? -1 : wstatus;
+   exitcode = running ? -1 : wstatus;

 #elif HAVE_SYS_WAIT_H


Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-03 18:15:30 UTC (rev 286751)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-03 19:05:56 UTC (rev 286752)
@@ -13,6 +13,7 @@
 - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
 - Fixed bug #49122 (undefined reference to mysqlnd_stmt_next_result on compile 
with
   --with-mysqli and MySQL 6.0). (Jani)
+- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32). (Felipe)
 - Fixed bug #49092 (ReflectionFunction fails to work with functions in fully
   qualified namespaces). (Kalle, Jani)
 - Fixed bug #49074 (private class static fields can be modified by using

Modified: php/php-src/branches/PHP_5_3/ext/standard/proc_open.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/proc_open.c   2009-08-03 
18:15:30 UTC (rev 286751)
+++ php/php-src/branches/PHP_5_3/ext/standard/proc_open.c   2009-08-03 
19:05:56 UTC (rev 286752)
@@ -412,7 +412,7 @@
GetExitCodeProcess(proc-childHandle, wstatus);

running = wstatus == STILL_ACTIVE;
-   exitcode == STILL_ACTIVE ? -1 : wstatus;
+   exitcode = running ? -1 : wstatus;

 #elif HAVE_SYS_WAIT_H


Modified: php/php-src/trunk/ext/standard/proc_open.c
===
--- php/php-src/trunk/ext/standard/proc_open.c  2009-08-03 18:15:30 UTC (rev 
286751)
+++ php/php-src/trunk/ext/standard/proc_open.c  2009-08-03 19:05:56 UTC (rev 
286752)
@@ -394,7 +394,7 @@
GetExitCodeProcess(proc-childHandle, wstatus);

running = wstatus == STILL_ACTIVE;
-   exitcode == STILL_ACTIVE ? -1 : wstatus;
+   exitcode = running ? -1 : wstatus;

 #elif HAVE_SYS_WAIT_H


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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/simplexml/tests/bug36611.phpt branches/PHP_5_2/ext/simplexml/tests/bug40451.phpt branches/PHP_5_2/ext/simplexml/tests/bug41175.phpt branches/PHP_5_2/e

2009-08-03 Thread andy wharmby
wharmby  Mon, 03 Aug 2009 22:40:58 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286770

Log:
Add missing SKIPIF sections to tests

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug36611.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug40451.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41175.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41582.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41861.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41867.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41947.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug42369.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug43221.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug44478.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug45553.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug46003.phpt
U   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug46047.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug36611.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug40451.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug41175.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug41582.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug41861.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug41867.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug41947.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug42259.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug42369.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug43221.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug44478.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug45553.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug46003.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug46047.phpt
U   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug46048.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug36611.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug42369.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug43221.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug44478.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug45553.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug46003.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug46047.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug46048.phpt

Modified: php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug36611.phpt
===
--- php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug36611.phpt	2009-08-03 22:25:53 UTC (rev 286769)
+++ php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug36611.phpt	2009-08-03 22:40:58 UTC (rev 286770)
@@ -19,12 +19,12 @@
 $val = 1;

 var_dump($val);
-$obj-pos[act_idx] = $val;
+$xml-pos[act_idx] = $val;
 var_dump($val) ;

-echo Done\n;
 ?
+===DONE===
 --EXPECT--
 int(1)
 int(1)
-Done
+===DONE===

Modified: php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug40451.phpt
===
--- php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug40451.phpt	2009-08-03 22:25:53 UTC (rev 286769)
+++ php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug40451.phpt	2009-08-03 22:40:58 UTC (rev 286770)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #40451 (addAttribute() may crash when used with non-existent child node)
+--SKIPIF--
+?php if (!extension_loaded(simplexml)) print skip; ?
 --FILE--
 ?php

@@ -14,9 +16,8 @@

 $add = $xml-addChild('Host');
 $add-Host-addAttribute('enable', 'true');
-
-echo Done\n;
 ?
+===DONE===
 --EXPECTF--
 Warning: SimpleXMLElement::addAttribute(): Unable to locate parent Element in %s on line %d
-Done
+===DONE===

Modified: php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41175.phpt
===
--- php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41175.phpt	2009-08-03 22:25:53 UTC (rev 286769)
+++ php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41175.phpt	2009-08-03 22:40:58 UTC (rev 286770)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #41175 (addAttribute() fails to add an attribute with an empty value)
+--SKIPIF--
+?php if (!extension_loaded(simplexml)) print skip; ?
 --FILE--
 ?php

@@ -8,9 +10,9 @@
 $xml-addAttribute(alt, );
 echo $xml-asXML();

-echo Done\n;
 ?
+===DONE===
 --EXPECT--
 ?xml version=1.0?
 img src=foo alt=/
-Done
\ No newline at end of file
+===DONE===
\ No newline at end of file

Modified: php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41582.phpt
===
--- php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug41582.phpt	2009-08-03 22:25:53 UTC (rev 286769)

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_basic.phpt branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_error.ph

2009-08-03 Thread andy wharmby
wharmby  Mon, 03 Aug 2009 23:12:43 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286771

Log:
New basic tests for get_defined_constants(), get_loaded_extensions() and 
get_resource_type() functions. Tested on Windows, Linux and Linux 64 bit

Changed paths:
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_basic.phpt
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_error.phpt
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_loaded_extensions_error.phpt
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_resource_type_basic.phpt
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_resource_type_error.phpt
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_resource_type_variation1.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/get_defined_constants_basic.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/get_defined_constants_error.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/get_loaded_extensions_error.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/get_resource_type_basic.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/get_resource_type_error.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/get_resource_type_variation1.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/get_defined_constants_basic.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/get_defined_constants_error.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/get_loaded_extensions_basic.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/get_loaded_extensions_error.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/get_resource_type_basic.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/get_resource_type_error.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/get_resource_type_variation1.phpt

Added: php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_basic.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_basic.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_basic.phpt	2009-08-03 23:12:43 UTC (rev 286771)
@@ -0,0 +1,39 @@
+--TEST--
+Test get_defined_constants() function : basic functionality
+--FILE--
+?php
+/* Prototype  : array get_defined_constants  ([ bool $categorize  ] )
+ * Description:  Returns an associative array with the names of all the constants and their values
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+echo *** Testing get_defined_constants() : basic functionality ***\n;
+
+var_dump(gettype(get_defined_constants(true)));
+var_dump(gettype(get_defined_constants()));
+
+$arr1 = get_defined_constants(false);
+$arr2 = get_defined_constants();
+var_dump(array_diff($arr1, $arr2));
+
+$n1 = count(get_defined_constants());
+define(USER_CONSTANT, test);
+$arr2 = get_defined_constants();
+$n2 = count($arr2);
+
+if ($n2 == $n1 + 1  array_key_exists(USER_CONSTANT, $arr2)) {
+	echo TEST PASSED\n;
+} else {
+	echo TEST FAILED\n;
+}
+
+?
+===DONE===
+--EXPECTF--
+*** Testing get_defined_constants() : basic functionality ***
+string(5) array
+string(5) array
+array(0) {
+}
+TEST PASSED
+===DONE===
\ No newline at end of file

Added: php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_error.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_error.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/get_defined_constants_error.phpt	2009-08-03 23:12:43 UTC (rev 286771)
@@ -0,0 +1,25 @@
+--TEST--
+Test get_defined_constants() function : error conditions
+--FILE--
+?php
+/* Prototype  : array get_defined_constants  ([ bool $categorize  ] )
+ * Description:  Returns an associative array with the names of all the constants and their values
+ * Source code: Zend/zend_builtin_functions.c
+ */
+
+echo *** Testing get_defined_constants() : error conditions ***\n;
+
+echo \n-- Testing get_defined_constants() function with more than expected no. of arguments --\n;
+$extra_arg = 10;
+var_dump( get_defined_constants(true, $extra_arg) );
+

[PHP-CVS] svn: /php/php-src/trunk/ext/standard/tests/file/ parse_ini_file_variation6.phpt

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:17:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286776

Log:
- Fix test

Changed paths:
U   php/php-src/trunk/ext/standard/tests/file/parse_ini_file_variation6.phpt

Modified: 
php/php-src/trunk/ext/standard/tests/file/parse_ini_file_variation6.phpt
===
--- php/php-src/trunk/ext/standard/tests/file/parse_ini_file_variation6.phpt
2009-08-03 23:29:11 UTC (rev 286775)
+++ php/php-src/trunk/ext/standard/tests/file/parse_ini_file_variation6.phpt
2009-08-04 02:17:33 UTC (rev 286776)
@@ -1,7 +1,5 @@
 --TEST--
 Test parse_ini_file() function : variation - various absolute and relative 
paths
---XFAIL--
-Pending completion of Unicode streams
 --CREDITS--
 Dave Kelsey d_kel...@uk.ibm.com
 --FILE--
@@ -45,7 +43,7 @@
 $content=a=test;
 $absFile = $absSubDir.'/'.$filename;
 $h = fopen($absFile,w);
-fwrite($h, $content);
+fwrite($h, (binary) $content);
 fclose($h);

 for($i = 0; $icount($allDirs); $i++) {

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

[PHP-CVS] svn: /php/php-src/trunk/ext/standard/tests/general_functions/ bug47859.phpt

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:24:47 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286777

Log:
- fix test

Changed paths:
U   php/php-src/trunk/ext/standard/tests/general_functions/bug47859.phpt

Modified: php/php-src/trunk/ext/standard/tests/general_functions/bug47859.phpt
===
--- php/php-src/trunk/ext/standard/tests/general_functions/bug47859.phpt
2009-08-04 02:17:33 UTC (rev 286776)
+++ php/php-src/trunk/ext/standard/tests/general_functions/bug47859.phpt
2009-08-04 02:24:47 UTC (rev 286777)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #47859 parse_ini_file() does not like asterisk (*) in key in the 
beginning
+Bug #47859 (parse_ini_file() does not like asterisk (*) in key in the 
beginning)
 --FILE--
 ?php
 var_dump(parse_ini_string('*key = *value'));
@@ -13,30 +13,30 @@
 ?
 --EXPECT--
 array(1) {
-  [*key]=
-  string(6) *value
+  [u*key]=
+  unicode(6) *value
 }
 array(1) {
-  [-key]=
-  string(6) -value
+  [u-key]=
+  unicode(6) -value
 }
 array(1) {
-  [_key]=
-  string(6) _value
+  [u_key]=
+  unicode(6) _value
 }
 array(1) {
-  [key*]=
-  string(6) value*
+  [ukey*]=
+  unicode(6) value*
 }
 array(1) {
-  [key.*.*]=
-  string(9) value.*.*
+  [ukey.*.*]=
+  unicode(9) value.*.*
 }
 array(1) {
-  [*.*.key]=
-  string(9) *.*.value
+  [u*.*.key]=
+  unicode(9) *.*.value
 }
 array(1) {
-  [k*e*y]=
-  string(7) v*a*lue
+  [uk*e*y]=
+  unicode(7) v*a*lue
 }

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/general_functions/bug49056.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_ini_scanner.l branches/PHP_5_3/ext/standard/tests/gene

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:34:04 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286778

Log:
- Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII 
strings as option keys)

Bug: http://bugs.php.net/49056 (Open) parse_ini_file() regression in 5.3.0 when 
using non-ASCII strings as option keys
  
Changed paths:
A   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49056.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49056.phpt
U   php/php-src/trunk/Zend/zend_ini_scanner.l
A   php/php-src/trunk/ext/standard/tests/general_functions/bug49056.phpt

Added: 
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49056.phpt
===
--- 
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49056.phpt 
(rev 0)
+++ 
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49056.phpt 
2009-08-04 02:34:04 UTC (rev 286778)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #49056 (parse_ini_*() regression in 5.3.0 when using non-ASCII strings as 
option keys)
+--FILE--
+?php
+
+$string = EOT
+Cooking_furniture=Küchen Möbel (en)
+Küchen_Möbel=Cooking furniture (en)
+EOT;
+
+$filename = dirname(__FILE__) . '/bug49056.tmp';
+
+file_put_contents( $filename, $string);
+
+var_dump(parse_ini_file($filename));
+
+?
+--CLEAN--
+?php @unlink(dirname(__FILE__) . '/bug49056.tmp'); ?
+--EXPECT--
+array(2) {
+  [Cooking_furniture]=
+  string(23) Küchen Möbel (en)
+  [Küchen_Möbel]=
+  string(22) Cooking furniture (en)
+}

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-04 02:24:47 UTC (rev 286777)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-04 02:34:04 UTC (rev 286778)
@@ -23,6 +23,8 @@
   Zend extensions). (Stas)
 - Fixed bug #49064 (--enable-session=shared does not work: undefined symbol:
   php_url_scanner_reset_vars). (Jani)
+- Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII
+  strings as option keys). (Jani)
 - Fixed bug #49052 (context option headers freed too early when using
   --with-curlwrappers). (Jani)
 - Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference).

Modified: php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l
===
--- php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l2009-08-04 
02:24:47 UTC (rev 286777)
+++ php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l2009-08-04 
02:34:04 UTC (rev 286778)
@@ -308,7 +308,7 @@
 TABS_AND_SPACES [ \t]
 WHITESPACE [ \t]+
 CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [a-zA-Z0-9*._-]*
+LABEL [^=\n\r\t ;|$~(){}!\[]+
 TOKENS [:,.\[\]'()|^+-/*=%$!~?...@{}]
 OPERATORS [|~()!]
 DOLLAR_CURLY ${

Added: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49056.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49056.phpt 
(rev 0)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49056.phpt 
2009-08-04 02:34:04 UTC (rev 286778)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #49056 (parse_ini_*() regression in 5.3.0 when using non-ASCII strings as 
option keys)
+--FILE--
+?php
+
+$string = EOT
+Cooking_furniture=Küchen Möbel (en)
+Küchen_Möbel=Cooking furniture (en)
+EOT;
+
+$filename = dirname(__FILE__) . '/bug49056.tmp';
+
+file_put_contents( $filename, $string);
+
+var_dump(parse_ini_file($filename));
+
+?
+--CLEAN--
+?php @unlink(dirname(__FILE__) . '/bug49056.tmp'); ?
+--EXPECT--
+array(2) {
+  [Cooking_furniture]=
+  string(23) Küchen Möbel (en)
+  [Küchen_Möbel]=
+  string(22) Cooking furniture (en)
+}

Modified: php/php-src/trunk/Zend/zend_ini_scanner.l
===
--- php/php-src/trunk/Zend/zend_ini_scanner.l   2009-08-04 02:24:47 UTC (rev 
286777)
+++ php/php-src/trunk/Zend/zend_ini_scanner.l   2009-08-04 02:34:04 UTC (rev 
286778)
@@ -298,7 +298,6 @@
goto restart;
}
}
-
 /*!re2c
 re2c:yyfill:check = 0;
 LNUM [0-9]+
@@ -309,7 +308,7 @@
 TABS_AND_SPACES [ \t]
 WHITESPACE [ \t]+
 CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [a-zA-Z0-9*._-]*
+LABEL [^=\n\r\t ;|$~(){}!\[]+
 TOKENS [:,.\[\]'()|^+-/*=%$!~?...@{}]
 OPERATORS [|~()!]
 DOLLAR_CURLY ${
@@ -318,13 +317,12 @@
 SINGLE_QUOTED_CHARS [^']
 RAW_VALUE_CHARS [^=\n\r;]

-/* Allow using ${foobar} in sections, quoted strings and values */
 LITERAL_DOLLAR ($([^{\000]|(\\{ANY_CHAR})))
 VALUE_CHARS ([^$= \t\n\r;|~()!'\000]|{LITERAL_DOLLAR})
 SECTION_VALUE_CHARS 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/ bug47859.phpt

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:34:32 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286779

Log:
- cosmetics

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug47859.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug47859.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug47859.phpt 
2009-08-04 02:34:04 UTC (rev 286778)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug47859.phpt 
2009-08-04 02:34:32 UTC (rev 286779)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #47859 parse_ini_file() does not like asterisk (*) in key in the 
beginning
+Bug #47859 (parse_ini_file() does not like asterisk (*) in key in the 
beginning)
 --FILE--
 ?php
 var_dump(parse_ini_string('*key = *value'));

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_ini_scanner.c branches/PHP_5_3/Zend/zend_ini_scanner_defs.h trunk/Zend/zend_ini_scanner.c trunk/Zend/zend_ini_scanner_defs.h

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:35:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286780

Log:
- Generated files

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.c
U   php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner_defs.h
U   php/php-src/trunk/Zend/zend_ini_scanner.c
U   php/php-src/trunk/Zend/zend_ini_scanner_defs.h

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

[PHP-CVS] svn: /php/php-src/trunk/ext/standard/tests/http/ bug43510.phpt

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:54:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286781

Log:
-fix test

Changed paths:
U   php/php-src/trunk/ext/standard/tests/http/bug43510.phpt

Modified: php/php-src/trunk/ext/standard/tests/http/bug43510.phpt
===
--- php/php-src/trunk/ext/standard/tests/http/bug43510.phpt 2009-08-04 
02:35:38 UTC (rev 286780)
+++ php/php-src/trunk/ext/standard/tests/http/bug43510.phpt 2009-08-04 
02:54:10 UTC (rev 286781)
@@ -24,5 +24,5 @@

 ?
 --EXPECT--
-string(1) r
-string(2) rb
+unicode(1) r
+unicode(2) rb

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/http/bug48929.phpt branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt trunk/ext/standard/tests/http/bug48929.phpt

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:55:24 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286782

Log:
- Fix title

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/standard/tests/http/bug48929.phpt
U   php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt
U   php/php-src/trunk/ext/standard/tests/http/bug48929.phpt

Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/http/bug48929.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/http/bug48929.phpt  
2009-08-04 02:54:10 UTC (rev 286781)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/http/bug48929.phpt  
2009-08-04 02:55:24 UTC (rev 286782)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #: duplicate \r\n sent after last header line
+Bug #48929 (duplicate \r\n sent after last header line)
 --SKIPIF--
 ?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?
 --FILE--

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt  
2009-08-04 02:54:10 UTC (rev 286781)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt  
2009-08-04 02:55:24 UTC (rev 286782)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #: duplicate \r\n sent after last header line
+Bug #48929 (duplicate \r\n sent after last header line)
 --SKIPIF--
 ?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?
 --FILE--

Modified: php/php-src/trunk/ext/standard/tests/http/bug48929.phpt
===
--- php/php-src/trunk/ext/standard/tests/http/bug48929.phpt 2009-08-04 
02:54:10 UTC (rev 286781)
+++ php/php-src/trunk/ext/standard/tests/http/bug48929.phpt 2009-08-04 
02:55:24 UTC (rev 286782)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #: duplicate \r\n sent after last header line
+Bug #48929 (duplicate \r\n sent after last header line)
 --SKIPIF--
 ?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?
 --FILE--

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_ini_scanner.l branches/PHP_5_3/ext/standard/tests/general_functions/bug48768.phpt trunk/Zend/zend_ini_scanner.l trunk/ext/

2009-08-03 Thread Jani Taskinen
jani Tue, 04 Aug 2009 02:56:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286783

Log:
- Fixed bug #48768 (parse_ini_*() crash with INI_SCANNER_RAW)

Bug: http://bugs.php.net/48768 (Verified) parse_ini_*() crash with 
INI_SCANNER_RAW
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug48768.phpt
U   php/php-src/trunk/Zend/zend_ini_scanner.l
A   php/php-src/trunk/ext/standard/tests/general_functions/bug48768.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-04 02:55:24 UTC (rev 286782)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-04 02:56:26 UTC (rev 286783)
@@ -68,6 +68,7 @@
   (Sriram Natarajan)
 - Fixed bug #48771 (rename() between volumes fails and reports no error on
   Windows). (Pierre)
+- Fixed bug #48768 (parse_ini_*() crash with INI_SCANNER_RAW). (Jani)
 - Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at
   gmail dot com, Pierre)
 - Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)

Modified: php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l
===
--- php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l2009-08-04 
02:55:24 UTC (rev 286782)
+++ php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l2009-08-04 
02:56:26 UTC (rev 286783)
@@ -315,7 +315,7 @@

 SECTION_RAW_CHARS [^\]\n\r]
 SINGLE_QUOTED_CHARS [^']
-RAW_VALUE_CHARS [^=\n\r;]
+RAW_VALUE_CHARS [^\n\r;]

 LITERAL_DOLLAR ($([^{\000]|(\\{ANY_CHAR})))
 VALUE_CHARS ([^$= \t\n\r;|~()!'\000]|{LITERAL_DOLLAR})

Added: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug48768.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug48768.phpt 
(rev 0)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug48768.phpt 
2009-08-04 02:56:26 UTC (rev 286783)
@@ -0,0 +1,31 @@
+--TEST--
+Bug #48768 (parse_ini_*() crashes with INI_SCANNER_RAW)
+--FILE--
+?php
+
+$ini_location = dirname(__FILE__) . '/bug48768.tmp';
+
+// Build ini data
+$ini_data =  EOT
+equal = =
+
+EOT;
+
+// Save ini data to file
+file_put_contents($ini_location, $ini_data);
+
+var_dump(parse_ini_file($ini_location, false, INI_SCANNER_RAW));
+var_dump(parse_ini_file($ini_location, false, INI_SCANNER_NORMAL));
+
+?
+--CLEAN--
+?php @unlink(dirname(__FILE__) . '/bug48768.tmp'); ?
+--EXPECT--
+array(1) {
+  [equal]=
+  string(1) =
+}
+array(1) {
+  [equal]=
+  string(1) =
+}

Modified: php/php-src/trunk/Zend/zend_ini_scanner.l
===
--- php/php-src/trunk/Zend/zend_ini_scanner.l   2009-08-04 02:55:24 UTC (rev 
286782)
+++ php/php-src/trunk/Zend/zend_ini_scanner.l   2009-08-04 02:56:26 UTC (rev 
286783)
@@ -315,7 +315,7 @@

 SECTION_RAW_CHARS [^\]\n\r]
 SINGLE_QUOTED_CHARS [^']
-RAW_VALUE_CHARS [^=\n\r;]
+RAW_VALUE_CHARS [^\n\r;]

 LITERAL_DOLLAR ($([^{\000]|(\\{ANY_CHAR})))
 VALUE_CHARS ([^$= \t\n\r;|~()!'\000]|{LITERAL_DOLLAR})

Added: php/php-src/trunk/ext/standard/tests/general_functions/bug48768.phpt
===
--- php/php-src/trunk/ext/standard/tests/general_functions/bug48768.phpt
(rev 0)
+++ php/php-src/trunk/ext/standard/tests/general_functions/bug48768.phpt
2009-08-04 02:56:26 UTC (rev 286783)
@@ -0,0 +1,31 @@
+--TEST--
+Bug #48768 (parse_ini_*() crashes with INI_SCANNER_RAW)
+--FILE--
+?php
+
+$ini_location = dirname(__FILE__) . '/bug48768.tmp';
+
+// Build ini data
+$ini_data =  EOT
+equal = =
+
+EOT;
+
+// Save ini data to file
+file_put_contents($ini_location, $ini_data);
+
+var_dump(parse_ini_file($ini_location, false, INI_SCANNER_RAW));
+var_dump(parse_ini_file($ini_location, false, INI_SCANNER_NORMAL));
+
+?
+--CLEAN--
+?php @unlink(dirname(__FILE__) . '/bug48768.tmp'); ?
+--EXPECT--
+array(1) {
+  [uequal]=
+  unicode(1) =
+}
+array(1) {
+  [uequal]=
+  unicode(1) =
+}

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