1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00

Merge branch 'pull-request/2284' into PHP-7.0

* pull-request/2284:
  Fixes for session and fpm tests in PHP7.0 branch
This commit is contained in:
Joe Watkins
2017-01-07 07:10:23 +00:00
8 changed files with 19 additions and 18 deletions

View File

@@ -53,7 +53,7 @@ function gc($maxlifetime) {
while (($file = readdir($directory)) !== FALSE) {
$qualified = ($session_save_path."/".$file);
if (is_file($qualified) === TRUE) {
if (substr($file, 0, $length) === SESSION_FILE_PREFIX) {
if (substr($file, 0, $length) === SESSION_FILE_PREFIX && (filemtime($qualified) + $maxlifetime <= time() )) {
unlink($qualified);
}
}

View File

@@ -3,6 +3,7 @@ Test session_set_save_handler() function : basic functionality
--INI--
session.save_path=
session.name=PHPSESSID
session.gc_probability=0
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--

View File

@@ -26,8 +26,8 @@ $fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
fpm_display_log($tail, 2);
$i = 0;
while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(10000);
while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(25000);
}
if ($fp) {
echo "Done\n";

View File

@@ -29,8 +29,8 @@ $fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
fpm_display_log($tail, 2);
$i = 0;
while (($i++ < 30) && !($fp = fsockopen('[::1]', $port))) {
usleep(10000);
while (($i++ < 60) && !($fp = fsockopen('[::1]', $port))) {
usleep(25000);
}
if ($fp) {
echo "Done\n";

View File

@@ -29,15 +29,15 @@ $fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
fpm_display_log($tail, 2);
$i = 0;
while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(10000);
while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(25000);
}
if ($fp) {
echo "Done IPv4\n";
fclose($fp);
}
while (($i++ < 30) && !($fp = @fsockopen('[::1]', $port))) {
usleep(10000);
while (($i++ < 60) && !($fp = @fsockopen('[::1]', $port))) {
usleep(25000);
}
if ($fp) {
echo "Done IPv6\n";

View File

@@ -27,8 +27,8 @@ EOT;
$fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
$i = 0;
while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(10000);
while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(25000);
}
if ($fp) {
echo "Started\n";
@@ -51,4 +51,4 @@ Done
<?php
$logfile = dirname(__FILE__).'/php-fpm.log.tmp';
@unlink($logfile);
?>
?>

View File

@@ -27,8 +27,8 @@ EOT;
$fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
$i = 0;
while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(10000);
while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(25000);
}
if ($fp) {
echo "Started\n";
@@ -51,4 +51,4 @@ Done
<?php
$logfile = dirname(__FILE__).'/php-fpm.log.tmp';
@unlink($logfile);
?>
?>

View File

@@ -42,8 +42,8 @@ EOT;
$fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
$i = 0;
while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port1))) {
usleep(10000);
while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port1))) {
usleep(25000);
}
if ($fp) {
echo "Started\n";
@@ -88,4 +88,4 @@ Done
<?php
$logfile = dirname(__FILE__).'/php-fpm.log.tmp';
@unlink($logfile);
?>
?>