Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4

* 'PHP-5.4' of git.php.net:php-src: (65 commits)
  Add a couple more test cases to parse_url() tests
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
  Cleanup temp test file
  Fixed Bug #66034 (Segmentation Fault when constructor of PDO statement throws an exception)
  Typo fix: umknown -> unknown
  Fix bug #66008
  5.4.23-dev
  Update NEWS
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
  add bundled libzip LICENSE, as required by BSD License terms
  - Updated to version 2013.8 (2013h)
  remove "PHP 6" staff
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
  - Updated to version 2013.7 (2013g)
  Fix Coverity issue reporting wrong sizeof()
  exif NEWS
  add tests for bug #62523
  Merged PR #293 (Exif crash on unknown encoding was fixed) By: 	Draal Conflicts: 	configure.in 	main/php_version.h
  Just SKIP that test on travis
  ...
This commit is contained in:
Rasmus Lerdorf 2013-11-07 07:55:26 -08:00
commit 8cb128159d
157 changed files with 1898 additions and 966 deletions

View File

@ -151,7 +151,7 @@ Naming Conventions
7. Classes should be given descriptive names. Avoid using abbreviations where
possible. Each word in the class name should start with a capital letter,
without underscore delimiters (CampelCaps starting with a capital letter).
without underscore delimiters (CamelCaps starting with a capital letter).
The class name should be prefixed with the name of the 'parent set' (e.g.
the name of the extension)::

50
NEWS
View File

@ -1,6 +1,45 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2013, PHP 5.4.21
?? ??? 2013, PHP 5.4.23
?? ??? 2013, PHP 5.4.22
- Core:
. Fixed bug #65911 (scope resolution operator - strange behavior with $this).
(Bob Weinand)
- CLI server:
. Fixed bug #65818 (Segfault with built-in webserver and chunked transfer
encoding). (Felipe)
- Exif:
. Fixed crash on unknown encoding. (Draal)
- FTP:
. Fixed bug #65667 (ftp_nb_continue produces segfault). (Philip Hofstetter)
- ODBC:
. Fixed bug #65950 (Field name truncation if the field name is bigger than
32 characters). (patch submitted by: michael dot y at zend dot com, Yasuo)
- PDO:
. Fixed bug #66033 (Segmentation Fault when constructor of PDO statement
throws an exception). (Laruence)
- Sockets:
. Fixed bug #65808 (the socket_connect() won't work with IPv6 address).
(Mike)
- Standard:
. Fixed bug #64760 (var_export() does not use full precision for floating-point
numbers) (Yasuo)
- XMLReader:
. Fixed bug #51936 (Crash with clone XMLReader). (Mike)
. Fixed bug #64230 (XMLReader does not suppress errors). (Mike)
17 Oct 2013, PHP 5.4.21
- Core:
. Fixed bug #65322 (compile time errors won't trigger auto loading). (Nikita)
@ -26,6 +65,15 @@ PHP NEWS
. Fixed bug #65721 (configure script broken in 5.5.4 and 5.4.20 when enabling
imap). (ryotakatsuki at gmail dot com)
- Standard:
. Fixed bug #61548 (content-type must appear at the end of headers for 201
Location to work in http). (Mike)
- Build system:
. Fixed bug #62396 ('make test' crashes starting with 5.3.14 (missing
gzencode())). (Mike)
19 Sep 2013, PHP 5.4.20
- Core:

View File

@ -30,7 +30,7 @@ zend_module_entry foo_module_entry = {
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
#if ZEND_MODULE_API_NO >= 20010901
FOO_VERSION, /* extension version number (string) */
PHP_FOO_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};

View File

@ -31,6 +31,11 @@ HOW TO USE IT
./buildconf; ./configure --enable-module_name; make
The definition of PHP_MODULE_NAME_VERSION will be present in the
php_module_name.h and injected into the zend_module_entry definition. This
is required by the PECL website for the version string conformity checks
against package.xml
But if you already have planned the overall scheme of your module, what
functions it will contain, their return types and the arguments they take
(a very good idea) and don't want to bother yourself with creating function

View File

@ -153,3 +153,18 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
#endif
PECL SITE CONFORMITY
If you plan to release an extension to the PECL website, there are several
points to be regarded.
1. Add LICENSE or COPYING to the package.xml
2. The following should be defined in one of the extension header files
#define PHP_FOO_VERSION "1.2.3"
This macros has to be used within your foo_module_entry to indicate the
extension version.

View File

@ -12,7 +12,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
bison_version=none
if test "$YACC"; then
AC_CACHE_CHECK([for bison version], php_cv_bison_version, [
bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z`
bison_version_vars=`$YACC --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /g' | tr -d a-z`
php_cv_bison_version=invalid
if test -n "$bison_version_vars"; then
set $bison_version_vars

20
Zend/tests/bug65911.phpt Normal file
View File

@ -0,0 +1,20 @@
--TEST--
Bug #65911 (scope resolution operator - strange behavior with $this)
--FILE--
<?php
class A {}
class B
{
public function go()
{
$this->foo = 'bar';
echo A::$this->foo; // should not output 'bar'
}
}
$obj = new B();
$obj->go();
?>
--EXPECTF--
Fatal error: Access to undeclared static property: A::$this in %s on line %d

View File

@ -905,6 +905,7 @@ static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */
{
if ((opline->opcode == ZEND_FETCH_W) && (opline->op1_type == IS_CONST)
&& (Z_TYPE(CONSTANT(opline->op1.constant)) == IS_STRING)
&& ((opline->extended_value & ZEND_FETCH_STATIC_MEMBER) != ZEND_FETCH_STATIC_MEMBER)
&& (Z_HASH_P(&CONSTANT(opline->op1.constant)) == THIS_HASHVAL)
&& (Z_STRLEN(CONSTANT(opline->op1.constant)) == (sizeof("this")-1))
&& !memcmp(Z_STRVAL(CONSTANT(opline->op1.constant)), "this", sizeof("this"))) {

View File

@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=21
PHP_RELEASE_VERSION=23
PHP_EXTRA_VERSION="-dev"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`

View File

@ -97,6 +97,7 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
status = BZ2_bzDecompressInit(streamp, 0, data->small_footprint);
if (BZ_OK != status) {
php_stream_bucket_delref(bucket TSRMLS_CC);
return PSFS_ERR_FATAL;
}

File diff suppressed because it is too large Load Diff

View File

@ -1362,6 +1362,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now)
parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
if (error->error_count) {
timelib_time_dtor(parsed_time);
timelib_error_container_dtor(error);
return -1;
}

View File

@ -625,7 +625,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
char *file_mode;
char mode[4], *pmode, *lock_file_mode = NULL;
int persistent_flag = persistent ? STREAM_OPEN_PERSISTENT : 0;
char *opened_path, *lock_name;
char *opened_path = NULL;
char *lock_name;
if(ac < 2) {
WRONG_PARAM_COUNT;
@ -848,8 +849,10 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (!persistent) {
info->lock.name = opened_path;
} else {
info->lock.name = pestrdup(opened_path, persistent);
efree(opened_path);
if (opened_path) {
info->lock.name = pestrdup(opened_path, persistent);
efree(opened_path);
}
}
}
}

View File

@ -2643,6 +2643,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
} else {
decode = ImageInfo->decode_unicode_le;
}
/* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */
if (zend_multibyte_encoding_converter(
(unsigned char**)pszInfoPtr,
&len,
@ -2650,7 +2651,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
ByteCount,
zend_multibyte_fetch_encoding(ImageInfo->encode_unicode TSRMLS_CC),
zend_multibyte_fetch_encoding(decode TSRMLS_CC)
TSRMLS_CC) < 0) {
TSRMLS_CC) == (size_t)-1) {
len = exif_process_string_raw(pszInfoPtr, szValuePtr, ByteCount);
}
return len;
@ -2663,6 +2664,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
*pszEncoding = estrdup((const char*)szValuePtr);
szValuePtr = szValuePtr+8;
ByteCount -= 8;
/* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */
if (zend_multibyte_encoding_converter(
(unsigned char**)pszInfoPtr,
&len,
@ -2670,7 +2672,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
ByteCount,
zend_multibyte_fetch_encoding(ImageInfo->encode_jis TSRMLS_CC),
zend_multibyte_fetch_encoding(ImageInfo->motorola_intel ? ImageInfo->decode_jis_be : ImageInfo->decode_jis_le TSRMLS_CC)
TSRMLS_CC) < 0) {
TSRMLS_CC) == (size_t)-1) {
len = exif_process_string_raw(pszInfoPtr, szValuePtr, ByteCount);
}
return len;
@ -2700,8 +2702,8 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_field, int tag, char *szValuePtr, int ByteCount TSRMLS_DC)
{
xp_field->tag = tag;
/* Copy the comment */
/* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */
if (zend_multibyte_encoding_converter(
(unsigned char**)&xp_field->value,
&xp_field->size,
@ -2709,7 +2711,7 @@ static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_fi
ByteCount,
zend_multibyte_fetch_encoding(ImageInfo->encode_unicode TSRMLS_CC),
zend_multibyte_fetch_encoding(ImageInfo->motorola_intel ? ImageInfo->decode_unicode_be : ImageInfo->decode_unicode_le TSRMLS_CC)
TSRMLS_CC) < 0) {
TSRMLS_CC) == (size_t)-1) {
xp_field->size = exif_process_string_raw(&xp_field->value, szValuePtr, ByteCount);
}
return xp_field->size;

View File

@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.getid3.org/temp/62523.jpg">here</a>.</p>
<hr>
<address>Apache Server at getid3.org Port 80</address>
</body></html>

View File

@ -0,0 +1,18 @@
--TEST--
Bug 62523 (php crashes with segfault when exif_read_data called)
--SKIPIF--
<?php
extension_loaded("exif") or die("skip need exif");
?>
--FILE--
<?php
echo "Test\n";
var_dump(count(exif_read_data(__DIR__."/bug62523_1.jpg")));
?>
Done
--EXPECTF--
Test
Warning: exif_read_data(bug62523_1.jpg): File not supported in %sbug62523_1.php on line %d
int(1)
Done

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 KiB

View File

@ -0,0 +1,16 @@
--TEST--
Bug 62523 (php crashes with segfault when exif_read_data called)
--SKIPIF--
<?php
extension_loaded("exif") or die("skip need exif");
?>
--FILE--
<?php
echo "Test\n";
var_dump(count(exif_read_data(__DIR__."/bug62523_2.jpg")));
?>
Done
--EXPECT--
Test
int(76)
Done

View File

@ -0,0 +1,12 @@
<html>
<head><title>Found</title></head>
<body>
<h1>Found</h1>
<p>The resource was found at <a href="http://dl.dropboxusercontent.com/u/7562584/Bugs/Php/bad_exif.jpeg">http://dl.dropboxusercontent.com/u/7562584/Bugs/Php/bad_exif.jpeg</a>;
you should be redirected automatically.
<!-- --></p>
<hr noshade>
<div align="right">WSGI Server</div>
</body>
</html>

View File

@ -0,0 +1,18 @@
--TEST--
Bug 62523 (php crashes with segfault when exif_read_data called)
--SKIPIF--
<?php
extension_loaded("exif") or die("skip need exif");
?>
--FILE--
<?php
echo "Test\n";
var_dump(count(exif_read_data(__DIR__."/bug62523_3.jpg")));
?>
Done
--EXPECTF--
Test
Warning: exif_read_data(bug62523_3.jpg): File not supported in %sbug62523_3.php on line %d
int(1)
Done

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -0,0 +1,14 @@
--TEST--
PHP crash when zend_multibyte_encoding_converter returns (size_t)-1)
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
$infile = dirname(__FILE__).'/exif_encoding_crash.jpg';
$exif_data = exif_read_data($infile);
echo "*** no core dump ***\n";
?>
===DONE===
--EXPECT--
*** no core dump ***
===DONE===

View File

@ -714,7 +714,7 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
if (flags & FILTER_FLAG_NO_RES_RANGE) {
if (
(ip[0] == 0) ||
(ip[0] == 100 && (ip[1] >= 64 || ip[1] <= 127)) ||
(ip[0] == 100 && (ip[1] >= 64 && ip[1] <= 127)) ||
(ip[0] == 128 && ip[1] == 0) ||
(ip[0] == 191 && ip[1] == 255) ||
(ip[0] == 169 && ip[1] == 254) ||

View File

@ -15,7 +15,7 @@ var_dump(filter_var("192.168.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE
var_dump(filter_var("192.0.34.166", FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE));
var_dump(filter_var("127.0.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var("192.0.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var("100.0.0.0", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var("100.64.0.0", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var("100.127.255.255", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var("192.0.34.166", FILTER_VALIDATE_IP));
var_dump(filter_var("256.1237.123.1", FILTER_VALIDATE_IP));

View File

@ -630,7 +630,7 @@ ftp_alloc(ftpbuf_t *ftp, const long size, char **response)
return 0;
}
if (response && ftp->inbuf) {
if (response) {
*response = estrdup(ftp->inbuf);
}
@ -1643,7 +1643,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
if (ftp->resp == 226) {
ftp->data = data_close(ftp, data);
php_stream_close(tmpstream);
return ecalloc(1, sizeof(char**));
return ecalloc(1, sizeof(char*));
}
/* pull data buffer into tmpfile */
@ -1671,11 +1671,11 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
}
}
ftp->data = data = data_close(ftp, data);
ftp->data = data_close(ftp, data);
php_stream_rewind(tmpstream);
ret = safe_emalloc((lines + 1), sizeof(char**), size * sizeof(char*));
ret = safe_emalloc((lines + 1), sizeof(char*), size);
entry = ret;
text = (char*) (ret + lines + 1);

View File

@ -968,7 +968,9 @@ PHP_FUNCTION(ftp_nb_get)
RETURN_LONG(PHP_FTP_FAILED);
}
php_stream_close(outstream);
if (ret == PHP_FTP_FINISHED){
php_stream_close(outstream);
}
RETURN_LONG(ret);
}

View File

@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
ftp_set_option($ftp, FTP_AUTOSEEK, false);
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt";
$handle = fopen($local_file, 'w');
var_dump(ftp_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME));
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt");
?>
--EXPECT--
bool(true)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt");
?>
--EXPECT--
bool(true)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt");
?>
--EXPECT--
bool(true)

View File

@ -0,0 +1,182 @@
--TEST--
Testing whether ftp_nb_continue() fetches more data
--SKIPIF--
<?php
require 'skipif.inc';
?>
--FILE--
<?php
require 'server.inc';
$file = "mediumfile.txt";
$ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . $file;
touch($local_file);
$r = ftp_nb_get($ftp, $local_file, $file, FTP_BINARY);
while ($r == FTP_MOREDATA) {
$r = ftp_nb_continue($ftp);
}
ftp_close($ftp);
echo file_get_contents($local_file);
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "mediumfile.txt");
?>
--EXPECT--
This is line 0 of the test data.
This is line 1 of the test data.
This is line 2 of the test data.
This is line 3 of the test data.
This is line 4 of the test data.
This is line 5 of the test data.
This is line 6 of the test data.
This is line 7 of the test data.
This is line 8 of the test data.
This is line 9 of the test data.
This is line 10 of the test data.
This is line 11 of the test data.
This is line 12 of the test data.
This is line 13 of the test data.
This is line 14 of the test data.
This is line 15 of the test data.
This is line 16 of the test data.
This is line 17 of the test data.
This is line 18 of the test data.
This is line 19 of the test data.
This is line 20 of the test data.
This is line 21 of the test data.
This is line 22 of the test data.
This is line 23 of the test data.
This is line 24 of the test data.
This is line 25 of the test data.
This is line 26 of the test data.
This is line 27 of the test data.
This is line 28 of the test data.
This is line 29 of the test data.
This is line 30 of the test data.
This is line 31 of the test data.
This is line 32 of the test data.
This is line 33 of the test data.
This is line 34 of the test data.
This is line 35 of the test data.
This is line 36 of the test data.
This is line 37 of the test data.
This is line 38 of the test data.
This is line 39 of the test data.
This is line 40 of the test data.
This is line 41 of the test data.
This is line 42 of the test data.
This is line 43 of the test data.
This is line 44 of the test data.
This is line 45 of the test data.
This is line 46 of the test data.
This is line 47 of the test data.
This is line 48 of the test data.
This is line 49 of the test data.
This is line 50 of the test data.
This is line 51 of the test data.
This is line 52 of the test data.
This is line 53 of the test data.
This is line 54 of the test data.
This is line 55 of the test data.
This is line 56 of the test data.
This is line 57 of the test data.
This is line 58 of the test data.
This is line 59 of the test data.
This is line 60 of the test data.
This is line 61 of the test data.
This is line 62 of the test data.
This is line 63 of the test data.
This is line 64 of the test data.
This is line 65 of the test data.
This is line 66 of the test data.
This is line 67 of the test data.
This is line 68 of the test data.
This is line 69 of the test data.
This is line 70 of the test data.
This is line 71 of the test data.
This is line 72 of the test data.
This is line 73 of the test data.
This is line 74 of the test data.
This is line 75 of the test data.
This is line 76 of the test data.
This is line 77 of the test data.
This is line 78 of the test data.
This is line 79 of the test data.
This is line 80 of the test data.
This is line 81 of the test data.
This is line 82 of the test data.
This is line 83 of the test data.
This is line 84 of the test data.
This is line 85 of the test data.
This is line 86 of the test data.
This is line 87 of the test data.
This is line 88 of the test data.
This is line 89 of the test data.
This is line 90 of the test data.
This is line 91 of the test data.
This is line 92 of the test data.
This is line 93 of the test data.
This is line 94 of the test data.
This is line 95 of the test data.
This is line 96 of the test data.
This is line 97 of the test data.
This is line 98 of the test data.
This is line 99 of the test data.
This is line 100 of the test data.
This is line 101 of the test data.
This is line 102 of the test data.
This is line 103 of the test data.
This is line 104 of the test data.
This is line 105 of the test data.
This is line 106 of the test data.
This is line 107 of the test data.
This is line 108 of the test data.
This is line 109 of the test data.
This is line 110 of the test data.
This is line 111 of the test data.
This is line 112 of the test data.
This is line 113 of the test data.
This is line 114 of the test data.
This is line 115 of the test data.
This is line 116 of the test data.
This is line 117 of the test data.
This is line 118 of the test data.
This is line 119 of the test data.
This is line 120 of the test data.
This is line 121 of the test data.
This is line 122 of the test data.
This is line 123 of the test data.
This is line 124 of the test data.
This is line 125 of the test data.
This is line 126 of the test data.
This is line 127 of the test data.
This is line 128 of the test data.
This is line 129 of the test data.
This is line 130 of the test data.
This is line 131 of the test data.
This is line 132 of the test data.
This is line 133 of the test data.
This is line 134 of the test data.
This is line 135 of the test data.
This is line 136 of the test data.
This is line 137 of the test data.
This is line 138 of the test data.
This is line 139 of the test data.
This is line 140 of the test data.
This is line 141 of the test data.
This is line 142 of the test data.
This is line 143 of the test data.
This is line 144 of the test data.
This is line 145 of the test data.
This is line 146 of the test data.
This is line 147 of the test data.
This is line 148 of the test data.
This is line 149 of the test data.

View File

@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
ftp_set_option($ftp, FTP_AUTOSEEK, false);
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt";
$handle = fopen($local_file, 'w');
var_dump(ftp_nb_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME));
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt");
?>
--EXPECT--
int(2)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt");
?>
--EXPECT--
int(2)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt");
?>
--EXPECT--
int(2)

View File

@ -18,7 +18,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt";
touch($local_file);
ftp_nb_get($ftp, $local_file, 'fget_large.txt', FTP_BINARY, 5368709119);
$fp = fopen($local_file, 'r');
@ -29,7 +29,7 @@ fclose($fp);
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt");
?>
--EXPECT--
string(1) "X"

View File

@ -368,6 +368,13 @@ if ($pid) {
}
fputs($s, "226 Closing data Connection.\r\n");
break;
case "mediumfile":
fputs($s, "150 File status okay; about to open data connection.\r\n");
for($i = 0; $i < 150; $i++){
fputs($fs, "This is line $i of the test data.\n");
}
fputs($s, "226 Closing data Connection.\r\n");
default:
fputs($s, "550 {$matches[1]}: No such file or directory \r\n");
break;

View File

@ -61,7 +61,7 @@
PHPAPI extern const char php_sig_gif[3];
PHPAPI extern const char php_sig_jpg[3];
PHPAPI extern const char php_sig_png[3];
PHPAPI extern const char php_sig_png[8];
extern zend_module_entry gd_module_entry;
#define phpext_gd_ptr &gd_module_entry

View File

@ -127,6 +127,9 @@ static char* getPreferredTag(char* gf_tag)
int grOffset = 0;
grOffset = findOffset( LOC_GRANDFATHERED ,gf_tag);
if(grOffset < 0) {
return NULL;
}
if( grOffset < LOC_PREFERRED_GRANDFATHERED_LEN ){
/* return preferred tag */
result = estrdup( LOC_PREFERRED_GRANDFATHERED[grOffset] );

View File

@ -2107,6 +2107,7 @@ PHP_FUNCTION(ldap_set_rebind_proc)
/* unregister rebind procedure */
if (ld->rebindproc != NULL) {
zval_dtor(ld->rebindproc);
FREE_ZVAL(ld->rebindproc);
ld->rebindproc = NULL;
ldap_set_rebind_proc(ld->link, NULL, NULL);
}

View File

@ -217,14 +217,26 @@ array(2) {
[1]=>
resource(%d) of type (ldap result)
}
NULL
NULL
array(1) {
["count"]=>
int(0)
}
array(1) {
["count"]=>
int(0)
}
array(2) {
[0]=>
resource(%d) of type (ldap result)
[1]=>
resource(%d) of type (ldap result)
}
NULL
NULL
array(1) {
["count"]=>
int(0)
}
array(1) {
["count"]=>
int(0)
}
===DONE===

View File

@ -142,7 +142,7 @@ const struct mbfl_convert_vtbl vtbl_wchar_2022jp_kddi = {
int
mbfl_filt_conv_2022jp_mobile_wchar(int c, mbfl_convert_filter *filter)
{
int c1, s, w, snd;
int c1, s, w, snd = 0;
retry:
switch (filter->status & 0xf) {

View File

@ -134,7 +134,7 @@ int
mbfl_filt_conv_jis2004_wchar(int c, mbfl_convert_filter *filter)
{
int k;
int c1, c2, s, s1, s2, w = 0, w1;
int c1, c2, s, s1 = 0, s2 = 0, w = 0, w1;
retry:
switch (filter->status & 0xf) {

View File

@ -605,7 +605,7 @@ mbfilter_unicode2sjis_emoji_sb(int c, int *s1, mbfl_convert_filter *filter)
int
mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter)
{
int c1, s, s1, s2, w;
int c1, s, s1 = 0, s2 = 0, w;
int snd = 0;
retry:

View File

@ -985,7 +985,7 @@ mbfl_strpos(
{
int result;
mbfl_string _haystack_u8, _needle_u8;
const mbfl_string *haystack_u8, *needle_u8;
const mbfl_string *haystack_u8, *needle_u8 = NULL;
const unsigned char *u8_tbl;
if (haystack == NULL || haystack->val == NULL || needle == NULL || needle->val == NULL) {

View File

@ -527,7 +527,7 @@ mysqlnd_connect_run_authentication(
if (!auth_plugin) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method umknown to the client");
SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
break;
}
}
@ -2162,7 +2162,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn,
if (!auth_plugin) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method umknown to the client");
SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
break;
}
}

View File

@ -232,7 +232,7 @@ typedef struct odbc_connection {
} odbc_connection;
typedef struct odbc_result_value {
char name[32];
char name[256];
char *value;
SQLLEN vallen;
SQLLEN coltype;

View File

@ -4613,9 +4613,6 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
GET_VER_OPT_STRING("local_cert", certfile);
if (certfile) {
X509 *cert = NULL;
EVP_PKEY *key = NULL;
SSL *tmpssl;
char resolved_path_buff[MAXPATHLEN];
const char * private_key = NULL;
@ -4642,16 +4639,22 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
}
}
tmpssl = SSL_new(ctx);
cert = SSL_get_certificate(tmpssl);
if (cert) {
key = X509_get_pubkey(cert);
EVP_PKEY_copy_parameters(key, SSL_get_privatekey(tmpssl));
EVP_PKEY_free(key);
}
SSL_free(tmpssl);
#if OPENSSL_VERSION_NUMBER < 0x10001001L
do {
/* Unnecessary as of OpenSSLv1.0.1 (will segfault if used with >= 10001001 ) */
X509 *cert = NULL;
EVP_PKEY *key = NULL;
SSL *tmpssl = SSL_new(ctx);
cert = SSL_get_certificate(tmpssl);
if (cert) {
key = X509_get_pubkey(cert);
EVP_PKEY_copy_parameters(key, SSL_get_privatekey(tmpssl));
EVP_PKEY_free(key);
}
SSL_free(tmpssl);
} while (0);
#endif
if (!SSL_CTX_check_private_key(ctx)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Private key does not match certificate!");
}

View File

@ -460,7 +460,7 @@ static void pdo_stmt_construct(pdo_stmt_t *stmt, zval *object, zend_class_entry
if (dbstmt_ce->constructor) {
zend_fcall_info fci;
zend_fcall_info_cache fcc;
zval *retval;
zval *retval = NULL;
fci.size = sizeof(zend_fcall_info);
fci.function_table = &dbstmt_ce->function_table;
@ -495,7 +495,7 @@ static void pdo_stmt_construct(pdo_stmt_t *stmt, zval *object, zend_class_entry
zval_dtor(object);
ZVAL_NULL(object);
object = NULL; /* marks failure */
} else {
} else if (retval) {
zval_ptr_dtor(&retval);
}

View File

@ -350,9 +350,10 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
DBSETLAPP(H->login, vars[1].optval);
/* DBSETLDBNAME is only available in FreeTDS 0.92 or above */
#ifdef DBSETLDBNAME
if (vars[3].optval) {
DBSETLDBNAME(H->login, vars[3].optval);
if(FAIL == DBSETLDBNAME(H->login, vars[3].optval)) goto cleanup;
}
#endif
@ -362,6 +363,16 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
goto cleanup;
}
/*
* FreeTDS < 0.92 does not support the DBSETLDBNAME option
* Send use database here after login (Will not work with SQL Azure)
*/
#ifndef DBSETLDBNAME
if (vars[3].optval) {
if(FAIL == dbuse(H->link, vars[3].optval)) goto cleanup;
}
#endif
#if PHP_DBLIB_IS_MSSQL
/* dblib do not return more than this length from text/image */
DBSETOPT(H->link, DBTEXTLIMIT, "2147483647");
@ -377,23 +388,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
dbh->max_escaped_char_length = 2;
dbh->alloc_own_columns = 1;
#if 0
/* Cache the supported data types from the servers systypes table */
if(dbcmd(H->link, "select usertype, name from systypes order by usertype") != FAIL) {
if(dbsqlexec(H->link) != FAIL) {
dbresults(H->link);
while (dbnextrow(H->link) == SUCCESS) {
val = dbdata(H->link, 1);
add_index_string(pdo_dblib_datatypes, *val, dbdata(H->link, 2), 1);
}
}
/* Throw out any remaining resultsets */
dbcancel(H-link);
}
#endif
cleanup:
for (i = 0; i < nvars; i++) {
if (vars[i].freeme) {

View File

@ -0,0 +1,33 @@
--TEST--
Bug #66033 (Segmentation Fault when constructor of PDO statement throws an exception)
--SKIPIF--
<?php
if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
?>
--FILE--
<?php
class DBStatement extends PDOStatement {
public $dbh;
protected function __construct($dbh) {
$this->dbh = $dbh;
throw new Exception("Blah");
}
}
$pdo = new PDO('sqlite::memory:', null, null);
$pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('DBStatement',
array($pdo)));
$pdo->exec("CREATE TABLE IF NOT EXISTS messages (
id INTEGER PRIMARY KEY,
title TEXT,
message TEXT,
time INTEGER)");
try {
$pdoStatement = $pdo->query("select * from messages");
} catch (Exception $e) {
var_dump($e->getMessage());
}
?>
--EXPECTF--
string(4) "Blah"

View File

@ -2639,7 +2639,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
Bucket *p;
fci.param_count = 0;
fci.params = safe_emalloc(sizeof(zval*), ht->nNumOfElements, 0);
fci.params = safe_emalloc(sizeof(zval***), ht->nNumOfElements, 0);
p = ht->pListHead;
while (p != NULL) {
fci.params[fci.param_count++] = (zval**)p->pData;

View File

@ -168,11 +168,7 @@ static int phar_compare_dir_name(const void *a, const void *b TSRMLS_DC) /* {{{
f = *((Bucket **) a);
s = *((Bucket **) b);
#if (PHP_MAJOR_VERSION < 6)
result = zend_binary_strcmp(f->arKey, f->nKeyLength, s->arKey, s->nKeyLength);
#else
result = zend_binary_strcmp(f->key.arKey.s, f->nKeyLength, s->key.arKey.s, s->nKeyLength);
#endif
if (result < 0) {
return -1;

View File

@ -1262,8 +1262,10 @@ alias_success:
spprintf(error, 0, "alias \"%s\" is already used for archive \"%s\" cannot be overloaded with \"%s\"", alias, (*fd_ptr)->fname, fname);
}
if (SUCCESS == phar_free_alias(*fd_ptr, alias, alias_len TSRMLS_CC)) {
efree(*error);
*error = NULL;
if (error) {
efree(*error);
*error = NULL;
}
}
return FAILURE;
}

View File

@ -6,6 +6,8 @@
extern zend_module_entry extname_module_entry;
#define phpext_extname_ptr &extname_module_entry
#define PHP_EXTNAME_VERSION "0.1.0" /* Replace with version number for your extension */
#ifdef PHP_WIN32
# define PHP_EXTNAME_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4

View File

@ -41,7 +41,7 @@ zend_module_entry extname_module_entry = {
PHP_RSHUTDOWN(extname), /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(extname),
#if ZEND_MODULE_API_NO >= 20010901
"0.1", /* Replace with version number for your extension */
PHP_EXTNAME_VERSION,
#endif
STANDARD_MODULE_PROPERTIES
};

View File

@ -2644,16 +2644,17 @@ static sdlAttributePtr make_persistent_sdl_attribute(sdlAttributePtr attr, HashT
zend_hash_internal_pointer_reset(pattr->extraAttributes);
while (zend_hash_get_current_data(attr->extraAttributes, (void**)&tmp) == SUCCESS) {
pextra = malloc(sizeof(sdlExtraAttribute));
memset(pextra, 0, sizeof(sdlExtraAttribute));
if ((*tmp)->ns) {
pextra->ns = strdup((*tmp)->ns);
}
if ((*tmp)->val) {
pextra->val = strdup((*tmp)->val);
}
if (zend_hash_get_current_key_ex(attr->extraAttributes, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
pextra = malloc(sizeof(sdlExtraAttribute));
memset(pextra, 0, sizeof(sdlExtraAttribute));
if (zend_hash_get_current_key_ex(attr->extraAttributes, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
if ((*tmp)->ns) {
pextra->ns = strdup((*tmp)->ns);
}
if ((*tmp)->val) {
pextra->val = strdup((*tmp)->val);
}
zend_hash_add(pattr->extraAttributes, key, key_len, (void*)&pextra, sizeof(sdlExtraAttributePtr), NULL);
}

View File

@ -607,6 +607,8 @@ static char *php_strerror(int error TSRMLS_DC) /* {{{ */
/* }}} */
#if HAVE_IPV6
static int php_get_if_index_from_string(const char *val, unsigned *out TSRMLS_DC);
/* Sets addr by hostname, or by ip in string form (AF_INET6) */
static int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socket *php_sock TSRMLS_DC) /* {{{ */
{
@ -615,6 +617,7 @@ static int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socke
struct addrinfo hints;
struct addrinfo *addrinfo = NULL;
#endif
char *scope = strchr(string, '%');
if (inet_pton(AF_INET6, string, &tmp)) {
memcpy(&(sin6->sin6_addr.s6_addr), &(tmp.s6_addr), sizeof(struct in6_addr));
@ -649,6 +652,22 @@ static int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socke
}
if (scope++) {
long lval = 0;
double dval = 0;
unsigned scope_id = 0;
if (IS_LONG == is_numeric_string(scope, strlen(scope), &lval, &dval, 0)) {
if (lval > 0 && lval <= UINT_MAX) {
scope_id = lval;
}
} else {
php_get_if_index_from_string(scope, &scope_id TSRMLS_CC);
}
sin6->sin6_scope_id = scope_id;
}
return 1;
}
/* }}} */
@ -714,6 +733,28 @@ static int php_set_inet46_addr(php_sockaddr_storage *ss, socklen_t *ss_len, char
return 0;
}
static int php_get_if_index_from_string(const char *val, unsigned *out TSRMLS_DC)
{
#if HAVE_IF_NAMETOINDEX
unsigned int ind;
ind = if_nametoindex(val);
if (ind == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"no interface with name \"%s\" could be found", val);
return FAILURE;
} else {
*out = ind;
return SUCCESS;
}
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"this platform does not support looking up an interface by "
"name, an integer interface index must be supplied instead");
return FAILURE;
#endif
}
static int php_get_if_index_from_zval(zval *val, unsigned *out TSRMLS_DC)
{
int ret;
@ -729,26 +770,10 @@ static int php_get_if_index_from_zval(zval *val, unsigned *out TSRMLS_DC)
ret = SUCCESS;
}
} else {
#if HAVE_IF_NAMETOINDEX
unsigned int ind;
zval_add_ref(&val);
convert_to_string_ex(&val);
ind = if_nametoindex(Z_STRVAL_P(val));
if (ind == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"no interface with name \"%s\" could be found", Z_STRVAL_P(val));
ret = FAILURE;
} else {
*out = ind;
ret = SUCCESS;
}
ret = php_get_if_index_from_string(Z_STRVAL_P(val), out TSRMLS_CC);
zval_ptr_dtor(&val);
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"this platform does not support looking up an interface by "
"name, an integer interface index must be supplied instead");
ret = FAILURE;
#endif
}
return ret;

View File

@ -7,16 +7,16 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_getflags_basic.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_getflags_basic.csv');
$fo->setFlags(SplFileObject::DROP_NEW_LINE);
var_dump($fo->getFlags());
?>
--CLEAN--
<?php
unlink('testdata.csv');
unlink('SplFileObject_getflags_basic.csv');
?>
--EXPECT--
int(1)

View File

@ -7,10 +7,10 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_getflags_error001.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_getflags_error001.csv');
$fo->setFlags(SplFileObject::READ_CSV);
$fo->setFlags(SplFileObject::DROP_NEW_LINE);
@ -20,7 +20,7 @@ var_dump($fo->getFlags());
?>
--CLEAN--
<?php
unlink('testdata.csv');
unlink('SplFileObject_getflags_error001.csv');
?>
--EXPECT--
int(1)

View File

@ -5,9 +5,9 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_getflags_error002.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_getflags_error002.csv');
$fo->setFlags(SplFileObject::READ_CSV);
$fo->getFlags('fake');
@ -15,7 +15,7 @@ $fo->getFlags('fake');
?>
--CLEAN--
<?php
unlink('testdata.csv');
unlink('SplFileObject_getflags_error002.csv');
?>
--EXPECTF--
Warning: SplFileObject::getFlags() expects exactly 0 parameters, 1 given in %s on line %d

View File

@ -7,12 +7,16 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_rewind_error001.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_rewind_error001.csv');
$fo->rewind( "invalid" );
?>
--CLEAN--
<?php
unlink('SplFileObject_rewind_error001.csv');
?>
--EXPECTF--
Warning: SplFileObject::rewind() expects exactly 0 parameters, 1 given in %s on line %d

View File

@ -84,6 +84,30 @@
#define HTTP_WRAPPER_HEADER_INIT 1
#define HTTP_WRAPPER_REDIRECTED 2
static inline void strip_header(char *header_bag, char *lc_header_bag,
const char *lc_header_name)
{
char *lc_header_start = strstr(lc_header_bag, lc_header_name);
char *header_start = header_bag + (lc_header_start - lc_header_bag);
if (lc_header_start
&& (lc_header_start == lc_header_bag || *(lc_header_start-1) == '\n')
) {
char *lc_eol = strchr(lc_header_start, '\n');
char *eol = header_start + (lc_eol - lc_header_start);
if (lc_eol) {
size_t eollen = strlen(lc_eol);
memmove(lc_header_start, lc_eol+1, eollen);
memmove(header_start, eol+1, eollen);
} else {
*lc_header_start = '\0';
*header_start = '\0';
}
}
}
php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context, int redirect_max, int flags STREAMS_DC TSRMLS_DC) /* {{{ */
{
php_stream *stream = NULL;
@ -425,40 +449,17 @@ finish:
if (tmp && strlen(tmp) > 0) {
char *s;
if (!header_init) { /* Remove post headers for redirects */
int l = strlen(tmp);
char *s2, *tmp_c = estrdup(tmp);
php_strtolower(tmp_c, l);
if ((s = strstr(tmp_c, "content-length:"))) {
if ((s2 = memchr(s, '\n', tmp_c + l - s))) {
int b = tmp_c + l - 1 - s2;
memmove(tmp, tmp + (s2 + 1 - tmp_c), b);
memmove(tmp_c, s2 + 1, b);
} else {
tmp[s - tmp_c] = *s = '\0';
}
l = strlen(tmp_c);
}
if ((s = strstr(tmp_c, "content-type:"))) {
if ((s2 = memchr(s, '\n', tmp_c + l - s))) {
memmove(tmp, tmp + (s2 + 1 - tmp_c), tmp_c + l - 1 - s2);
} else {
tmp[s - tmp_c] = '\0';
}
}
efree(tmp_c);
tmp_c = php_trim(tmp, strlen(tmp), NULL, 0, NULL, 3 TSRMLS_CC);
efree(tmp);
tmp = tmp_c;
}
user_headers = estrdup(tmp);
/* Make lowercase for easy comparison against 'standard' headers */
php_strtolower(tmp, strlen(tmp));
if (!header_init) {
/* strip POST headers on redirect */
strip_header(user_headers, tmp, "content-length:");
strip_header(user_headers, tmp, "content-type:");
}
if ((s = strstr(tmp, "user-agent:")) &&
(s == tmp || *(s-1) == '\r' || *(s-1) == '\n' ||
*(s-1) == '\t' || *(s-1) == ' ')) {

View File

@ -1,5 +1,9 @@
--TEST--
Test disk_free_space and its alias diskfreespace() functions : basic functionality
--SKIPIF--
<?php
if (getenv("TRAVIS") === "true") die("skip inaccurate on TravisCI");
?>
--INI--
memory_limit=32M
--FILE--

View File

@ -5,11 +5,17 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
/* Connect to it */
$client = fsockopen('tcp://127.0.0.1:31337');
$client = fsockopen("tcp://127.0.0.1:$port");
if (!$client) {
die("Unable to create socket");

View File

@ -16,11 +16,17 @@ for ($i = 0; $i < 1000; $i++) {
}
fclose($fd);
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
/* Connect to it */
$client = fsockopen('tcp://127.0.0.1:31337');
$client = fsockopen("tcp://127.0.0.1:$port");
if (!$client) {
die("Unable to create socket");

View File

@ -17,10 +17,10 @@ if(substr(PHP_OS, 0, 3) == "WIN")
echo "*** Testing file_put_contents() : usage variation ***\n";
$filename = dirname(__FILE__).'/fileGetContentsVar9.tmp';
$softlink = dirname(__FILE__).'/fileGetContentsVar9.SoftLink';
$hardlink = dirname(__FILE__).'/fileGetContentsVar9.HardLink';
$chainlink = dirname(__FILE__).'/fileGetContentsVar9.ChainLink';
$filename = dirname(__FILE__).'/filePutContentsVar9.tmp';
$softlink = dirname(__FILE__).'/filePutContentsVar9.SoftLink';
$hardlink = dirname(__FILE__).'/filePutContentsVar9.HardLink';
$chainlink = dirname(__FILE__).'/filePutContentsVar9.ChainLink';
// link files even though it original file doesn't exist yet

View File

@ -3,13 +3,20 @@ Testing fread() on a TCP server socket
--FILE--
<?php
$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
socket_set_timeout($tcp_socket, 0, 1000);
socket_set_timeout($server, 0, 1000);
var_dump(fread($tcp_socket, 1));
var_dump(fread($server, 1));
fclose($tcp_socket);
fclose($server);
?>
--EXPECT--

View File

@ -3,7 +3,7 @@ Bug #41445 (parse_ini_file() function parses octal numbers in section names) - 2
--FILE--
<?php
$file = dirname(__FILE__)."/bug41445.ini";
$file = dirname(__FILE__)."/bug41445_1.ini";
$data = <<<DATA
[2454.33]

View File

@ -784,15 +784,15 @@ string(20) "array (
Iteration 13
array (
0 => 10.5,
1 => 5.6,
1 => 5.5999999999999996,
)
array (
0 => 10.5,
1 => 5.6,
1 => 5.5999999999999996,
)
string(34) "array (
string(49) "array (
0 => 10.5,
1 => 5.6,
1 => 5.5999999999999996,
)"

View File

@ -96,9 +96,9 @@ string(1) "0"
-- Iteration: -0.1 --
-0.1
-0.1
string(4) "-0.1"
-0.10000000000000001
-0.10000000000000001
string(20) "-0.10000000000000001"
-- Iteration: 10.0000000000000000005 --
@ -120,9 +120,9 @@ string(6) "100000"
-- Iteration: 1e-5 --
1.0E-5
1.0E-5
string(6) "1.0E-5"
1.0000000000000001E-5
1.0000000000000001E-5
string(21) "1.0000000000000001E-5"
-- Iteration: 1e+5 --
@ -144,9 +144,9 @@ string(6) "100000"
-- Iteration: 1E-5 --
1.0E-5
1.0E-5
string(6) "1.0E-5"
1.0000000000000001E-5
1.0000000000000001E-5
string(21) "1.0000000000000001E-5"
-- Iteration: .5e+7 --
@ -156,20 +156,20 @@ string(7) "5000000"
-- Iteration: .6e-19 --
6.0E-20
6.0E-20
string(7) "6.0E-20"
6.0000000000000006E-20
6.0000000000000006E-20
string(22) "6.0000000000000006E-20"
-- Iteration: .05E+44 --
5.0E+42
5.0E+42
string(7) "5.0E+42"
5.0000000000000001E+42
5.0000000000000001E+42
string(22) "5.0000000000000001E+42"
-- Iteration: .0034E-30 --
3.4E-33
3.4E-33
string(7) "3.4E-33"
3.4000000000000001E-33
3.4000000000000001E-33
string(22) "3.4000000000000001E-33"
===DONE===

View File

@ -233,15 +233,15 @@ string(20) "array (
--Iteration: array(10.5, 5.6) --
array (
0 => 10.5,
1 => 5.6,
1 => 5.5999999999999996,
)
array (
0 => 10.5,
1 => 5.6,
1 => 5.5999999999999996,
)
string(34) "array (
string(49) "array (
0 => 10.5,
1 => 5.6,
1 => 5.5999999999999996,
)"
@ -274,4 +274,4 @@ string(41) "array (
1 => 'test',
)"
===DONE===
===DONE===

View File

@ -0,0 +1,118 @@
--TEST--
Bug #61548 (content-type must appear at the end of headers)
--INI--
allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
<?php
require 'server.inc';
function do_test($header) {
$options = [
'http' => [
'method' => 'POST',
'header' => $header,
'follow_location' => true,
],
];
$ctx = stream_context_create($options);
$responses = [
"data://text/plain,HTTP/1.1 201\r\nLocation: /foo\r\n\r\n",
"data://text/plain,HTTP/1.1 200\r\nConnection: close\r\n\r\n",
];
$pid = http_server('tcp://127.0.0.1:12342', $responses, $output);
$fd = fopen('http://127.0.0.1:12342/', 'rb', false, $ctx);
fseek($output, 0, SEEK_SET);
echo stream_get_contents($output);
http_server_kill($pid);
}
do_test("First:1\nSecond:2\nContent-type: text/plain");
do_test("First:1\nSecond:2\nContent-type: text/plain\n");
do_test("First:1\nSecond:2\nContent-type: text/plain\nThird:");
do_test("First:1\nContent-type:text/plain\nSecond:2");
do_test("First:1\nContent-type:text/plain\nSecond:2\n");
do_test("First:1\nContent-type:text/plain\nSecond:2\nThird:");
?>
Done
--EXPECT--
POST / HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
Content-type: text/plain
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
Content-type: text/plain
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
Content-type: text/plain
Third:
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
Third:
POST / HTTP/1.0
Host: 127.0.0.1:12342
First:1
Content-type:text/plain
Second:2
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
First:1
Content-type:text/plain
Second:2
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
First:1
Content-type:text/plain
Second:2
Third:
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
First:1
Second:2
Third:
Done

View File

@ -11,12 +11,18 @@ Test fsockopen() function : basic functionality
echo "*** Testing fsockopen() : basic functionality ***\n";
echo "Open a server socket\n";
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
// Initialise all required variables
$hostname = 'tcp://127.0.0.1'; // loopback address
$port = 31337;
$errno = null;
$errstr = null;
$timeout = 1.5;

View File

@ -4,11 +4,17 @@ testing fsockopen without a protocol string
<?php
echo "Open a server socket\n";
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
echo "\nCalling fsockopen() without a protocol in the hostname string:\n";
$hostname = '127.0.0.1';
$port = '31337';
$client = fsockopen($hostname, $port);
var_dump($client);
fclose($client);

View File

@ -6,14 +6,22 @@ stream_socket_shutdown() test on IPv4 TCP Loopback
?>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
if (!$server) {
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET socket [server]');
}
/* Connect and send request 1 */
$client1 = stream_socket_client('tcp://127.0.0.1:31337');
$client1 = stream_socket_client("tcp://127.0.0.1:$port");
if (!$client1) {
die('Unable to create AF_INET socket [client]');
}
@ -22,7 +30,7 @@ stream_socket_shutdown() test on IPv4 TCP Loopback
@fwrite($client1, "Error 1\n");
/* Connect and send request 2 */
$client2 = stream_socket_client('tcp://127.0.0.1:31337');
$client2 = stream_socket_client("tcp://127.0.0.1:$port");
if (!$client2) {
die('Unable to create AF_INET socket [client]');
}

View File

@ -3,9 +3,17 @@ Testing socket_get_status()
--FILE--
<?php
$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
var_dump(socket_get_status($tcp_socket));
fclose($tcp_socket);
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
var_dump(socket_get_status($server));
fclose($server);
?>
--EXPECTF--

View File

@ -2,14 +2,21 @@
Streams Based IPv4 TCP Loopback test
--FILE--
<?php # vim:ft=php:
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET socket [server]');
}
/* Connect to it */
$client = stream_socket_client('tcp://127.0.0.1:31337');
$client = stream_socket_client("tcp://127.0.0.1:$port");
if (!$client) {
die('Unable to create AF_INET socket [client]');
}

View File

@ -10,14 +10,22 @@ Streams Based IPv6 TCP Loopback test
?>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('tcp://[::1]:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://[::1]:$port");
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET6 socket [server]');
}
/* Connect to it */
$client = stream_socket_client('tcp://[::1]:31337');
$client = stream_socket_client("tcp://[::1]:$port");
if (!$client) {
die('Unable to create AF_INET6 socket [client]');
}

View File

@ -16,14 +16,22 @@ Streams Based IPv6 UDP Loopback test
?>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('udp://[::1]:31337', $errno, $errstr, STREAM_SERVER_BIND);
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("udp://[::1]:$port", $errno, $errstr, STREAM_SERVER_BIND);
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET6 socket [server]');
}
/* Connect to it */
$client = stream_socket_client('udp://[::1]:31337');
$client = stream_socket_client("udp://[::1]:$port");
if (!$client) {
die('Unable to create AF_INET6 socket [client]');
}

View File

@ -0,0 +1,60 @@
--TEST--
Bug #64146 (serialize incorrectly saving objects when they are cloned)
--FILE--
<?php
echo "Test\n";
class A
{
public $a = array();
public function __construct()
{
$this->a[] = new B(1);
$this->a[] = new B(2);
}
}
class B implements Serializable
{
public $b;
public function __construct($c)
{
$this->b = new C($c);
}
public function serialize()
{
return serialize(clone $this->b);
}
public function unserialize($data)
{
$this->b = unserialize($data);
}
}
class C
{
public $c;
public function __construct($c)
{
$this->c = $c;
}
}
$a = unserialize(serialize(new A()));
print $a->a[0]->b->c . "\n";
print $a->a[1]->b->c . "\n";
?>
Done
--EXPECT--
Test
1
2
Done

View File

@ -0,0 +1,83 @@
--TEST--
Bug #65806 (unserialize fails with object which is referenced multiple times)
--FILE--
<?php
class myObjA {}
class myObjB {
public $attrA;
public $attrB;
}
class myObjC {
public $attrC;
public $attrD;
}
class myList {
private $_serialized;
private $_obj;
public function __construct($obj)
{
$this->_obj = $obj;
$this->_serialized = serialize($this->_obj);
}
public function get()
{
return $this->_obj;
}
public function __sleep()
{
$this->_serialized = serialize($this->_obj);
return array(
"\0" . __CLASS__ . "\0_serialized",
);
}
public function __wakeup()
{
$this->_obj = unserialize($this->_serialized);
}
}
echo "SCRIPT START" . PHP_EOL;
$objA = new myObjA();
$objB = new myObjB();
$objC = new myObjC();
$objB->attrA = new ArrayIterator();
$objB->attrB = $objA;
$objC->attrC = $objB;
$objC->attrD = $objA;
$list = new myList($objC);
echo 'check ' . check($list->get()) . PHP_EOL;
echo "start serialize/unserialize" . PHP_EOL;
$newList = unserialize(serialize($list));
echo "finish serialize/unserialize" . PHP_EOL;
//after unserialize the property myObjC::attrD is null instead of expected object
echo 'check ' . check($newList->get()) . PHP_EOL;
echo "SCRIPT END" . PHP_EOL ;
function check(myObjC $obj) {
if (!is_object($obj->attrC)) {
return 'failed (myObjC::attrC => ' . var_export($obj->attrC, true) . ')';
}
if (!is_object($obj->attrD)) {
return 'failed (myObjC::attrD => ' . var_export($obj->attrD, true) . ')';
}
return 'successful';
}
?>
--EXPECT--
SCRIPT START
check successful
start serialize/unserialize
finish serialize/unserialize
check successful
SCRIPT END

View File

@ -13,10 +13,16 @@ echo "*** Testing stream_set_timeout() : error conditions ***\n";
//Test stream_set_timeout with one more than the expected number of arguments
echo "\n-- Testing stream_set_timeout() function with more than expected no. of arguments --\n";
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
/* Connect to it */
$client = fsockopen('tcp://127.0.0.1:31337');
$client = fsockopen("tcp://127.0.0.1:$port");
$seconds = 10;
$microseconds = 10;

View File

@ -20,7 +20,7 @@ $arg3 = array("one","two","three");
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic1.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -23,7 +23,7 @@ $arg2 = array(111,222);
$arg3 = array(111,222,333);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic2.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -24,7 +24,7 @@ $arg2 = array(11.11,22.22);
$arg3 = array(11.11,22.22,33.33);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic3.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -19,7 +19,7 @@ $arg2 = array(TRUE,FALSE);
$arg3 = array(TRUE,FALSE,TRUE);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic4.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -19,7 +19,7 @@ $arg2 = array(65,66);
$arg3 = array(65,66,67);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic5.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -20,7 +20,7 @@ $arg2 = array(1000,2000);
$arg3 = array(1000,2000,3000);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic6.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567);
$arg3 = array(-1111,-1234567,-2345432);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic7.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567);
$arg3 = array(-1111,-1234567,-2345432);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic7_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -19,7 +19,7 @@ $arg2 = array(021,0347);
$arg3 = array(021,0347,05678);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic8.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -24,7 +24,7 @@ $arg2 = array(11,132);
$arg3 = array(11,132,177);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic9.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation11.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation11_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation12.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation12_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation13.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation13_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation14.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation14_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

Some files were not shown because too many files have changed in this diff Show More