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

2009-01-21 Thread changelog
changelog   Thu Jan 22 01:47:19 2009 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3295r2=1.3296diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3295 php-src/ChangeLog:1.3296
--- php-src/ChangeLog:1.3295Wed Jan 21 01:35:33 2009
+++ php-src/ChangeLog   Thu Jan 22 01:47:10 2009
@@ -1,3 +1,334 @@
+2009-01-21  Dave Kelsey  d_kel...@uk.ibm.com
+
+* ext/zlib/tests/gzopen_variation8.phpt
+  ext/zlib/tests/gzseek_variation7.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation2.phpt
+  ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt:
+  correct minor mistakes in the php6 version of the zlib tests
+
+2009-01-21  Jani Taskinen  jani.taski...@sci.fi
+
+* ext/posix/config.m4:
+  - Fix typo
+
+2009-01-21  Dmitry Stogov  dmi...@zend.com
+
+* TSRM/tsrm_virtual_cwd.c
+  TSRM/tsrm_virtual_cwd.c
+  ext/standard/tests/file/fopen_variation10-win32.phpt
+  ext/standard/tests/file/fopen_variation10-win32.phpt
+  ext/standard/tests/file/fopen_variation11-win32.phpt
+  ext/standard/tests/file/fopen_variation11-win32.phpt:
+  Fixed realpath() behavior to support c:dir as c:\dir, and \dir on 
UNC
+  CWD
+
+2009-01-21  Ilia Alshanetsky  i...@prohost.org
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/base64.c
+  ext/standard/base64.c:
+  MFB: Fixed bug #47174 (base64_decode() interprets pad char in mid string 
as
+  terminator)
+
+* (PHP_5_3)
+  ext/standard/base64.c:
+  
+  Fixed bug #47174 (base64_decode() interprets pad char in mid string as
+  terminator)
+
+2009-01-21  Derick Rethans  p...@derickrethans.nl
+
+* ext/date/lib/timezonedb.h
+  ext/date/lib/timezonedb.h
+  ext/date/lib/timezonedb.h:
+  - Updated to version 2009.1 (2009a)
+
+2009-01-21  Dave Kelsey  d_kel...@uk.ibm.com
+
+* (PHP_5_2)
+  ext/zlib/tests/gzopen_variation8.phpt
+  ext/zlib/tests/gzopen_variation8.phpt
+  ext/zlib/tests/gzopen_variation9.phpt
+  ext/zlib/tests/gzopen_variation9.phpt
+  ext/zlib/tests/gzseek_variation6.phpt
+  ext/zlib/tests/gzseek_variation6.phpt
+  ext/zlib/tests/gzseek_variation7.phpt
+  ext/zlib/tests/gzseek_variation7.phpt
+  ext/zlib/tests/zlib_scheme_copy_basic.phpt
+  ext/zlib/tests/zlib_scheme_copy_basic.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation1.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation1.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation2.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation2.phpt
+  ext/zlib/tests/zlib_scheme_dir_basic.phpt
+  ext/zlib/tests/zlib_scheme_dir_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt
+  ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt
+  ext/zlib/tests/zlib_scheme_fopen_basic.phpt
+  ext/zlib/tests/zlib_scheme_fopen_basic.phpt
+  ext/zlib/tests/zlib_scheme_rename_basic.phpt
+  ext/zlib/tests/zlib_scheme_rename_basic.phpt
+  ext/zlib/tests/zlib_scheme_stat_basic.phpt
+  ext/zlib/tests/zlib_scheme_stat_basic.phpt
+  ext/zlib/tests/zlib_scheme_stat_basic2.phpt
+  ext/zlib/tests/zlib_scheme_stat_basic2.phpt
+  ext/zlib/tests/zlib_scheme_unlink_basic.phpt
+  ext/zlib/tests/zlib_scheme_unlink_basic.phpt:
+  new tests for zlib extension, tested on windows, linux and linux64
+
+* ext/zlib/tests/gzopen_variation8.phpt
+  ext/zlib/tests/gzopen_variation8.phpt
+  ext/zlib/tests/gzopen_variation8.phpt
+  ext/zlib/tests/gzopen_variation9.phpt
+  ext/zlib/tests/gzopen_variation9.phpt
+  ext/zlib/tests/gzopen_variation9.phpt
+  ext/zlib/tests/gzseek_variation6.phpt
+  ext/zlib/tests/gzseek_variation6.phpt
+  ext/zlib/tests/gzseek_variation6.phpt
+  ext/zlib/tests/gzseek_variation7.phpt
+  ext/zlib/tests/gzseek_variation7.phpt
+  ext/zlib/tests/gzseek_variation7.phpt
+  ext/zlib/tests/zlib_scheme_copy_basic.phpt
+  ext/zlib/tests/zlib_scheme_copy_basic.phpt
+  ext/zlib/tests/zlib_scheme_copy_basic.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation1.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation1.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation1.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation2.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation2.phpt
+  ext/zlib/tests/zlib_scheme_copy_variation2.phpt
+  ext/zlib/tests/zlib_scheme_dir_basic.phpt
+  ext/zlib/tests/zlib_scheme_dir_basic.phpt
+  ext/zlib/tests/zlib_scheme_dir_basic.phpt
+  

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

2009-01-21 Thread changelog
changelog   Thu Jan 22 01:48:17 2009 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1435r2=1.1436diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1435 ZendEngine2/ChangeLog:1.1436
--- ZendEngine2/ChangeLog:1.1435Wed Jan 21 01:35:50 2009
+++ ZendEngine2/ChangeLog   Thu Jan 22 01:48:13 2009
@@ -1,3 +1,14 @@
+2009-01-21  Dmitry Stogov  dmi...@zend.com
+
+* (PHP_5_2)
+  zend_compile.c
+  zend_compile.h
+  zend_vm_def.h
+  zend_vm_execute.h
+  tests/bug47165.phpt:
+  Fixed bug #47165 (Possible memory corruption when passing return value by
+  reference)
+
 2009-01-20  Dmitry Stogov  dmi...@zend.com
 
 * zend_compile.c
@@ -27655,7 +27666,7 @@
 2003-06-10  Jani Taskinen  sni...@iki.fi
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1435 2009/01/21 01:35:50 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1436 2009/01/22 01:48:13 changelog Exp $ tag
 
 2003-06-10  James Cox  ja...@imajes.info
 
@@ -29379,7 +29390,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1435 2009/01/21 01:35:50 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1436 2009/01/22 01:48:13 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  i...@prohost.org
 




[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mime_magic/tests magic.mime mime_content_type_basic.phpt mime_content_type_error.phpt mime_content_type_variation.phpt mime_content_type_variation1.phpt mime_test.

2009-01-21 Thread Dave Kelsey
dkelsey Wed Jan 21 10:46:39 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/mime_magic/tests   mime_test.png mime_test.wav 
mime_test.jpeg mime_test.html 
mime_test.bmp 
mime_content_type_variation.phpt 
magic.mime mime_test.zip 
mime_content_type_error.phpt 
mime_test.class mime_test.gif 
mime_content_type_variation1.phpt 
mime_content_type_basic.phpt 
  Log:
  Some basic tests for mime_magic. Tested on windows only
  

http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/tests/mime_test.wav?view=markuprev=1.1
Index: php-src/ext/mime_magic/tests/mime_test.wav
+++ php-src/ext/mime_magic/tests/mime_test.wav

http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/tests/mime_test.html?view=markuprev=1.1
Index: php-src/ext/mime_magic/tests/mime_test.html
+++ php-src/ext/mime_magic/tests/mime_test.html

http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/tests/mime_test.bmp?view=markuprev=1.1
Index: php-src/ext/mime_magic/tests/mime_test.bmp
+++ php-src/ext/mime_magic/tests/mime_test.bmp

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

http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/tests/magic.mime?view=markuprev=1.1
Index: php-src/ext/mime_magic/tests/magic.mime
+++ php-src/ext/mime_magic/tests/magic.mime

http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/tests/mime_test.zip?view=markuprev=1.1
Index: php-src/ext/mime_magic/tests/mime_test.zip
+++ php-src/ext/mime_magic/tests/mime_test.zip

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

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

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



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



[PHP-CVS] cvs: php-src /ext/date/tests strftime_basic.phpt strftime_error.phpt strftime_variation1.phpt strftime_variation10.phpt strftime_variation11.phpt strftime_variation12.phpt strftime_variation

2009-01-21 Thread Sanjay Mantoor
smantoorWed Jan 21 10:49:42 2009 UTC

  Added files: 
/php-src/ext/date/tests strftime_basic.phpt 
strftime_variation20.phpt 
strftime_variation10.phpt 
strftime_variation22.phpt 
strftime_variation12.phpt 
strftime_variation14.phpt 
strftime_variation16.phpt 
strftime_variation18.phpt 
strftime_variation1.phpt 
strftime_variation3.phpt 
strftime_variation5.phpt 
strftime_variation7.phpt 
strftime_variation9.phpt 
strftime_error.phpt 
strftime_variation21.phpt 
strftime_variation11.phpt 
strftime_variation23.phpt 
strftime_variation13.phpt 
strftime_variation15.phpt 
strftime_variation17.phpt 
strftime_variation19.phpt 
strftime_variation2.phpt 
strftime_variation4.phpt 
strftime_variation6.phpt 
strftime_variation8.phpt 
  Log:
  New testcases for strftime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_basic.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_basic.phpt
+++ php-src/ext/date/tests/strftime_basic.phpt
--TEST--
Test strftime() function : basic functionality 
--FILE--
?php
/* Prototype  : string strftime(string format [, int timestamp])
 * Description: Format a local time/date according to locale settings 
 * Source code: ext/date/php_date.c
 * Alias to functions: 
 */

echo *** Testing strftime() : basic functionality ***\n;

date_default_timezone_set(Asia/Calcutta);
// Initialise all required variables
$format = '%b %d %Y %H:%M:%S';
$timestamp = mktime(8, 8, 8, 8, 8, 2008);

// Calling strftime() with all possible arguments
var_dump( strftime($format, $timestamp) );

// Calling strftime() with mandatory arguments
var_dump( strftime($format) );

?
===DONE===
--EXPECTF--
*** Testing strftime() : basic functionality ***
unicode(20) Aug 08 2008 08:08:08
unicode(%d) %s %d %d %d:%d:%d
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation20.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_variation20.phpt
+++ php-src/ext/date/tests/strftime_variation20.phpt
--TEST--
Test strftime() function : usage variation - Checking newline and tab formats 
which are supported other than on Windows.
--SKIPIF--
?php
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
die(skip Test is not valid for Windows);
}
?
--FILE--
?php
/* Prototype  : string strftime(string format [, int timestamp])
 * Description: Format a local time/date according to locale settings 
 * Source code: ext/date/php_date.c
 * Alias to functions: 
 */

echo *** Testing strftime() : usage variation ***\n;

// Initialise function arguments not being substituted (if any)
locale_set_default(en_US);
date_default_timezone_set(Asia/Calcutta);
$timestamp = mktime(8, 8, 8, 8, 8, 2008);

//array of values to iterate over
$inputs = array(
  'Newline character' = %n,
  'Tab character' = %t
);

// loop through each element of the array for timestamp

foreach($inputs as $key =$value) {
  echo \n--$key--\n;
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
} 

?
===DONE===
--EXPECTREGEX--
\*\*\* Testing strftime\(\) : usage variation \*\*\*

--Newline character--
unicode\(1\) 

unicode\(1\) 


--Tab character--
unicode\(1\) \s
unicode\(1\) \s
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation10.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_variation10.phpt
+++ php-src/ext/date/tests/strftime_variation10.phpt
--TEST--
Test strftime() function : usage variation - Checking week related formats 
which are supported other than on Windows.
--SKIPIF--
?php
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
die(skip Test is not valid for Windows);
}
?
--FILE--
?php
/* Prototype  : string strftime(string format [, int timestamp])
 * Description: Format a local time/date according to locale settings 
 * Source code: ext/date/php_date.c
 * Alias to functions: 
 */

echo *** Testing strftime() : usage variation ***\n;

// Initialise function arguments not being substituted (if any)
locale_set_default(en_US);
date_default_timezone_set(Asia/Calcutta);
$timestamp = mktime(8, 8, 8, 8, 8, 2008);

//array of values to iterate over
$inputs = array(
  'The ISO 8601:1988 week 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests strftime_basic.phpt strftime_error.phpt strftime_variation1.phpt strftime_variation10.phpt strftime_variation11.phpt strftime_variation12.phpt strftime_

2009-01-21 Thread Sanjay Mantoor
smantoorWed Jan 21 10:52:38 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests strftime_basic.phpt 
strftime_variation2.phpt 
strftime_variation20.phpt 
strftime_variation10.phpt 
strftime_variation22.phpt 
strftime_variation4.phpt 
strftime_variation12.phpt 
strftime_variation6.phpt 
strftime_variation14.phpt 
strftime_variation8.phpt 
strftime_variation16.phpt 
strftime_variation18.phpt 
strftime_error.phpt 
strftime_variation1.phpt 
strftime_variation21.phpt 
strftime_variation3.phpt 
strftime_variation11.phpt 
strftime_variation23.phpt 
strftime_variation5.phpt 
strftime_variation13.phpt 
strftime_variation7.phpt 
strftime_variation15.phpt 
strftime_variation9.phpt 
strftime_variation17.phpt 
strftime_variation19.phpt 
  Log:
  New testcases for strftime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_basic.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_basic.phpt
+++ php-src/ext/date/tests/strftime_basic.phpt
--TEST--
Test strftime() function : basic functionality 
--FILE--
?php
/* Prototype  : string strftime(string format [, int timestamp])
 * Description: Format a local time/date according to locale settings 
 * Source code: ext/date/php_date.c
 * Alias to functions: 
 */

echo *** Testing strftime() : basic functionality ***\n;

date_default_timezone_set(Asia/Calcutta);
// Initialise all required variables
$format = '%b %d %Y %H:%M:%S';
$timestamp = mktime(8, 8, 8, 8, 8, 2008);

// Calling strftime() with all possible arguments
var_dump( strftime($format, $timestamp) );

// Calling strftime() with mandatory arguments
var_dump( strftime($format) );

?
===DONE===
--EXPECTF--
*** Testing strftime() : basic functionality ***
unicode(20) Aug 08 2008 08:08:08
unicode(%d) %s %d %d %d:%d:%d
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_variation2.phpt
+++ php-src/ext/date/tests/strftime_variation2.phpt
--TEST--
Test strftime() function : usage variation - Passing unexpected values to 
second argument 'timestamp'.
--FILE--
?php
/* Prototype  : string strftime(string format [, int timestamp])
 * Description: Format a local time/date according to locale settings 
 * Source code: ext/date/php_date.c
 * Alias to functions: 
 */

echo *** Testing strftime() : usage variation ***\n;

date_default_timezone_set(Asia/Calcutta);
// Initialise all required variables
$format = '%b %d %Y %H:%M:%S';

//get an unset variable
$unset_var = 10;
unset ($unset_var);

// define some classes
class classWithToString
{
public function __toString() {
return Class A object;
}
}

class classWithoutToString
{
}

// heredoc string
$heredoc = EOT
hello world
EOT;

// add arrays
$index_array = array (1, 2, 3);
$assoc_array = array ('one' = 1, 'two' = 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' = 10.5,
  'float -10.5' = -10.5,
  'float .5' = .5,

  // array data
  'empty array' = array(),
  'int indexed array' = $index_array,
  'associative array' = $assoc_array,
  'nested arrays' = array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' = NULL,
  'lowercase null' = null,

  // boolean data
  'lowercase true' = true,
  'lowercase false' =false,
  'uppercase TRUE' =TRUE,
  'uppercase FALSE' =FALSE,

  // empty data
  'empty string DQ' = ,
  'empty string SQ' = '',

  // string data
  'string DQ' = string,
  'string SQ' = 'string',
  'mixed case string' = sTrInG,
  'heredoc' = $heredoc,

  // object data
  'instance of classWithToString' = new classWithToString(),
  'instance of classWithoutToString' = new classWithoutToString(),

  // undefined data
  'undefined var' = @$undefined_var,

  // unset data
  'unset var' = @$unset_var,
);

// loop through each element of the array for timestamp

foreach($inputs as $key =$value) {
  echo \n--$key--\n;
  var_dump( strftime($format, $value) );
};

?
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***


[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests strftime_basic.phpt strftime_error.phpt strftime_variation1.phpt strftime_variation10.phpt strftime_variation11.phpt strftime_variation12.phpt strftime_

2009-01-21 Thread Sanjay Mantoor
smantoorWed Jan 21 10:51:04 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests strftime_variation14.phpt 
strftime_variation3.phpt 
strftime_variation16.phpt 
strftime_variation5.phpt 
strftime_variation18.phpt 
strftime_variation7.phpt 
strftime_variation9.phpt 
strftime_error.phpt 
strftime_variation21.phpt 
strftime_variation11.phpt 
strftime_variation23.phpt 
strftime_variation13.phpt 
strftime_variation2.phpt 
strftime_variation15.phpt 
strftime_variation4.phpt 
strftime_variation17.phpt 
strftime_variation6.phpt 
strftime_variation19.phpt 
strftime_variation8.phpt 
strftime_basic.phpt 
strftime_variation20.phpt 
strftime_variation10.phpt 
strftime_variation22.phpt 
strftime_variation12.phpt 
strftime_variation1.phpt 
  Log:
  New testcases for strftime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation14.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_variation14.phpt
+++ php-src/ext/date/tests/strftime_variation14.phpt
--TEST--
Test strftime() function : usage variation - Checking date related formats 
which are supported other than on Windows.
--SKIPIF--
?php
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
die(skip Test is not valid for Windows);
}
?
--FILE--
?php
/* Prototype  : string strftime(string format [, int timestamp])
 * Description: Format a local time/date according to locale settings 
 * Source code: ext/date/php_date.c
 * Alias to functions: 
 */

echo *** Testing strftime() : usage variation ***\n;

// Initialise function arguments not being substituted (if any)
locale_set_default(en_US);
date_default_timezone_set(Asia/Calcutta);
$timestamp = mktime(8, 8, 8, 8, 8, 2008);

//array of values to iterate over
$inputs = array(
  'Century number' = %C,
  'Month Date Year' = %D,
  'Year with century' = %G,
  'Year without century' = %g,
);

// loop through each element of the array for timestamp

foreach($inputs as $key =$value) {
  echo \n--$key--\n;
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
} 

?
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--Century number--
unicode(%d) %d
unicode(2) 20

--Month Date Year--
unicode(%d) %d/%d/%d
unicode(8) 08/08/08

--Year with century--
unicode(%d) %d
unicode(4) 2008

--Year without century--
unicode(%d) %d
unicode(2) 08
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_variation3.phpt
+++ php-src/ext/date/tests/strftime_variation3.phpt
--TEST--
Test strftime() function : usage variation - Passing week related format 
strings to format argument.
--FILE--
?php
/* Prototype  : string strftime(string format [, int timestamp])
 * Description: Format a local time/date according to locale settings 
 * Source code: ext/date/php_date.c
 * Alias to functions: 
 */

echo *** Testing strftime() : usage variation ***\n;

date_default_timezone_set(Asia/Calcutta);
// Initialise function arguments not being substituted (if any)
$timestamp = mktime(8, 8, 8, 8, 8, 2008);

//array of values to iterate over
$inputs = array(
  'Abbreviated weekday name' = %a,
  'Full weekday name' = %A,
  'Week number of the year' = %U,
  'Week number of the year in decimal number' = %W,  
);
// loop through each element of the array for timestamp

foreach($inputs as $key =$value) {
  echo \n--$key--\n;
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
};

?
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--Abbreviated weekday name--
unicode(%d) %s
unicode(3) Fri

--Full weekday name--
unicode(%d) %s
unicode(6) Friday

--Week number of the year--
unicode(%d) %d
unicode(2) 31

--Week number of the year in decimal number--
unicode(%d) %d
unicode(2) 31
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation16.phpt?view=markuprev=1.1
Index: php-src/ext/date/tests/strftime_variation16.phpt
+++ php-src/ext/date/tests/strftime_variation16.phpt
--TEST--
Test strftime() function : usage variation - Checking time 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/zlib/tests gzencode_variation2.phpt

2009-01-21 Thread andy wharmby
wharmby Wed Jan 21 11:39:11 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/zlib/tests gzencode_variation2.phpt 
  Log:
  New gzencode() test. php6 tets fails currentlly due to #47178. Tested on 
Windows, Linux and Linux 64 bit
  

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



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



[PHP-CVS] cvs: php-src /ext/zlib/tests gzencode_variation2-win32.phpt gzencode_variation2.phpt

2009-01-21 Thread andy wharmby
wharmby Wed Jan 21 11:39:13 2009 UTC

  Added files: 
/php-src/ext/zlib/tests gzencode_variation2-win32.phpt 

  Modified files:  
/php-src/ext/zlib/tests gzencode_variation2.phpt 
  Log:
  New gzencode() test. php6 tets fails currentlly due to #47178. Tested on 
Windows, Linux and Linux 64 bit
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzencode_variation2.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/zlib/tests/gzencode_variation2.phpt
diff -u /dev/null php-src/ext/zlib/tests/gzencode_variation2.phpt:1.2
--- /dev/null   Wed Jan 21 11:39:13 2009
+++ php-src/ext/zlib/tests/gzencode_variation2.phpt Wed Jan 21 11:39:12 2009
@@ -0,0 +1,42 @@
+--TEST--
+Test gzencode() function : variation - verify header contents with all 
encoding modes
+--XFAIL--
+Test will fail until bug #47178 resolved; missing gzip headers whne 
FORCE_DEFLATE specified
+--SKIPIF--
+?php 
+
+if( substr(PHP_OS, 0, 3) == WIN ) {
+  die(skip.. Do not run on Windows);
+}
+
+if (!extension_loaded(zlib)) {
+   print skip - ZLIB extension not loaded; 
+}   
+? 
+--FILE--
+?php
+/* Prototype  : string gzencode  ( string $data  [, int $level  [, int 
$encoding_mode  ]] )
+ * Description: Gzip-compress a string 
+ * Source code: ext/zlib/zlib.c
+ * Alias to functions: 
+ */
+
+echo *** Testing gzencode() : variation ***\n;
+
+$data = A small string to encode\n;
+
+echo \n-- Testing with each encoding_mode  --\n;
+var_dump(bin2hex(gzencode(b$data, -1)));
+var_dump(bin2hex(gzencode(b$data, -1, FORCE_GZIP)));  
+var_dump(bin2hex(gzencode(b$data, -1, FORCE_DEFLATE)));
+
+?
+===DONE===
+--EXPECTF--
+*** Testing gzencode() : variation ***
+
+-- Testing with each encoding_mode  --
+unicode(90) 
1f8b0803735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900
+unicode(90) 
1f8b0803735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900
+unicode(86) 
1f8b0803789c735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200735808cd
+===DONE===
\ No newline at end of file

http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzencode_variation2-win32.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzencode_variation2-win32.phpt
+++ php-src/ext/zlib/tests/gzencode_variation2-win32.phpt
--TEST--
Test gzencode() function : variation - verify header contents with all encoding 
modes
--XFAIL--
Test will fail until bug #47178 resolved; missing gzip headers whne 
FORCE_DEFLATE specified
--SKIPIF--
?php 

if( substr(PHP_OS, 0, 3) != WIN ) {
  die(skip.. only for Windows);
}

if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
? 
--FILE--
?php
/* Prototype  : string gzencode  ( string $data  [, int $level  [, int 
$encoding_mode  ]] )
 * Description: Gzip-compress a string 
 * Source code: ext/zlib/zlib.c
 * Alias to functions: 
 */

echo *** Testing gzencode() : variation ***\n;

$data = A small string to encode\n;

echo \n-- Testing with each encoding_mode  --\n;
var_dump(bin2hex(gzencode(b$data, -1)));
var_dump(bin2hex(gzencode(b$data, -1, FORCE_GZIP)));  
var_dump(bin2hex(gzencode(b$data, -1, FORCE_DEFLATE)));

?
===DONE===
--EXPECTF--
*** Testing gzencode() : variation ***

-- Testing with each encoding_mode  --
unicode(90) 
1f8b080b735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900
unicode(90) 
1f8b080b735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900
unicode(86) 
1f8b080b789c735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200735808cd
===DONE===


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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/zlib/tests gzencode_variation2.phpt

2009-01-21 Thread andy wharmby
wharmby Wed Jan 21 11:39:14 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/zlib/tests gzencode_variation2.phpt 
  Log:
  New gzencode() test. php6 tets fails currentlly due to #47178. Tested on 
Windows, Linux and Linux 64 bit
  

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



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



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

2009-01-21 Thread Felipe Pena
Hello,

Em Qua, 2009-01-21 às 08:21 +0100, Kalle Sommer Nielsen escreveu:
 Hi Felipe
 
 2009/1/20 Felipe Pena fel...@php.net:
  felipe  Tue Jan 20 20:28:05 2009 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-srcNEWS
   Log:
   BFN #47087
 
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.470r2=1.2027.2.547.2.965.2.471diff_format=u
  Index: php-src/NEWS
  diff -u php-src/NEWS:1.2027.2.547.2.965.2.470 
  php-src/NEWS:1.2027.2.547.2.965.2.471
  --- php-src/NEWS:1.2027.2.547.2.965.2.470   Tue Jan 20 11:22:43 2009
  +++ php-src/NEWSTue Jan 20 20:28:04 2009
  @@ -53,6 +53,7 @@
   - Fixed bug #47145 + #47159 (Always free failed SQLite statements). (Scott)
   - Fixed bug #47141 (Unable to fetch error messages from SQLite
when the database can't be opened). (Scott)
  +- Fixed bug #47087 (Second parameter of mssql_fetch_array()). (Felipe)
   - Fixed bug #47050 (mysqli_poll() modifies improper variables). (Johannes)
   - Fixed bug #47045 (SplObjectStorage instances compared with ==). (Etienne)
   - Fixed bug #46979 (use with non-compound name *has* effect). (Dmitry)
 
 Should this have a NEWS entry if it was introduced in one of the alpha's?
 

I think so. If not, all entry related to namespace, sqlite3, mysqlnd
stuff, etc. need be removed too?

-- 
Regards,
Felipe Pena


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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/zlib/tests gzuncompress_error1.phpt

2009-01-21 Thread andy wharmby
wharmby Wed Jan 21 12:28:33 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/zlib/tests gzuncompress_error1.phpt 
  Log:
  New gzuncompress() test. php6 tets fails currentlly due to #47179. Tested on 
Windows, Linux and Linux 64 bit
  

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



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



[PHP-CVS] cvs: php-src /ext/zlib/tests gzuncompress_error1.phpt

2009-01-21 Thread andy wharmby
wharmby Wed Jan 21 12:28:34 2009 UTC

  Modified files:  
/php-src/ext/zlib/tests gzuncompress_error1.phpt 
  Log:
  New gzuncompress() test. php6 tets fails currentlly due to #47179. Tested on 
Windows, Linux and Linux 64 bit
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzuncompress_error1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/zlib/tests/gzuncompress_error1.phpt
diff -u /dev/null php-src/ext/zlib/tests/gzuncompress_error1.phpt:1.2
--- /dev/null   Wed Jan 21 12:28:34 2009
+++ php-src/ext/zlib/tests/gzuncompress_error1.phpt Wed Jan 21 12:28:33 2009
@@ -0,0 +1,93 @@
+--TEST--
+Test gzuncompress() function : error conditions 
+--XFAIL--
+Test will fail until bug #47179 resolved; no error when $length too small 
+--SKIPIF--
+?php 
+if (!extension_loaded(zlib)) {
+   print skip - ZLIB extension not loaded; 
+}   
+?
+--FILE--
+?php
+/* Prototype  : string gzuncompress(string data [, int length])
+ * Description: Unzip a gzip-compressed string 
+ * Source code: ext/zlib/zlib.c
+ * Alias to functions: 
+ */
+
+
+
+echo *** Testing gzuncompress() : error conditions ***\n;
+
+// Zero arguments
+echo \n-- Testing gzuncompress() function with Zero arguments --\n;
+var_dump( gzuncompress() );
+
+//Test gzuncompress with one more than the expected number of arguments
+echo \n-- Testing gzuncompress() function with more than expected no. of 
arguments --\n;
+$data = 'string_val';
+$length = 10;
+$extra_arg = 10;
+var_dump( gzuncompress($data, $length, $extra_arg) );
+
+echo \n-- Testing with Unicode string --\n;
+var_dump(gzuncompress($data, $length));
+
+
+echo \n-- Testing with a buffer that is too small --\n;
+$short_len = strlen($data) - 1;
+$compressed = gzcompress(b$data);
+
+var_dump(gzuncompress($compressed, $short_len));
+
+
+echo \n-- Testing with incorrect arguments --\n;
+var_dump(gzuncompress(123));
+
+class Tester {
+function Hello() {
+echo Hello\n; 
+}
+}
+
+$testclass = new Tester();
+var_dump(gzuncompress($testclass));
+
+var_dump(gzuncompress($compressed, this is not a number\n));
+
+?
+===DONE===
+--EXPECTF--
+*** Testing gzuncompress() : error conditions ***
+
+-- Testing gzuncompress() function with Zero arguments --
+
+Warning: gzuncompress() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing gzuncompress() function with more than expected no. of arguments --
+
+Warning: gzuncompress() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
+-- Testing with Unicode string --
+
+Warning: gzuncompress() expects parameter 1 to be strictly a binary string, 
Unicode string given in %s on line %d
+NULL
+
+-- Testing with a buffer that is too small --
+Warning: gzuncompress(): buffer error in %s on line %d
+bool(false)
+
+-- Testing with incorrect arguments --
+
+Warning: gzuncompress(): data error in %s on line %d
+bool(false)
+
+Warning: gzuncompress() expects parameter 1 to be binary string, object given 
in %s on line %d
+NULL
+
+Warning: gzuncompress() expects parameter 2 to be long, Unicode string given 
in %s on line %d
+NULL
+===DONE===
\ No newline at end of file



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/zlib/tests gzuncompress_error1.phpt

2009-01-21 Thread andy wharmby
wharmby Wed Jan 21 12:28:35 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/zlib/tests gzuncompress_error1.phpt 
  Log:
  New gzuncompress() test. php6 tets fails currentlly due to #47179. Tested on 
Windows, Linux and Linux 64 bit
  

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



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



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

2009-01-21 Thread Antony Dovgal
tony2001Wed Jan 21 12:49:41 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings sprintf_variation52.phpt 
printf_64bit.phpt 
  Log:
  fix tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation52.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/strings/sprintf_variation52.phpt
diff -u php-src/ext/standard/tests/strings/sprintf_variation52.phpt:1.1.2.1 
php-src/ext/standard/tests/strings/sprintf_variation52.phpt:1.1.2.2
--- php-src/ext/standard/tests/strings/sprintf_variation52.phpt:1.1.2.1 Sat Sep 
29 14:13:53 2007
+++ php-src/ext/standard/tests/strings/sprintf_variation52.phpt Wed Jan 21 
12:49:39 2009
@@ -46,6 +46,8 @@
 string(1) %
 
 -- Testing for precision value more than maximum --
+
+Notice: sprintf(): Requested precision of 988 digits was truncated to PHP 
maximum of %d digits in %s on line %d
 string(52) 12345678900.
 
 -- Testing for invalid width(-15) specifier --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/printf_64bit.phpt?r1=1.1.2.5r2=1.1.2.6diff_format=u
Index: php-src/ext/standard/tests/strings/printf_64bit.phpt
diff -u php-src/ext/standard/tests/strings/printf_64bit.phpt:1.1.2.5 
php-src/ext/standard/tests/strings/printf_64bit.phpt:1.1.2.6
--- php-src/ext/standard/tests/strings/printf_64bit.phpt:1.1.2.5Thu Sep 
18 13:26:05 2008
+++ php-src/ext/standard/tests/strings/printf_64bit.phptWed Jan 21 
12:49:39 2009
@@ -669,6 +669,8 @@
 %
 
 *** Output for precision value more than maximum ***
+
+Notice: printf(): Requested precision of 988 digits was truncated to PHP 
maximum of %d digits in %s on line %d
 12345678900.
 
 *** Output for invalid width(-15) specifier ***



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



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

2009-01-21 Thread Antony Dovgal
tony2001Wed Jan 21 12:50:10 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings sprintf_variation52.phpt 
printf_64bit.phpt 
  Log:
  fix tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation52.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u
Index: php-src/ext/standard/tests/strings/sprintf_variation52.phpt
diff -u php-src/ext/standard/tests/strings/sprintf_variation52.phpt:1.2.2.2 
php-src/ext/standard/tests/strings/sprintf_variation52.phpt:1.2.2.3
--- php-src/ext/standard/tests/strings/sprintf_variation52.phpt:1.2.2.2 Sat Sep 
29 16:54:57 2007
+++ php-src/ext/standard/tests/strings/sprintf_variation52.phpt Wed Jan 21 
12:50:10 2009
@@ -46,6 +46,8 @@
 string(1) %
 
 -- Testing for precision value more than maximum --
+
+Notice: sprintf(): Requested precision of 988 digits was truncated to PHP 
maximum of %d digits in %s on line %d
 string(52) 12345678900.
 
 -- Testing for invalid width(-15) specifier --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/printf_64bit.phpt?r1=1.1.2.4.2.2r2=1.1.2.4.2.3diff_format=u
Index: php-src/ext/standard/tests/strings/printf_64bit.phpt
diff -u php-src/ext/standard/tests/strings/printf_64bit.phpt:1.1.2.4.2.2 
php-src/ext/standard/tests/strings/printf_64bit.phpt:1.1.2.4.2.3
--- php-src/ext/standard/tests/strings/printf_64bit.phpt:1.1.2.4.2.2Tue Sep 
16 13:41:34 2008
+++ php-src/ext/standard/tests/strings/printf_64bit.phptWed Jan 21 
12:50:10 2009
@@ -669,6 +669,8 @@
 %
 
 *** Output for precision value more than maximum ***
+
+Notice: printf(): Requested precision of 988 digits was truncated to PHP 
maximum of %d digits in %s on line %d
 12345678900.
 
 *** Output for invalid width(-15) specifier ***



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



[PHP-CVS] cvs: php-src /ext/zlib/tests gzopen_variation8.phpt gzopen_variation9.phpt gzseek_variation6.phpt gzseek_variation7.phpt zlib_scheme_copy_basic.phpt zlib_scheme_copy_variation1.phpt zlib_sch

2009-01-21 Thread Dave Kelsey
dkelsey Wed Jan 21 15:24:11 2009 UTC

  Added files: 
/php-src/ext/zlib/tests zlib_scheme_file_get_contents_basic.phpt 
gzseek_variation6.phpt 
zlib_scheme_fopen_basic.phpt 
zlib_scheme_stat_basic.phpt 
zlib_scheme_file_read_file_basic.phpt 
zlib_scheme_copy_basic.phpt 
zlib_scheme_copy_variation1.phpt 
zlib_scheme_dir_basic.phpt 
zlib_scheme_copy_variation2.phpt 
zlib_scheme_file_basic.phpt 
zlib_scheme_stat_basic2.phpt 
gzseek_variation7.phpt 
zlib_scheme_unlink_basic.phpt 
zlib_scheme_rename_basic.phpt 
zlib_scheme_file_put_contents_basic.phpt 
gzopen_variation9.phpt 
gzopen_variation8.phpt 
  Log:
  new tests for zlib extension, tested on windows, linux and linux64
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt
--TEST--
Test compress.zlib:// scheme with the file_get_contents
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$inputFileName = dirname(__FILE__)./004.txt.gz;
$srcFile = compress.zlib://$inputFileName;
$contents = file_get_contents($srcFile);
echo $contents;
?
===DONE===
--EXPECT--
When you're taught through feelings
Destiny flying high above
all I know is that you can realize it
Destiny who cares
as it turns around
and I know that it descends down on me
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzseek_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzseek_variation6.phpt
+++ php-src/ext/zlib/tests/gzseek_variation6.phpt
--TEST--
Test function gzseek() by calling it with SEEK_END when reading
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$f = dirname(__FILE__)./004.txt.gz;
$h = gzopen($f, 'r');
// move 40 bytes 
echo move 40 bytes\n;
gzread($h, 40);
echo tell=;
var_dump(gztell($h));
echo move to the end\n;
var_dump(gzseek( $h, 0, SEEK_END ) );
echo tell=;
var_dump(gztell($h));
echo eof=;
var_dump(gzeof($h));
//read the next 10
var_dump(gzread($h, 10));
gzclose($h);
?
===DONE===
--EXPECTF--
move 40 bytes
tell=int(40)
move to the end

Warning: gzseek(): SEEK_END is not supported in %s on line %d
int(-1)
tell=int(40)
eof=bool(false)
string(10) iny flying
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_fopen_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_fopen_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_fopen_basic.phpt
--TEST--
Test compress.zlib:// scheme with the fopen
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$inputFileName = dirname(__FILE__)./004.txt.gz;
$srcFile = compress.zlib://$inputFileName;
$h = fopen($srcFile, 'r');
fpassthru($h);
fclose($h);
?
===DONE===
--EXPECT--
When you're taught through feelings
Destiny flying high above
all I know is that you can realize it
Destiny who cares
as it turns around
and I know that it descends down on me
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt
--TEST--
Test compress.zlib:// scheme with the unlink function
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$inputFileName = dirname(__FILE__)./004.txt.gz;
$srcFile = compress.zlib://$inputFileName;
stat($srcFile);
lstat($srcFile);
?
===DONE===
--EXPECTF--

Warning: stat(): stat failed for compress.zlib://%s/004.txt.gz in %s on line %d

Warning: lstat(): Lstat failed for compress.zlib://%s/004.txt.gz in %s on line 
%d
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt
--TEST--
Test compress.zlib:// scheme with the file_get_contents
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$inputFileName = dirname(__FILE__)./004.txt.gz;
$srcFile = compress.zlib://$inputFileName;
readfile($srcFile);
?
===DONE===
--EXPECT--
When you're 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/zlib/tests gzopen_variation8.phpt gzopen_variation9.phpt gzseek_variation6.phpt gzseek_variation7.phpt zlib_scheme_copy_basic.phpt zlib_scheme_copy_variation1.phpt

2009-01-21 Thread Dave Kelsey
dkelsey Wed Jan 21 15:24:14 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/zlib/tests zlib_scheme_stat_basic.phpt 
gzseek_variation7.phpt 
gzopen_variation8.phpt 
gzseek_variation6.phpt 
zlib_scheme_fopen_basic.phpt 
zlib_scheme_stat_basic2.phpt 
zlib_scheme_copy_basic.phpt 
zlib_scheme_copy_variation1.phpt 
zlib_scheme_file_get_contents_basic.phpt 
zlib_scheme_file_basic.phpt 
zlib_scheme_file_put_contents_basic.phpt 
zlib_scheme_unlink_basic.phpt 
zlib_scheme_file_read_file_basic.phpt 
zlib_scheme_rename_basic.phpt 
zlib_scheme_copy_variation2.phpt 
gzopen_variation9.phpt 
zlib_scheme_dir_basic.phpt 
  Log:
  new tests for zlib extension, tested on windows, linux and linux64
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt
--TEST--
Test compress.zlib:// scheme with the unlink function
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$inputFileName = dirname(__FILE__)./004.txt.gz;
$srcFile = compress.zlib://$inputFileName;
stat($srcFile);
lstat($srcFile);
?
===DONE===
--EXPECTF--

Warning: stat(): stat failed for compress.zlib://%s/004.txt.gz in %s on line %d

Warning: lstat(): Lstat failed for compress.zlib://%s/004.txt.gz in %s on line 
%d
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzseek_variation7.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzseek_variation7.phpt
+++ php-src/ext/zlib/tests/gzseek_variation7.phpt
--TEST--
Test function gzseek() by calling it with SEEK_END when writing
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$f = temp3.txt.gz;
$h = gzopen($f, 'w'); 
$str1 = This is the first line.;
$str2 = This is the second line.;
gzwrite($h, $str1);
echo tell=;
var_dump(gztell($h));

//seek to the end which is not sensible of course.
echo move to the end of the file\n;
var_dump(gzseek($h, 0, SEEK_END));
echo tell=;
var_dump(gztell($h));
gzwrite($h, $str2);
echo tell=;
var_dump(gztell($h));
gzclose($h);
echo \nreading the output file\n;
$h = gzopen($f, 'r');
gzpassthru($h);
gzclose($h);
echo \n;
unlink($f);
?
===DONE===
--EXPECTF--
tell=int(23)
move to the end of the file

Warning: gzseek(): SEEK_END is not supported in %s on line %d
int(-1)
tell=int(23)
tell=int(47)

reading the output file
This is the first line.This is the second line.
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzopen_variation8.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzopen_variation8.phpt
+++ php-src/ext/zlib/tests/gzopen_variation8.phpt
--TEST--
Test gzopen() function : variation: opening a plain file
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
/* Prototype  : resource gzopen(string filename, string mode [, int 
use_include_path])
 * Description: Open a .gz-file and return a .gz-file pointer 
 * Source code: ext/zlib/zlib.c
 * Alias to functions: 
 */

echo *** Testing gzopen() : variation ***\n;

$data = EOT
Here is some plain
text to be read
and displayed.
EOT;

$file = gzopen_variation8.tmp;
$h = fopen($file, 'w');
fwrite($h, $data);
fclose($h);

$h = gzopen($file, 'r');
gzpassthru($h);
gzclose($h);
echo \n;
unlink($file);
?
===DONE===
--EXPECT--
*** Testing gzopen() : variation ***
Here is some plain
text to be read
and displayed.
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzseek_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzseek_variation6.phpt
+++ php-src/ext/zlib/tests/gzseek_variation6.phpt
--TEST--
Test function gzseek() by calling it with SEEK_END when reading
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$f = dirname(__FILE__)./004.txt.gz;
$h = gzopen($f, 'r');
// move 40 bytes 
echo move 40 bytes\n;
gzread($h, 40);
echo tell=;
var_dump(gztell($h));
echo move to the end\n;
var_dump(gzseek( $h, 0, SEEK_END ) );
echo tell=;
var_dump(gztell($h));
echo eof=;
var_dump(gzeof($h));
//read the next 10
var_dump(gzread($h, 10));
gzclose($h);
?
===DONE===
--EXPECTF--
move 40 bytes
tell=int(40)
move to the end

Warning: gzseek(): SEEK_END is not supported in %s on line %d
int(-1)
tell=int(40)
eof=bool(false)
string(10) iny 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/zlib/tests gzopen_variation8.phpt gzopen_variation9.phpt gzseek_variation6.phpt gzseek_variation7.phpt zlib_scheme_copy_basic.phpt zlib_scheme_copy_variation1.phpt

2009-01-21 Thread Dave Kelsey
dkelsey Wed Jan 21 15:24:18 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/zlib/tests zlib_scheme_file_put_contents_basic.phpt 
gzseek_variation7.phpt 
zlib_scheme_dir_basic.phpt 
zlib_scheme_stat_basic.phpt 
zlib_scheme_rename_basic.phpt 
zlib_scheme_fopen_basic.phpt 
gzseek_variation6.phpt 
zlib_scheme_file_read_file_basic.phpt 
gzopen_variation9.phpt 
zlib_scheme_copy_variation1.phpt 
zlib_scheme_file_basic.phpt 
zlib_scheme_copy_variation2.phpt 
zlib_scheme_unlink_basic.phpt 
zlib_scheme_copy_basic.phpt 
gzopen_variation8.phpt 
zlib_scheme_stat_basic2.phpt 
zlib_scheme_file_get_contents_basic.phpt 
  Log:
  new tests for zlib extension, tested on windows, linux and linux64
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
--TEST--
Test compress.zlib:// scheme with the file_get_contents
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$outputFileName = __FILE__.'tmp';
$outFile = compress.zlib://$outputFileName;
$data = EOT
Here is some plain
text to be read
and displayed.
EOT;

file_put_contents($outFile, $data);
$h = gzopen($outputFileName, 'r');
gzpassthru($h);
gzclose($h);
echo \n;
unlink($outputFileName);
?
===DONE===
--EXPECT--
Here is some plain
text to be read
and displayed.
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzseek_variation7.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzseek_variation7.phpt
+++ php-src/ext/zlib/tests/gzseek_variation7.phpt
--TEST--
Test function gzseek() by calling it with SEEK_END when writing
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$f = temp3.txt.gz;
$h = gzopen($f, 'w'); 
$str1 = This is the first line.;
$str2 = This is the second line.;
gzwrite($h, $str1);
echo tell=;
var_dump(gztell($h));

//seek to the end which is not sensible of course.
echo move to the end of the file\n;
var_dump(gzseek($h, 0, SEEK_END));
echo tell=;
var_dump(gztell($h));
gzwrite($h, $str2);
echo tell=;
var_dump(gztell($h));
gzclose($h);
echo \nreading the output file\n;
$h = gzopen($f, 'r');
gzpassthru($h);
gzclose($h);
echo \n;
unlink($f);
?
===DONE===
--EXPECTF--
tell=int(23)
move to the end of the file

Warning: gzseek(): SEEK_END is not supported in %s on line %d
int(-1)
tell=int(23)
tell=int(47)

reading the output file
This is the first line.This is the second line.
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_dir_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_dir_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_dir_basic.phpt
--TEST--
Test compress.zlib:// scheme with the directory functions
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$inputFileName = dirname(__FILE__)./dir.gz;
$srcFile = compress.zlib://$inputFileName;
var_dump(mkdir($srcFile));
var_dump(is_dir($srcFile));
var_dump(opendir($srcFile));
var_dump(rmdir($srcFile));
?
===DONE===
--EXPECTF--
bool(false)
bool(false)

Warning: opendir(compress.zlib://%s/dir.gz): failed to open dir: not 
implemented in %s on line %d
bool(false)
bool(false)
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_stat_basic.phpt
--TEST--
Test compress.zlib:// scheme with the unlink function
--SKIPIF--
?php 
if (!extension_loaded(zlib)) {
print skip - ZLIB extension not loaded; 
}
?
--FILE--
?php
$inputFileName = dirname(__FILE__)./004.txt.gz;
$srcFile = compress.zlib://$inputFileName;
stat($srcFile);
lstat($srcFile);
?
===DONE===
--EXPECTF--

Warning: stat(): stat failed for compress.zlib://%s/004.txt.gz in %s on line %d

Warning: lstat(): Lstat failed for compress.zlib://%s/004.txt.gz in %s on line 
%d
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_rename_basic.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/zlib_scheme_rename_basic.phpt
+++ php-src/ext/zlib/tests/zlib_scheme_rename_basic.phpt
--TEST--
Test compress.zlib:// scheme with the unlink function
--SKIPIF--
?php 
if 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard base64.c

2009-01-21 Thread Ilia Alshanetsky
iliaa   Wed Jan 21 15:45:31 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   base64.c 
/php-srcNEWS 
  Log:
  MFB: Fixed bug #47174 (base64_decode() interprets pad char in mid string as
  terminator)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/base64.c?r1=1.43.2.2.2.5r2=1.43.2.2.2.6diff_format=u
Index: php-src/ext/standard/base64.c
diff -u php-src/ext/standard/base64.c:1.43.2.2.2.5 
php-src/ext/standard/base64.c:1.43.2.2.2.6
--- php-src/ext/standard/base64.c:1.43.2.2.2.5  Wed Dec 31 11:17:44 2008
+++ php-src/ext/standard/base64.c   Wed Jan 21 15:45:29 2009
@@ -15,7 +15,7 @@
| Author: Jim Winstead j...@php.net  |
+--+
  */
-/* $Id: base64.c,v 1.43.2.2.2.5 2008/12/31 11:17:44 sebastian Exp $ */
+/* $Id: base64.c,v 1.43.2.2.2.6 2009/01/21 15:45:29 iliaa Exp $ */
 
 #include string.h
 
@@ -153,7 +153,14 @@
 
/* run through the whole string, converting as we go */
while ((ch = *current++) != '\0'  length--  0) {
-   if (ch == base64_pad) break;
+   if (ch == base64_pad) {
+   if (*current != '='  (i % 4) == 1) {
+   efree(result);
+   return NULL;
+   }
+   i++;
+   continue;
+   }
 
ch = base64_reverse_table[ch];
if ((!strict  ch  0) || ch == -1) { /* a space or some other 
separator character, we simply skip over */
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1399r2=1.2027.2.547.2.1400diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1399 php-src/NEWS:1.2027.2.547.2.1400
--- php-src/NEWS:1.2027.2.547.2.1399Wed Jan 21 10:15:42 2009
+++ php-src/NEWSWed Jan 21 15:45:29 2009
@@ -17,6 +17,8 @@
 - Fixed bug in xml_error_string() which resulted in messages being
   off by one. (Scott)
 
+- Fixed bug #47174 (base64_decode() interprets pad char in mid string as
+  terminator). (Ilia)
 - Fixed bug #47165 (Possible memory corruption when passing return value by
   reference). (Dmitry)
 - Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results).



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



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

2009-01-21 Thread Ilia Alshanetsky
iliaa   Wed Jan 21 15:45:45 2009 UTC

  Modified files:  
/php-src/ext/standard   base64.c 
  Log:
  MFB: Fixed bug #47174 (base64_decode() interprets pad char in mid string as
  terminator)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/base64.c?r1=1.57r2=1.58diff_format=u
Index: php-src/ext/standard/base64.c
diff -u php-src/ext/standard/base64.c:1.57 php-src/ext/standard/base64.c:1.58
--- php-src/ext/standard/base64.c:1.57  Wed Dec 31 11:12:36 2008
+++ php-src/ext/standard/base64.c   Wed Jan 21 15:45:45 2009
@@ -15,7 +15,7 @@
| Author: Jim Winstead j...@php.net  |
+--+
  */
-/* $Id: base64.c,v 1.57 2008/12/31 11:12:36 sebastian Exp $ */
+/* $Id: base64.c,v 1.58 2009/01/21 15:45:45 iliaa Exp $ */
 
 #include string.h
 
@@ -151,7 +151,14 @@
 
/* run through the whole string, converting as we go */
while ((ch = *current++) != '\0'  length--  0) {
-   if (ch == base64_pad) break;
+   if (ch == base64_pad) {
+   if (*current != '='  (i % 4) == 1) {
+   efree(result);
+   return NULL;
+   }
+   i++;
+   continue;
+   }
 
ch = base64_reverse_table[ch];
if ((!strict  ch  0) || ch == -1) { /* a space or some other 
separator character, we simply skip over */



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



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

2009-01-21 Thread Ilia Alshanetsky
iliaa   Wed Jan 21 15:38:38 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   base64.c 
  Log:
  
  Fixed bug #47174 (base64_decode() interprets pad char in mid string as
  terminator)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/base64.c?r1=1.43.2.2.2.3.2.4r2=1.43.2.2.2.3.2.5diff_format=u
Index: php-src/ext/standard/base64.c
diff -u php-src/ext/standard/base64.c:1.43.2.2.2.3.2.4 
php-src/ext/standard/base64.c:1.43.2.2.2.3.2.5
--- php-src/ext/standard/base64.c:1.43.2.2.2.3.2.4  Wed Dec 31 11:15:44 2008
+++ php-src/ext/standard/base64.c   Wed Jan 21 15:38:37 2009
@@ -15,7 +15,7 @@
| Author: Jim Winstead j...@php.net  |
+--+
  */
-/* $Id: base64.c,v 1.43.2.2.2.3.2.4 2008/12/31 11:15:44 sebastian Exp $ */
+/* $Id: base64.c,v 1.43.2.2.2.3.2.5 2009/01/21 15:38:37 iliaa Exp $ */
 
 #include string.h
 
@@ -151,7 +151,14 @@
 
/* run through the whole string, converting as we go */
while ((ch = *current++) != '\0'  length--  0) {
-   if (ch == base64_pad) break;
+   if (ch == base64_pad) {
+   if (*current != '='  (i % 4) == 1) {
+   efree(result);
+   return NULL;
+   }
+   i++;
+   continue;
+   }
 
ch = base64_reverse_table[ch];
if ((!strict  ch  0) || ch == -1) { /* a space or some other 
separator character, we simply skip over */



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file fopen_variation10-win32.phpt fopen_variation11-win32.phpt TSRM tsrm_virtual_cwd.c

2009-01-21 Thread Dmitry Stogov
dmitry  Wed Jan 21 19:07:44 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/TSRM   tsrm_virtual_cwd.c 
/php-src/ext/standard/tests/filefopen_variation10-win32.phpt 
fopen_variation11-win32.phpt 
  Log:
  Fixed realpath() behavior to support c:dir as c:\dir, and \dir on UNC 
CWD
  
  
http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.c?r1=1.74.2.9.2.35.2.16r2=1.74.2.9.2.35.2.17diff_format=u
Index: TSRM/tsrm_virtual_cwd.c
diff -u TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35.2.16 
TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35.2.17
--- TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35.2.16  Wed Dec 31 11:15:31 2008
+++ TSRM/tsrm_virtual_cwd.c Wed Jan 21 19:07:35 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.35.2.16 2008/12/31 11:15:31 sebastian 
Exp $ */
+/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.35.2.17 2009/01/21 19:07:35 dmitry Exp 
$ */
 
 #include sys/types.h
 #include sys/stat.h
@@ -755,7 +755,27 @@
 
 #ifdef TSRM_WIN32
if (IS_SLASH(path[0])) {
-   state_cwd_length = 2;
+   if (state-cwd[1] == ':') {
+   /* Copy only the drive name */
+   state_cwd_length = 2;
+   } else if (IS_UNC_PATH(state-cwd, 
state-cwd_length)) {
+   /* Copy only the share name */
+   state_cwd_length = 2;
+   while 
(IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   while (state-cwd[state_cwd_length] 
+  
!IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   while 
(IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   while (state-cwd[state_cwd_length] 
+  
!IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   }
}
 #endif
if (path_length + state_cwd_length + 1 = MAXPATHLEN-1) 
{
@@ -767,7 +787,16 @@
path_length += state_cwd_length + 1;
}
} else {
-   memcpy(resolved_path , path, path_length + 1);
+#ifdef TSRM_WIN32
+   if (path_length  2  path[1] == ':'  !IS_SLASH(path[2])) {
+   resolved_path[0] = path[0];
+   resolved_path[1] = ':';
+   resolved_path[2] = DEFAULT_SLASH;
+   memcpy(resolved_path + 3, path + 2, path_length - 1);
+   path_length++;
+   } else
+#endif
+   memcpy(resolved_path, path, path_length + 1);
} 
 
 #ifdef TSRM_WIN32
@@ -824,6 +853,7 @@
path_length = tsrm_realpath_r(resolved_path, start, path_length, ll, 
t, use_realpath, 0, NULL TSRMLS_CC);

if (path_length  0) {
+   errno = ENOENT;
return 1;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fopen_variation10-win32.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/file/fopen_variation10-win32.phpt
diff -u php-src/ext/standard/tests/file/fopen_variation10-win32.phpt:1.1.4.2 
php-src/ext/standard/tests/file/fopen_variation10-win32.phpt:1.1.4.3
--- php-src/ext/standard/tests/file/fopen_variation10-win32.phpt:1.1.4.2
Wed Nov 26 10:10:18 2008
+++ php-src/ext/standard/tests/file/fopen_variation10-win32.phptWed Jan 
21 19:07:37 2009
@@ -110,11 +110,7 @@
 Warning: fclose() expects parameter 1 to be resource, boolean given in %s on 
line %d
 
 --c:fopen10.tmpdirTwo--
-
-Warning: fopen(c:fopen10.tmpdirTwo\fopen_variation10.tmp): failed to open 
stream: No such file or directory in %s on line %d
-file not opened for read
-
-Warning: fclose() expects parameter 1 to be resource, boolean given in %s on 
line %d
+file in fopen10.tmpdirTwo
 
 --c:adir--
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fopen_variation11-win32.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: 

[PHP-CVS] cvs: php-src /ext/standard/tests/file fopen_variation10-win32.phpt fopen_variation11-win32.phpt TSRM tsrm_virtual_cwd.c

2009-01-21 Thread Dmitry Stogov
dmitry  Wed Jan 21 19:11:50 2009 UTC

  Modified files:  
/TSRM   tsrm_virtual_cwd.c 
/php-src/ext/standard/tests/filefopen_variation10-win32.phpt 
fopen_variation11-win32.phpt 
  Log:
  Fixed realpath() behavior to support c:dir as c:\dir, and \dir on UNC 
CWD
  
  
http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.c?r1=1.132r2=1.133diff_format=u
Index: TSRM/tsrm_virtual_cwd.c
diff -u TSRM/tsrm_virtual_cwd.c:1.132 TSRM/tsrm_virtual_cwd.c:1.133
--- TSRM/tsrm_virtual_cwd.c:1.132   Wed Dec 31 11:12:28 2008
+++ TSRM/tsrm_virtual_cwd.c Wed Jan 21 19:11:48 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: tsrm_virtual_cwd.c,v 1.132 2008/12/31 11:12:28 sebastian Exp $ */
+/* $Id: tsrm_virtual_cwd.c,v 1.133 2009/01/21 19:11:48 dmitry Exp $ */
 
 #include sys/types.h
 #include sys/stat.h
@@ -755,7 +755,27 @@
 
 #ifdef TSRM_WIN32
if (IS_SLASH(path[0])) {
-   state_cwd_length = 2;
+   if (state-cwd[1] == ':') {
+   /* Copy only the drive name */
+   state_cwd_length = 2;
+   } else if (IS_UNC_PATH(state-cwd, 
state-cwd_length)) {
+   /* Copy only the share name */
+   state_cwd_length = 2;
+   while 
(IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   while (state-cwd[state_cwd_length] 
+  
!IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   while 
(IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   while (state-cwd[state_cwd_length] 
+  
!IS_SLASH(state-cwd[state_cwd_length])) {
+   state_cwd_length++;
+   }   
 
+   }
}
 #endif
if (path_length + state_cwd_length + 1 = MAXPATHLEN-1) 
{
@@ -767,7 +787,16 @@
path_length += state_cwd_length + 1;
}
} else {
-   memcpy(resolved_path , path, path_length + 1);
+#ifdef TSRM_WIN32
+   if (path_length  2  path[1] == ':'  !IS_SLASH(path[2])) {
+   resolved_path[0] = path[0];
+   resolved_path[1] = ':';
+   resolved_path[2] = DEFAULT_SLASH;
+   memcpy(resolved_path + 3, path + 2, path_length - 1);
+   path_length++;
+   } else
+#endif
+   memcpy(resolved_path, path, path_length + 1);
} 
 
 #ifdef TSRM_WIN32
@@ -824,6 +853,7 @@
path_length = tsrm_realpath_r(resolved_path, start, path_length, ll, 
t, use_realpath, 0, NULL TSRMLS_CC);

if (path_length  0) {
+   errno = ENOENT;
return 1;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fopen_variation10-win32.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/fopen_variation10-win32.phpt
diff -u php-src/ext/standard/tests/file/fopen_variation10-win32.phpt:1.2 
php-src/ext/standard/tests/file/fopen_variation10-win32.phpt:1.3
--- php-src/ext/standard/tests/file/fopen_variation10-win32.phpt:1.2Wed Nov 
26 17:48:40 2008
+++ php-src/ext/standard/tests/file/fopen_variation10-win32.phptWed Jan 
21 19:11:50 2009
@@ -112,11 +112,7 @@
 Warning: fclose() expects parameter 1 to be resource, boolean given in %s on 
line %d
 
 --c:fopen10.tmpdirTwo--
-
-Warning: fopen(c:fopen10.tmpdirTwo\fopen_variation10.tmp): failed to open 
stream: No such file or directory in %s on line %d
-file not opened for read
-
-Warning: fclose() expects parameter 1 to be resource, boolean given in %s on 
line %d
+file in fopen10.tmpdirTwo
 
 --c:adir--
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fopen_variation11-win32.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/fopen_variation11-win32.phpt
diff -u php-src/ext/standard/tests/file/fopen_variation11-win32.phpt:1.2 

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

2009-01-21 Thread Jani Taskinen
janiWed Jan 21 19:22:20 2009 UTC

  Modified files:  
/php-src/ext/posix  config.m4 
  Log:
  - Fix typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/config.m4?r1=1.18r2=1.19diff_format=u
Index: php-src/ext/posix/config.m4
diff -u php-src/ext/posix/config.m4:1.18 php-src/ext/posix/config.m4:1.19
--- php-src/ext/posix/config.m4:1.18Sat Sep 20 22:12:31 2008
+++ php-src/ext/posix/config.m4 Wed Jan 21 19:22:19 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.18 2008/09/20 22:12:31 lbarnaud Exp $
+dnl $Id: config.m4,v 1.19 2009/01/21 19:22:19 jani Exp $
 dnl
 
 PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
@@ -44,7 +44,7 @@
   ac_cv_have_utsname_domainname=no
 ])
   ])
-  if test ac_cv_have_utsname_domainname=yes; then
+  if test $ac_cv_have_utsname_domainname = yes; then
 AC_DEFINE(HAVE_UTSNAME_DOMAINNAME, 1, [Wether struct utsname has 
domainname])
   fi
 fi



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/posix config.m4

2009-01-21 Thread Jani Taskinen
janiWed Jan 21 19:22:40 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/posix  config.m4 
  Log:
  MFH: fix typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/config.m4?r1=1.12.4.5.2.1r2=1.12.4.5.2.2diff_format=u
Index: php-src/ext/posix/config.m4
diff -u php-src/ext/posix/config.m4:1.12.4.5.2.1 
php-src/ext/posix/config.m4:1.12.4.5.2.2
--- php-src/ext/posix/config.m4:1.12.4.5.2.1Sat Sep 20 22:12:43 2008
+++ php-src/ext/posix/config.m4 Wed Jan 21 19:22:39 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.12.4.5.2.1 2008/09/20 22:12:43 lbarnaud Exp $
+dnl $Id: config.m4,v 1.12.4.5.2.2 2009/01/21 19:22:39 jani Exp $
 dnl
 
 PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
@@ -44,7 +44,7 @@
   ac_cv_have_utsname_domainname=no
 ])
   ])
-  if test ac_cv_have_utsname_domainname=yes; then
+  if test $ac_cv_have_utsname_domainname = yes; then
 AC_DEFINE(HAVE_UTSNAME_DOMAINNAME, 1, [Wether struct utsname has 
domainname])
   fi
 fi



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/posix config.m4

2009-01-21 Thread Jani Taskinen
janiWed Jan 21 19:23:03 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/posix  config.m4 
  Log:
  MFH: fix typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/config.m4?r1=1.12.4.6r2=1.12.4.7diff_format=u
Index: php-src/ext/posix/config.m4
diff -u php-src/ext/posix/config.m4:1.12.4.6 
php-src/ext/posix/config.m4:1.12.4.7
--- php-src/ext/posix/config.m4:1.12.4.6Sat Sep 20 22:12:59 2008
+++ php-src/ext/posix/config.m4 Wed Jan 21 19:23:03 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.12.4.6 2008/09/20 22:12:59 lbarnaud Exp $
+dnl $Id: config.m4,v 1.12.4.7 2009/01/21 19:23:03 jani Exp $
 dnl
 
 PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
@@ -44,7 +44,7 @@
   ac_cv_have_utsname_domainname=no
 ])
   ])
-  if test ac_cv_have_utsname_domainname=yes; then
+  if test $ac_cv_have_utsname_domainname = yes; then
 AC_DEFINE(HAVE_UTSNAME_DOMAINNAME, 1, [Wether struct utsname has 
domainname])
   fi
 fi



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file fopen_variation10-win32.phpt fopen_variation11-win32.phpt TSRM tsrm_virtual_cwd.c

2009-01-21 Thread Pierre Joye
hi Dmitry,

On Wed, Jan 21, 2009 at 8:07 PM, Dmitry Stogov dmi...@php.net wrote:
 dmitry  Wed Jan 21 19:07:44 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/TSRM   tsrm_virtual_cwd.c
/php-src/ext/standard/tests/filefopen_variation10-win32.phpt
fopen_variation11-win32.phpt
  Log:
  Fixed realpath() behavior to support c:dir as c:\dir, and \dir on UNC 
 CWD

c:dir as c:\dir, do you mean that C:dir is the same than c:\dir ?
If yes, it is then not correct. It should relative to the current
directory for the drive C:.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] cvs: php-src /ext/zlib/tests gzopen_variation8.phpt gzseek_variation7.phpt zlib_scheme_copy_variation2.phpt zlib_scheme_file_put_contents_basic.phpt

2009-01-21 Thread Dave Kelsey
dkelsey Wed Jan 21 22:26:49 2009 UTC

  Modified files:  
/php-src/ext/zlib/tests gzseek_variation7.phpt 
zlib_scheme_file_put_contents_basic.phpt 
zlib_scheme_copy_variation2.phpt 
gzopen_variation8.phpt 
  Log:
  correct minor mistakes in the php6 version of the zlib tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzseek_variation7.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/zlib/tests/gzseek_variation7.phpt
diff -u php-src/ext/zlib/tests/gzseek_variation7.phpt:1.1 
php-src/ext/zlib/tests/gzseek_variation7.phpt:1.2
--- php-src/ext/zlib/tests/gzseek_variation7.phpt:1.1   Wed Jan 21 15:24:11 2009
+++ php-src/ext/zlib/tests/gzseek_variation7.phpt   Wed Jan 21 22:26:48 2009
@@ -10,8 +10,8 @@
 ?php
 $f = temp3.txt.gz;
 $h = gzopen($f, 'w'); 
-$str1 = This is the first line.;
-$str2 = This is the second line.;
+$str1 = bThis is the first line.;
+$str2 = bThis is the second line.;
 gzwrite($h, $str1);
 echo tell=;
 var_dump(gztell($h));
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
diff -u php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt:1.1 
php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt:1.2
--- php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt:1.1 Wed Jan 
21 15:24:11 2009
+++ php-src/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt Wed Jan 
21 22:26:48 2009
@@ -10,7 +10,7 @@
 ?php
 $outputFileName = __FILE__.'tmp';
 $outFile = compress.zlib://$outputFileName;
-$data = EOT
+$data = bEOT
 Here is some plain
 text to be read
 and displayed.
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/zlib_scheme_copy_variation2.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/zlib/tests/zlib_scheme_copy_variation2.phpt
diff -u php-src/ext/zlib/tests/zlib_scheme_copy_variation2.phpt:1.1 
php-src/ext/zlib/tests/zlib_scheme_copy_variation2.phpt:1.2
--- php-src/ext/zlib/tests/zlib_scheme_copy_variation2.phpt:1.1 Wed Jan 21 
15:24:11 2009
+++ php-src/ext/zlib/tests/zlib_scheme_copy_variation2.phpt Wed Jan 21 
22:26:48 2009
@@ -8,7 +8,7 @@
 ?
 --FILE--
 ?php
-$org_data = EOT
+$org_data = bEOT
 uncompressed contents of 004.txt.gz is:
 When you're taught through feelings
 Destiny flying high above
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzopen_variation8.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/zlib/tests/gzopen_variation8.phpt
diff -u php-src/ext/zlib/tests/gzopen_variation8.phpt:1.1 
php-src/ext/zlib/tests/gzopen_variation8.phpt:1.2
--- php-src/ext/zlib/tests/gzopen_variation8.phpt:1.1   Wed Jan 21 15:24:11 2009
+++ php-src/ext/zlib/tests/gzopen_variation8.phpt   Wed Jan 21 22:26:48 2009
@@ -16,7 +16,7 @@
 
 echo *** Testing gzopen() : variation ***\n;
 
-$data = EOT
+$data = bEOT
 Here is some plain
 text to be read
 and displayed.



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



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

2009-01-21 Thread andy wharmby
wharmby Thu Jan 22 00:23:01 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings printf.phpt 
  Log:
  Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/printf.phpt?r1=1.1.2.3.2.2r2=1.1.2.3.2.3diff_format=u
Index: php-src/ext/standard/tests/strings/printf.phpt
diff -u php-src/ext/standard/tests/strings/printf.phpt:1.1.2.3.2.2 
php-src/ext/standard/tests/strings/printf.phpt:1.1.2.3.2.3
--- php-src/ext/standard/tests/strings/printf.phpt:1.1.2.3.2.2  Mon Sep 15 
11:47:16 2008
+++ php-src/ext/standard/tests/strings/printf.phpt  Thu Jan 22 00:23:01 2009
@@ -669,6 +669,8 @@
 %
 
 *** Output for precision value more than maximum ***
+
+Notice: printf(): Requested precision of 988 digits was truncated to PHP 
maximum of 40 digits in %s on line %d
 12345678900.
 
 *** Output for invalid width(-15) specifier ***



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



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

2009-01-21 Thread andy wharmby
wharmby Thu Jan 22 00:23:05 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings printf.phpt 
  Log:
  Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/printf.phpt?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/standard/tests/strings/printf.phpt
diff -u php-src/ext/standard/tests/strings/printf.phpt:1.1.2.4 
php-src/ext/standard/tests/strings/printf.phpt:1.1.2.5
--- php-src/ext/standard/tests/strings/printf.phpt:1.1.2.4  Mon Sep 15 
11:47:03 2008
+++ php-src/ext/standard/tests/strings/printf.phpt  Thu Jan 22 00:23:05 2009
@@ -669,6 +669,8 @@
 %
 
 *** Output for precision value more than maximum ***
+
+Notice: printf(): Requested precision of 988 digits was truncated to PHP 
maximum of 40 digits in %s on line %d
 12345678900.
 
 *** Output for invalid width(-15) specifier ***



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



[PHP-CVS] cvs: php-src(PHP_5_3) /tests/security open_basedir.inc open_basedir_chdir.phpt open_basedir_chmod.phpt open_basedir_copy.phpt open_basedir_copy_variation1.phpt open_basedir_dir.phpt open_bas

2009-01-21 Thread Dave Kelsey
dkelsey Thu Jan 22 07:57:00 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/tests/security open_basedir_glob_variation.phpt 

  Modified files:  
/php-src/tests/security open_basedir_error_log.phpt 
open_basedir_chmod.phpt 
open_basedir_chdir.phpt 
open_basedir_symlink.phpt 
open_basedir_is_executable.phpt 
open_basedir_scandir.phpt 
open_basedir_touch.phpt 
open_basedir_link.phpt 
open_basedir_rename.phpt 
open_basedir_readlink.phpt 
open_basedir_linkinfo.phpt 
open_basedir_mkdir.phpt 
open_basedir_rmdir.phpt 
open_basedir_fopen.phpt 
open_basedir_file_put_contents.phpt 
open_basedir.inc 
open_basedir_disk_free_space.phpt 
open_basedir_file_get_contents.phpt 
open_basedir_error_log_variation.phpt 
open_basedir_dir.phpt 
open_basedir_tempnam.phpt 
open_basedir_opendir.phpt 
open_basedir_copy_variation1.phpt 
open_basedir_copy.phpt 
open_basedir_unlink.phpt 
open_basedir_file.phpt 
  Log:
  fixed subtle bugs regarding attempting to chdir, plus cleanup issues. 
improved tempnam test, removed hardcoded line number. tested on windows, linux 
and linux 64bit.
  http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_error_log.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u
Index: php-src/tests/security/open_basedir_error_log.phpt
diff -u php-src/tests/security/open_basedir_error_log.phpt:1.1.4.3 
php-src/tests/security/open_basedir_error_log.phpt:1.1.4.4
--- php-src/tests/security/open_basedir_error_log.phpt:1.1.4.3  Mon Jun  9 
09:26:03 2008
+++ php-src/tests/security/open_basedir_error_log.phpt  Thu Jan 22 07:56:54 2009
@@ -6,14 +6,15 @@
 --FILE--
 ?php
 require_once open_basedir.inc;
+$initdir = getcwd();
 test_open_basedir_before(error_log);
-$directory = dirname(__FILE__);
 
-var_dump(ini_set(error_log, $directory./test/bad/bad.txt));
-var_dump(ini_set(error_log, $directory./test/bad.txt));
-var_dump(ini_set(error_log, $directory./bad.txt));
-var_dump(ini_set(error_log, $directory./test/ok/ok.txt));
-var_dump(ini_set(error_log, $directory./test/ok/ok.txt));
+
+var_dump(ini_set(error_log, $initdir./test/bad/bad.txt));
+var_dump(ini_set(error_log, $initdir./test/bad.txt));
+var_dump(ini_set(error_log, $initdir./bad.txt));
+var_dump(ini_set(error_log, $initdir./test/ok/ok.txt));
+var_dump(ini_set(error_log, $initdir./test/ok/ok.txt));
 
 test_open_basedir_after(error_log);
 ?
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_chmod.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/tests/security/open_basedir_chmod.phpt
diff -u php-src/tests/security/open_basedir_chmod.phpt:1.1.4.2 
php-src/tests/security/open_basedir_chmod.phpt:1.1.4.3
--- php-src/tests/security/open_basedir_chmod.phpt:1.1.4.2  Fri May  9 
08:39:44 2008
+++ php-src/tests/security/open_basedir_chmod.phpt  Thu Jan 22 07:56:55 2009
@@ -5,8 +5,9 @@
 --FILE--
 ?php
 require_once open_basedir.inc;
+$initdir = getcwd();
+
 test_open_basedir_before(chmod);
-$directory = dirname(__FILE__);
 
 var_dump(chmod(../bad, 0600));
 var_dump(chmod(../bad/bad.txt, 0600));
@@ -17,12 +18,12 @@
 var_dump(chmod(../bad/./bad.txt, 0600));
 var_dump(chmod(./../., 0600));
 
-var_dump(chmod($directory./test/ok/ok.txt, 0600));
+var_dump(chmod($initdir./test/ok/ok.txt, 0600));
 var_dump(chmod(./ok.txt, 0600));
 var_dump(chmod(ok.txt, 0600));
 var_dump(chmod(../ok/ok.txt, 0600));
 var_dump(chmod(../ok/./ok.txt, 0600));
-chmod($directory./test/ok/ok.txt, 0777);
+chmod($initdir./test/ok/ok.txt, 0777);
 
 test_open_basedir_after(chmod);
 ?
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_chdir.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/tests/security/open_basedir_chdir.phpt
diff -u php-src/tests/security/open_basedir_chdir.phpt:1.1.4.2 
php-src/tests/security/open_basedir_chdir.phpt:1.1.4.3
--- php-src/tests/security/open_basedir_chdir.phpt:1.1.4.2  Fri May  9 
08:39:44 2008
+++ php-src/tests/security/open_basedir_chdir.phpt  Thu Jan 22 07:56:55 2009
@@ -6,7 +6,6 @@
 ?php
 require_once open_basedir.inc;
 test_open_basedir_before(chdir);
-$directory = dirname(__FILE__);
 
 var_dump(chdir(../bad));
 var_dump(chdir(..));

[PHP-CVS] cvs: php-src /tests/security open_basedir.inc open_basedir_chdir.phpt open_basedir_chmod.phpt open_basedir_copy.phpt open_basedir_copy_variation1.phpt open_basedir_dir.phpt open_basedir_disk

2009-01-21 Thread Dave Kelsey
dkelsey Thu Jan 22 07:57:05 2009 UTC

  Modified files:  
/php-src/tests/security open_basedir_glob_variation.phpt 
open_basedir_chmod.phpt 
open_basedir_is_executable.phpt 
open_basedir_error_log.phpt 
open_basedir_rename.phpt 
open_basedir_chdir.phpt 
open_basedir_linkinfo.phpt 
open_basedir_dir.phpt 
open_basedir_symlink.phpt open_basedir.inc 
open_basedir_error_log_variation.phpt 
open_basedir_link.phpt 
open_basedir_scandir.phpt 
open_basedir_disk_free_space.phpt 
open_basedir_touch.phpt 
open_basedir_unlink.phpt 
open_basedir_copy_variation1.phpt 
open_basedir_file_put_contents.phpt 
open_basedir_file.phpt 
open_basedir_mkdir.phpt 
open_basedir_rmdir.phpt 
open_basedir_copy.phpt 
open_basedir_tempnam.phpt 
open_basedir_fopen.phpt 
open_basedir_file_get_contents.phpt 
open_basedir_opendir.phpt 
open_basedir_readlink.phpt 
  Log:
  fixed subtle bugs regarding attempting to chdir, plus cleanup issues. 
improved tempnam test, removed hardcoded line number. tested on windows, linux 
and linux 64bit.
  http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_glob_variation.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/tests/security/open_basedir_glob_variation.phpt
diff -u /dev/null php-src/tests/security/open_basedir_glob_variation.phpt:1.2
--- /dev/null   Thu Jan 22 07:57:04 2009
+++ php-src/tests/security/open_basedir_glob_variation.phpt Thu Jan 22 
07:57:04 2009
@@ -0,0 +1,26 @@
+--TEST--
+Test open_basedir configuration for glob
+--INI--
+open_basedir=.
+--FILE--
+?php
+$dir = globtest1;
+$dir2 = globtest2;
+mkdir($dir);
+mkdir($dir2);
+chdir($dir);
+var_dump(glob(../globtest*));
+?
+--CLEAN--
+?php
+$dir = globtest1;
+$dir2 = globtest2;
+rmdir($dir);
+rmdir($dir2);
+?
+--EXPECT--
+array(1) {
+  [0]=
+  unicode(12) ../globtest1
+}
+
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_chmod.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/tests/security/open_basedir_chmod.phpt
diff -u php-src/tests/security/open_basedir_chmod.phpt:1.3 
php-src/tests/security/open_basedir_chmod.phpt:1.4
--- php-src/tests/security/open_basedir_chmod.phpt:1.3  Mon May 26 15:52:05 2008
+++ php-src/tests/security/open_basedir_chmod.phpt  Thu Jan 22 07:57:04 2009
@@ -5,8 +5,9 @@
 --FILE--
 ?php
 require_once open_basedir.inc;
+$initdir = getcwd();
+
 test_open_basedir_before(chmod);
-$directory = dirname(__FILE__);
 
 var_dump(chmod(../bad, 0600));
 var_dump(chmod(../bad/bad.txt, 0600));
@@ -17,12 +18,12 @@
 var_dump(chmod(../bad/./bad.txt, 0600));
 var_dump(chmod(./../., 0600));
 
-var_dump(chmod($directory./test/ok/ok.txt, 0600));
+var_dump(chmod($initdir./test/ok/ok.txt, 0600));
 var_dump(chmod(./ok.txt, 0600));
 var_dump(chmod(ok.txt, 0600));
 var_dump(chmod(../ok/ok.txt, 0600));
 var_dump(chmod(../ok/./ok.txt, 0600));
-chmod($directory./test/ok/ok.txt, 0777);
+chmod($initdir./test/ok/ok.txt, 0777);
 
 test_open_basedir_after(chmod);
 ?
@@ -68,3 +69,4 @@
 bool(true)
 bool(true)
 *** Finished testing open_basedir configuration [chmod] ***
+
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_is_executable.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/tests/security/open_basedir_is_executable.phpt
diff -u php-src/tests/security/open_basedir_is_executable.phpt:1.2 
php-src/tests/security/open_basedir_is_executable.phpt:1.3
--- php-src/tests/security/open_basedir_is_executable.phpt:1.2  Fri May  9 
08:44:43 2008
+++ php-src/tests/security/open_basedir_is_executable.phpt  Thu Jan 22 
07:57:04 2009
@@ -5,14 +5,14 @@
 --FILE--
 ?php
 require_once open_basedir.inc;
+$initdir = getcwd();
 test_open_basedir_before(is_executable);
 test_open_basedir_error(is_executable); 
 
 var_dump(is_executable(ok.txt));
 var_dump(is_executable(../ok/ok.txt));
-$directory = dirname(__FILE__);
-var_dump(is_executable($directory./test/ok/ok.txt));
-var_dump(is_executable($directory./test/ok/../ok/ok.txt));
+var_dump(is_executable($initdir./test/ok/ok.txt));
+var_dump(is_executable($initdir./test/ok/../ok/ok.txt));
 
 test_open_basedir_after(is_executable);
 ?
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_error_log.phpt?r1=1.4r2=1.5diff_format=u
Index: 

[PHP-CVS] cvs: php-src(PHP_5_2) /tests/security open_basedir.inc open_basedir_chdir.phpt open_basedir_chmod.phpt open_basedir_copy.phpt open_basedir_copy_variation1.phpt open_basedir_dir.phpt open_bas

2009-01-21 Thread Dave Kelsey
dkelsey Thu Jan 22 07:57:10 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/tests/security open_basedir_glob_variation.phpt 

  Modified files:  
/php-src/tests/security open_basedir_copy_variation1.phpt 
open_basedir_rmdir.phpt 
open_basedir_link.phpt 
open_basedir_symlink.phpt 
open_basedir_dir.phpt 
open_basedir_opendir.phpt open_basedir.inc 
open_basedir_file_put_contents.phpt 
open_basedir_chmod.phpt 
open_basedir_chdir.phpt 
open_basedir_disk_free_space.phpt 
open_basedir_rename.phpt 
open_basedir_readlink.phpt 
open_basedir_touch.phpt 
open_basedir_fopen.phpt 
open_basedir_file.phpt 
open_basedir_linkinfo.phpt 
open_basedir_file_get_contents.phpt 
open_basedir_error_log.phpt 
open_basedir_tempnam.phpt 
open_basedir_mkdir.phpt 
open_basedir_unlink.phpt 
open_basedir_copy.phpt 
open_basedir_scandir.phpt 
open_basedir_is_executable.phpt 
open_basedir_error_log_variation.phpt 
  Log:
  fixed subtle bugs regarding attempting to chdir, plus cleanup issues. 
improved tempnam test, removed hardcoded line number. tested on windows, linux 
and linux 64bit.
  http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_copy_variation1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/tests/security/open_basedir_copy_variation1.phpt
diff -u php-src/tests/security/open_basedir_copy_variation1.phpt:1.1.2.1 
php-src/tests/security/open_basedir_copy_variation1.phpt:1.1.2.2
--- php-src/tests/security/open_basedir_copy_variation1.phpt:1.1.2.1Fri May 
 9 08:35:57 2008
+++ php-src/tests/security/open_basedir_copy_variation1.phptThu Jan 22 
07:57:08 2009
@@ -6,7 +6,6 @@
 ?php
 require_once open_basedir.inc;
 test_open_basedir_before(copy);
-$directory = dirname(__FILE__);
 
 var_dump(copy(../bad/bad.txt, copy.txt));
 var_dump(unlink(copy.txt));
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_rmdir.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/tests/security/open_basedir_rmdir.phpt
diff -u php-src/tests/security/open_basedir_rmdir.phpt:1.1.2.1 
php-src/tests/security/open_basedir_rmdir.phpt:1.1.2.2
--- php-src/tests/security/open_basedir_rmdir.phpt:1.1.2.1  Fri May  9 
08:35:58 2008
+++ php-src/tests/security/open_basedir_rmdir.phpt  Thu Jan 22 07:57:08 2009
@@ -5,14 +5,14 @@
 --FILE--
 ?php
 require_once open_basedir.inc;
+$initdir = getcwd();
 test_open_basedir_before(rmdir);
-$directory = dirname(__FILE__);
 
 var_dump(rmdir(../bad));
 var_dump(rmdir(.././bad));
 var_dump(rmdir(../bad/../bad));
 var_dump(rmdir(./.././bad));
-var_dump(rmdir($directory./test/bad));
+var_dump(rmdir($initdir./test/bad));
 
 test_open_basedir_after(rmdir);
 ?
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_link.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/tests/security/open_basedir_link.phpt
diff -u php-src/tests/security/open_basedir_link.phpt:1.1.2.1 
php-src/tests/security/open_basedir_link.phpt:1.1.2.2
--- php-src/tests/security/open_basedir_link.phpt:1.1.2.1   Fri May  9 
08:35:58 2008
+++ php-src/tests/security/open_basedir_link.phpt   Thu Jan 22 07:57:08 2009
@@ -11,23 +11,23 @@
 --FILE--
 ?php
 require_once open_basedir.inc;
+$initdir = getcwd();
 test_open_basedir_before(link);
-$directory = dirname(__FILE__);
 
-$target = ($directory./test/ok/ok.txt);
+$target = ($initdir./test/ok/ok.txt);
 var_dump(link($target, ../bad/link.txt));
 var_dump(link($target, ../link.txt));
 var_dump(link($target, ../bad/./link.txt));
 var_dump(link($target, ./.././link.txt));
 
-$link = ($directory./test/ok/link.txt);
+$link = ($initdir./test/ok/link.txt);
 var_dump(link(../bad/bad.txt, $link));
 var_dump(link(../bad, $link));
 var_dump(link(../bad/./bad.txt, $link));
 var_dump(link(../bad/bad.txt, $link));
 var_dump(link(./.././bad, $link));
 
-$target = ($directory./test/ok/ok.txt);
+$target = ($initdir./test/ok/ok.txt);
 
 var_dump(link($target, $link));
 var_dump(unlink($link));
http://cvs.php.net/viewvc.cgi/php-src/tests/security/open_basedir_symlink.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/tests/security/open_basedir_symlink.phpt
diff -u php-src/tests/security/open_basedir_symlink.phpt:1.1.2.2