summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/curl/tests/bug54995.phpt2
-rw-r--r--ext/date/tests/big_year.phpt2
-rw-r--r--ext/date/tests/bug26317.phpt2
-rw-r--r--ext/date/tests/bug26320.phpt2
-rw-r--r--ext/date/tests/bug41523-64bit.phpt2
-rw-r--r--ext/date/tests/bug41523.phpt2
-rw-r--r--ext/date/tests/bug75851.phpt2
-rw-r--r--ext/date/tests/mktime-3-64bit.phpt2
-rw-r--r--ext/date/tests/mktime-3.phpt2
-rw-r--r--ext/date/tests/strtotime-mysql-64bit.phpt2
-rw-r--r--ext/date/tests/strtotime-mysql.phpt2
-rw-r--r--ext/date/tests/strtotime3-64bit.phpt2
-rw-r--r--ext/date/tests/strtotime3.phpt2
-rw-r--r--ext/gd/tests/bug77272.phpt2
-rw-r--r--ext/gd/tests/imagepolygon_basic.phpt5
-rw-r--r--ext/intl/tests/bug59597_32.phpt2
-rw-r--r--ext/intl/tests/bug59597_64.phpt2
-rw-r--r--ext/ldap/tests/ldap_sasl_bind_basic.phpt2
-rw-r--r--ext/mysqli/tests/045.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_auth_pam.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_expire_password.phpt2
-rw-r--r--ext/pdo/tests/debug_emulated_prepares.phpt2
-rw-r--r--ext/pdo_mysql/tests/bug_39858.phpt4
-rw-r--r--ext/pdo_mysql/tests/bug_41125.phpt4
-rw-r--r--ext/pdo_mysql/tests/bug_41997.phpt4
-rw-r--r--ext/pdo_mysql/tests/bug_42499.phpt4
-rw-r--r--ext/pdo_mysql/tests/bug_44707.phpt4
-rw-r--r--ext/pdo_mysql/tests/bug_61411.phpt4
-rw-r--r--ext/pdo_mysql/tests/bug_pecl_7976.phpt4
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt4
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt4
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt4
-rw-r--r--ext/readline/tests/readline_without_input.phpt5
-rw-r--r--ext/sockets/tests/mcast_ipv4_send_error.phpt6
-rw-r--r--ext/sockets/tests/mcast_ipv6_recv.phpt6
-rw-r--r--ext/sockets/tests/mcast_ipv6_recv_limited.phpt6
-rw-r--r--ext/sockets/tests/socket_export_stream-3.phpt2
-rw-r--r--ext/sockets/tests/socket_import_stream-3.phpt2
-rw-r--r--ext/standard/tests/file/lstat_stat_variation5.phpt1
-rw-r--r--sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt2
-rw-r--r--sapi/cli/tests/upload_2G.phpt12
-rw-r--r--tests/basic/bug20539.phpt2
42 files changed, 74 insertions, 57 deletions
diff --git a/ext/curl/tests/bug54995.phpt b/ext/curl/tests/bug54995.phpt
index ea2b739762..0250749731 100644
--- a/ext/curl/tests/bug54995.phpt
+++ b/ext/curl/tests/bug54995.phpt
@@ -4,7 +4,7 @@ Bug #54995 (Missing CURLINFO_RESPONSE_CODE support)
<?php
include 'skipif.inc';
-if ($curl_version['version_number'] > 0x070a08) {
+if (curl_version()['version_number'] > 0x070a08) {
exit("skip: tests works a versions of curl >= 7.10.8");
}
?>
diff --git a/ext/date/tests/big_year.phpt b/ext/date/tests/big_year.phpt
index 6f86e524b5..d1e70b6b0a 100644
--- a/ext/date/tests/big_year.phpt
+++ b/ext/date/tests/big_year.phpt
@@ -1,7 +1,7 @@
--TEST--
Handling of large year values
--SKIPIF--
-<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
--FILE--
<?php
date_default_timezone_set("America/Toronto");
diff --git a/ext/date/tests/bug26317.phpt b/ext/date/tests/bug26317.phpt
index 27d6ff1250..652cc67879 100644
--- a/ext/date/tests/bug26317.phpt
+++ b/ext/date/tests/bug26317.phpt
@@ -3,9 +3,11 @@ Bug #26317 (military timezone offset signedness)
--INI--
date.timezone=GMT0
--SKIPIF--
+<?php
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ environment variable\n");
}
+?>
--FILE--
<?php
echo date("Y-m-d H:i:s\n", strtotime("2003-11-19 16:20:42 Z"));
diff --git a/ext/date/tests/bug26320.phpt b/ext/date/tests/bug26320.phpt
index e742c39da5..48e901117c 100644
--- a/ext/date/tests/bug26320.phpt
+++ b/ext/date/tests/bug26320.phpt
@@ -3,9 +3,11 @@ Bug #26320 (strtotime handling of XML Schema/ISO 8601 format)
--INI--
date.timezone=GMT0
--SKIPIF--
+<?php
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ environment variable\n");
}
+?>
--FILE--
<?php
echo date("Y-m-d H:i:s\n", strtotime("2003-11-19T12:30:42"));
diff --git a/ext/date/tests/bug41523-64bit.phpt b/ext/date/tests/bug41523-64bit.phpt
index 0c0e8076c3..ca01ee0f50 100644
--- a/ext/date/tests/bug41523-64bit.phpt
+++ b/ext/date/tests/bug41523-64bit.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30) (64 bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
--FILE--
<?php
date_default_timezone_set("UTC");
diff --git a/ext/date/tests/bug41523.phpt b/ext/date/tests/bug41523.phpt
index 68fe1bd6a3..6df2006d57 100644
--- a/ext/date/tests/bug41523.phpt
+++ b/ext/date/tests/bug41523.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30) (32 bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
--FILE--
<?php
date_default_timezone_set("UTC");
diff --git a/ext/date/tests/bug75851.phpt b/ext/date/tests/bug75851.phpt
index 59bdb054ff..d447792b93 100644
--- a/ext/date/tests/bug75851.phpt
+++ b/ext/date/tests/bug75851.phpt
@@ -1,7 +1,7 @@
--TEST--
Test for bug #75851: Year component overflow with date formats "c", "o", "r" and "y"
--SKIPIF--
-<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
--INI--
date.timezone = UTC
--FILE--
diff --git a/ext/date/tests/mktime-3-64bit.phpt b/ext/date/tests/mktime-3-64bit.phpt
index cbb441f13c..f415cbf2d6 100644
--- a/ext/date/tests/mktime-3-64bit.phpt
+++ b/ext/date/tests/mktime-3-64bit.phpt
@@ -1,7 +1,7 @@
--TEST--
mktime() [3] (64-bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK" ?>
+<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
--INI--
error_reporting=2047
--FILE--
diff --git a/ext/date/tests/mktime-3.phpt b/ext/date/tests/mktime-3.phpt
index ce1a203a20..cc16083965 100644
--- a/ext/date/tests/mktime-3.phpt
+++ b/ext/date/tests/mktime-3.phpt
@@ -1,7 +1,7 @@
--TEST--
mktime() [3] (32-bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK" ?>
+<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
--INI--
error_reporting=2047
--FILE--
diff --git a/ext/date/tests/strtotime-mysql-64bit.phpt b/ext/date/tests/strtotime-mysql-64bit.phpt
index c511d626e9..356e485949 100644
--- a/ext/date/tests/strtotime-mysql-64bit.phpt
+++ b/ext/date/tests/strtotime-mysql-64bit.phpt
@@ -1,7 +1,7 @@
--TEST--
strtotime() and mysql timestamps (64 bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
--FILE--
<?php
date_default_timezone_set('UTC');
diff --git a/ext/date/tests/strtotime-mysql.phpt b/ext/date/tests/strtotime-mysql.phpt
index e5935bb165..5b0192880b 100644
--- a/ext/date/tests/strtotime-mysql.phpt
+++ b/ext/date/tests/strtotime-mysql.phpt
@@ -1,7 +1,7 @@
--TEST--
strtotime() and mysql timestamps (32 bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
--FILE--
<?php
date_default_timezone_set('UTC');
diff --git a/ext/date/tests/strtotime3-64bit.phpt b/ext/date/tests/strtotime3-64bit.phpt
index 3a47659f86..52c4edd63b 100644
--- a/ext/date/tests/strtotime3-64bit.phpt
+++ b/ext/date/tests/strtotime3-64bit.phpt
@@ -1,7 +1,7 @@
--TEST--
strtotime() function (64 bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
--FILE--
<?php
date_default_timezone_set('Europe/Lisbon');
diff --git a/ext/date/tests/strtotime3.phpt b/ext/date/tests/strtotime3.phpt
index 6aa5640f64..97161f9dfe 100644
--- a/ext/date/tests/strtotime3.phpt
+++ b/ext/date/tests/strtotime3.phpt
@@ -1,7 +1,7 @@
--TEST--
strtotime() function (32 bit)
--SKIPIF--
-<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
--FILE--
<?php
date_default_timezone_set('Europe/Lisbon');
diff --git a/ext/gd/tests/bug77272.phpt b/ext/gd/tests/bug77272.phpt
index e3423da543..d3bfa24aaa 100644
--- a/ext/gd/tests/bug77272.phpt
+++ b/ext/gd/tests/bug77272.phpt
@@ -5,7 +5,7 @@ memory_limit=-1
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
-if (!GD_BUNGLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream fix not yet released');
+if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream fix not yet released');
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--
diff --git a/ext/gd/tests/imagepolygon_basic.phpt b/ext/gd/tests/imagepolygon_basic.phpt
index 21186e9ecc..5dfecfbf19 100644
--- a/ext/gd/tests/imagepolygon_basic.phpt
+++ b/ext/gd/tests/imagepolygon_basic.phpt
@@ -1,16 +1,15 @@
--TEST--
-imageploygon()
+imagepolygon()
--SKIPIF--
<?php
if (!function_exists('imagepolygon')) die('skip imagepolygon() not available');
- require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
/* Prototype : bool imagepolygon ( resource $image , array $points , int $num_points , int $color )
* Description: Draws a polygon.
- * Source code: ext/standard/image.c
+ * Source code: ext/gd/gd.c
* Alias to functions:
*/
diff --git a/ext/intl/tests/bug59597_32.phpt b/ext/intl/tests/bug59597_32.phpt
index cd8b679171..7a058cf434 100644
--- a/ext/intl/tests/bug59597_32.phpt
+++ b/ext/intl/tests/bug59597_32.phpt
@@ -2,7 +2,7 @@
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/bug59597_64.phpt b/ext/intl/tests/bug59597_64.phpt
index eb70995a25..098df7244b 100644
--- a/ext/intl/tests/bug59597_64.phpt
+++ b/ext/intl/tests/bug59597_64.phpt
@@ -2,7 +2,7 @@
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
--FILE--
<?php
diff --git a/ext/ldap/tests/ldap_sasl_bind_basic.phpt b/ext/ldap/tests/ldap_sasl_bind_basic.phpt
index efa1f82c9b..49c2f24a67 100644
--- a/ext/ldap/tests/ldap_sasl_bind_basic.phpt
+++ b/ext/ldap/tests/ldap_sasl_bind_basic.phpt
@@ -8,7 +8,7 @@ Patrick Allaert <patrickallaert@php.net>
<?php if (!function_exists("ldap_sasl_bind")) die("skip LDAP extension not compiled with SASL support"); ?>
<?php
require "connect.inc";
- $link = fsockopen($host, $port);
+ $link = @fsockopen($host, $port);
if (!$link) {
die("skip no server listening");
}
diff --git a/ext/mysqli/tests/045.phpt b/ext/mysqli/tests/045.phpt
index 5eff0b03bc..0b7b68239c 100644
--- a/ext/mysqli/tests/045.phpt
+++ b/ext/mysqli/tests/045.phpt
@@ -7,7 +7,7 @@ mysqli_stmt_bind_result (SHOW)
require_once('skipifconnectfailure.inc');
require_once("connect.inc");
- $link = my_mysqli_connect($host, $user, $passwd);
+ $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
$stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
mysqli_stmt_execute($stmt);
diff --git a/ext/mysqli/tests/mysqli_auth_pam.phpt b/ext/mysqli/tests/mysqli_auth_pam.phpt
index 86c5c4809a..30d2da5675 100644
--- a/ext/mysqli/tests/mysqli_auth_pam.phpt
+++ b/ext/mysqli/tests/mysqli_auth_pam.phpt
@@ -6,7 +6,7 @@ require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('connect.inc');
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket));
}
diff --git a/ext/mysqli/tests/mysqli_expire_password.phpt b/ext/mysqli/tests/mysqli_expire_password.phpt
index 853daf0cdf..fdf8b783fb 100644
--- a/ext/mysqli/tests/mysqli_expire_password.phpt
+++ b/ext/mysqli/tests/mysqli_expire_password.phpt
@@ -6,7 +6,7 @@ require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('connect.inc');
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket));
}
diff --git a/ext/pdo/tests/debug_emulated_prepares.phpt b/ext/pdo/tests/debug_emulated_prepares.phpt
index 57cf937578..f347c7e4ea 100644
--- a/ext/pdo/tests/debug_emulated_prepares.phpt
+++ b/ext/pdo/tests/debug_emulated_prepares.phpt
@@ -10,7 +10,7 @@ PDOTest::skip();
$db = PDOTest::factory();
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') die('skip pgsql has its own test for this feature');
-if (!$db->getAttribute(PDO::ATTR_EMULATE_PREPARES) && !$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true)) die('skip driver cannot emulate prepared statements');
+if (!@$db->getAttribute(PDO::ATTR_EMULATE_PREPARES) && !@$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true)) die('skip driver cannot emulate prepared statements');
?>
--FILE--
<?php
diff --git a/ext/pdo_mysql/tests/bug_39858.phpt b/ext/pdo_mysql/tests/bug_39858.phpt
index 24da13a4e2..8b073997e1 100644
--- a/ext/pdo_mysql/tests/bug_39858.phpt
+++ b/ext/pdo_mysql/tests/bug_39858.phpt
@@ -13,10 +13,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
diff --git a/ext/pdo_mysql/tests/bug_41125.phpt b/ext/pdo_mysql/tests/bug_41125.phpt
index 6d9041889e..e341ed409c 100644
--- a/ext/pdo_mysql/tests/bug_41125.phpt
+++ b/ext/pdo_mysql/tests/bug_41125.phpt
@@ -12,11 +12,11 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
die("skip $version");
if ($version < 40100)
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
diff --git a/ext/pdo_mysql/tests/bug_41997.phpt b/ext/pdo_mysql/tests/bug_41997.phpt
index 29c5bf4f7c..bf0350d7c1 100644
--- a/ext/pdo_mysql/tests/bug_41997.phpt
+++ b/ext/pdo_mysql/tests/bug_41997.phpt
@@ -12,10 +12,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
diff --git a/ext/pdo_mysql/tests/bug_42499.phpt b/ext/pdo_mysql/tests/bug_42499.phpt
index a691d275d2..244101a7ae 100644
--- a/ext/pdo_mysql/tests/bug_42499.phpt
+++ b/ext/pdo_mysql/tests/bug_42499.phpt
@@ -15,10 +15,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 41000)
die(sprintf("skip Need MySQL Server 4.1.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
diff --git a/ext/pdo_mysql/tests/bug_44707.phpt b/ext/pdo_mysql/tests/bug_44707.phpt
index 06979b8164..60f4ccdfae 100644
--- a/ext/pdo_mysql/tests/bug_44707.phpt
+++ b/ext/pdo_mysql/tests/bug_44707.phpt
@@ -15,10 +15,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 41000)
die(sprintf("skip Will work different with MySQL Server < 4.1.0, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
diff --git a/ext/pdo_mysql/tests/bug_61411.phpt b/ext/pdo_mysql/tests/bug_61411.phpt
index 7c7ae98db1..c5df174997 100644
--- a/ext/pdo_mysql/tests/bug_61411.phpt
+++ b/ext/pdo_mysql/tests/bug_61411.phpt
@@ -13,10 +13,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 40106)
die(sprintf("skip Need MySQL Server 4.1.6+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
diff --git a/ext/pdo_mysql/tests/bug_pecl_7976.phpt b/ext/pdo_mysql/tests/bug_pecl_7976.phpt
index ee5d5e95b1..9eb50abd43 100644
--- a/ext/pdo_mysql/tests/bug_pecl_7976.phpt
+++ b/ext/pdo_mysql/tests/bug_pecl_7976.phpt
@@ -13,10 +13,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
diff --git a/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt
index 199a758a82..f520c1d828 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt
@@ -11,10 +11,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
if (!MySQLPDOTest::isPDOMySQLnd())
die("skip This will not work with libmysql");
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt
index c5e66cf18a..9452ca8ec5 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt
@@ -13,10 +13,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
if (!MySQLPDOTest::isPDOMySQLnd())
die("skip This will not work with libmysql");
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt
index 44f6c8e56c..07fae1c672 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt
@@ -12,10 +12,10 @@ $matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
die(sprintf("skip Cannot determine MySQL Server version\n"));
-$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
+$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[0], $matches[1], $matches[2], $version));
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
diff --git a/ext/readline/tests/readline_without_input.phpt b/ext/readline/tests/readline_without_input.phpt
index e269c5eaa9..11c956fa58 100644
--- a/ext/readline/tests/readline_without_input.phpt
+++ b/ext/readline/tests/readline_without_input.phpt
@@ -4,7 +4,10 @@ readline() function - without input
Jonathan Stevens <info at jonathanstevens dot be>
User Group: PHP-WVL & PHPGent #PHPTestFest
--SKIPIF--
-<?php if (!extension_loaded("readline") || !function_exists('readline') || die("skip"); ?>
+<?php
+if (!extension_loaded("readline")) die("skip readline extension is not available");
+if (!function_exists('readline')) die("skip readline() not available");
+?>
--FILE--
<?php
var_dump(readline());
diff --git a/ext/sockets/tests/mcast_ipv4_send_error.phpt b/ext/sockets/tests/mcast_ipv4_send_error.phpt
index 0929c79bdd..91063f4253 100644
--- a/ext/sockets/tests/mcast_ipv4_send_error.phpt
+++ b/ext/sockets/tests/mcast_ipv4_send_error.phpt
@@ -5,6 +5,12 @@ Multicast support: IPv4 send options with unusual values
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
+$domain = AF_INET;
+$level = IPPROTO_IP;
+$s = socket_create($domain, SOCK_DGRAM, SOL_UDP);
+if ($s === false) {
+ die("skip unable to create socket");
+}
if (socket_set_option($s, $level, IP_MULTICAST_IF, 1) === false) {
die("skip interface 1 either doesn't exist or has no ipv4 address");
}
diff --git a/ext/sockets/tests/mcast_ipv6_recv.phpt b/ext/sockets/tests/mcast_ipv6_recv.phpt
index 83fc5064c7..62fa1a9c4d 100644
--- a/ext/sockets/tests/mcast_ipv6_recv.phpt
+++ b/ext/sockets/tests/mcast_ipv6_recv.phpt
@@ -16,7 +16,7 @@ $br = socket_bind($s, '::', 3000);
/* On Linux, there is no route ff00::/8 by default on lo, which makes it
* troublesome to send multicast traffic from lo, which we must since
* we're dealing with interface-local traffic... */
-$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
));
@@ -31,11 +31,11 @@ if ($r === false) {
if (!defined("MCAST_JOIN_SOURCE_GROUP"))
die('skip source operations are unavailable');
-$so = socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
));
-$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
"source" => '2001::dead:beef',
diff --git a/ext/sockets/tests/mcast_ipv6_recv_limited.phpt b/ext/sockets/tests/mcast_ipv6_recv_limited.phpt
index e989e9b58c..c739264062 100644
--- a/ext/sockets/tests/mcast_ipv6_recv_limited.phpt
+++ b/ext/sockets/tests/mcast_ipv6_recv_limited.phpt
@@ -13,7 +13,7 @@ $br = socket_bind($s, '::', 3000);
/* On Linux, there is no route ff00::/8 by default on lo, which makes it
* troublesome to send multicast traffic from lo, which we must since
* we're dealing with interface-local traffic... */
-$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
));
@@ -24,12 +24,12 @@ $r = socket_sendto($s, $m = "testing packet", strlen($m), 0, 'ff01::114', 3000);
if ($r === false) {
die('skip unable to send multicast packet.');
}
-$so = socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
));
if (defined("MCAST_JOIN_SOURCE_GROUP")) {
- $so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
+ $so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
"source" => '2001::dead:beef',
diff --git a/ext/sockets/tests/socket_export_stream-3.phpt b/ext/sockets/tests/socket_export_stream-3.phpt
index 63134cb401..69b0ebe47d 100644
--- a/ext/sockets/tests/socket_export_stream-3.phpt
+++ b/ext/sockets/tests/socket_export_stream-3.phpt
@@ -9,7 +9,7 @@ $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$br = socket_bind($s, '0.0.0.0', 58393);
if ($br === false)
die("SKIP IPv4/port 58393 not available");
-$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
"group" => '224.0.0.23',
"interface" => "lo",
));
diff --git a/ext/sockets/tests/socket_import_stream-3.phpt b/ext/sockets/tests/socket_import_stream-3.phpt
index 8a8ac4f5e4..f83e8a487b 100644
--- a/ext/sockets/tests/socket_import_stream-3.phpt
+++ b/ext/sockets/tests/socket_import_stream-3.phpt
@@ -9,7 +9,7 @@ $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$br = socket_bind($s, '0.0.0.0', 58379);
if ($br === false)
die("SKIP IPv4/port 58379 not available");
-$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
+$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
"group" => '224.0.0.23',
"interface" => "lo",
));
diff --git a/ext/standard/tests/file/lstat_stat_variation5.phpt b/ext/standard/tests/file/lstat_stat_variation5.phpt
index 34401dc55d..b5c03c3f08 100644
--- a/ext/standard/tests/file/lstat_stat_variation5.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation5.phpt
@@ -7,7 +7,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. Not valid for Windows');
}
?>
-?>
--FILE--
<?php
/* Prototype: array lstat ( string $filename );
diff --git a/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt b/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt
index 1505281dd3..9028b6902b 100644
--- a/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt
+++ b/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt
@@ -3,7 +3,7 @@ sapi_windows_set_ctrl_handler()
--SKIPIF--
<?php
-include "skipinf.inc";
+include "skipif.inc";
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
die("skip this test is for Windows platforms only");
diff --git a/sapi/cli/tests/upload_2G.phpt b/sapi/cli/tests/upload_2G.phpt
index 44d2da4a81..82bbbca481 100644
--- a/sapi/cli/tests/upload_2G.phpt
+++ b/sapi/cli/tests/upload_2G.phpt
@@ -8,10 +8,16 @@ if (PHP_INT_SIZE < 8) {
die("skip need PHP_INT_SIZE>=8");
}
+if (!file_exists('/proc/meminfo')) {
+ die('skip Cannot check free RAM from /proc/meminfo on this platform');
+}
+
+$free_ram = 0;
if ($f = fopen("/proc/meminfo","r")) {
while (!feof($f)) {
- if (!strncmp($line = fgets($f), "MemFree", 7)) {
- if (substr($line,8)/1024/1024 > 3) {
+ if (preg_match('/MemFree[^\d]*(\d+)/i', fgets($f), $m)) {
+ $free_ram = max($free_ram, $m[1]/1024/1024);
+ if ($free_ram > 3) {
$enough_free_ram = true;
}
}
@@ -19,7 +25,7 @@ if ($f = fopen("/proc/meminfo","r")) {
}
if (empty($enough_free_ram)) {
- die("skip need +3G free RAM");
+ die(sprintf("skip need +3G free RAM, but only %01.2f available", $free_ram));
}
if (getenv('TRAVIS')) {
diff --git a/tests/basic/bug20539.phpt b/tests/basic/bug20539.phpt
index 6c2cfb2647..2b84d14189 100644
--- a/tests/basic/bug20539.phpt
+++ b/tests/basic/bug20539.phpt
@@ -2,7 +2,7 @@
Bug #20539 (PHP CLI Segmentation Fault)
--SKIPIF--
<?php if (!extension_loaded("session")) die("skip session extension not available"); ?>
-<?php unlink(__DIR__. '/sess_' .session_id()); ?>
+<?php if (file_exists(__DIR__. '/sess_' .session_id())) unlink(__DIR__. '/sess_' .session_id()); ?>
--INI--
session.auto_start=1
session.save_handler=files