1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00
Files
archived-php-src/sapi/fpm/tests/014.phpt
Mitch Hagstrand 3401f553b9 Fixes for session and fpm tests in PHP7.0 branch
1. Increased the timeout on sapi/fpm tests to match the cli server
2. Disabled session GC in session_set_save_handler_basic.phpt
3. Fixed GC in save_handler.inc to delete files based on age
2017-01-06 19:55:57 -08:00

55 lines
935 B
PHP

--TEST--
FPM: Test for pm.start_servers default calculation message being a notice and not a warning #68458
--SKIPIF--
<?php include "skipif.inc"; ?>
--FILE--
<?php
include "include.inc";
$logfile = dirname(__FILE__).'/php-fpm.log.tmp';
$port = 9000+PHP_INT_SIZE;
$cfg = <<<EOT
[global]
error_log = $logfile
log_level = warning
[unconfined]
listen = 127.0.0.1:$port
user = foo
pm = dynamic
pm.max_children = 5
;pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
EOT;
$fpm = run_fpm($cfg, $tail);
if (is_resource($fpm)) {
$i = 0;
while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) {
usleep(25000);
}
if ($fp) {
echo "Started\n";
fclose($fp);
}
proc_terminate($fpm);
if (!feof($tail)) {
echo stream_get_contents($tail);
}
fclose($tail);
proc_close($fpm);
}
?>
Done
--EXPECTF--
Started
Done
--CLEAN--
<?php
$logfile = dirname(__FILE__).'/php-fpm.log.tmp';
@unlink($logfile);
?>