1--TEST--
2FPM: Socket for invalid allowed client only
3--SKIPIF--
4<?php
5include "skipif.inc";
6?>
7--FILE--
8<?php
9
10require_once "tester.inc";
11
12$cfg = <<<EOT
13[global]
14error_log = {{FILE:LOG}}
15[unconfined]
16listen = {{ADDR}}
17listen.allowed_clients = xxx
18pm = dynamic
19pm.max_children = 5
20pm.start_servers = 1
21pm.min_spare_servers = 1
22pm.max_spare_servers = 3
23catch_workers_output = yes
24EOT;
25
26$tester = new FPM\Tester($cfg);
27$tester->start();
28$tester->expectLogStartNotices();
29$tester->checkRequest('127.0.0.1', 'Req: ok', 'Req: error');
30$tester->terminate();
31// this is from child when starting
32$tester->expectLogLine("ERROR: Wrong IP address 'xxx' in listen.allowed_clients");
33$tester->expectLogLine("ERROR: There are no allowed addresses");
34// this is from the request
35$tester->expectLogLine("ERROR: Connection disallowed: IP address '127.0.0.1' has been dropped.");
36$tester->expectLogTerminatingNotices();
37$tester->close();
38
39?>
40Done
41--EXPECT--
42Req: error
43Done
44--CLEAN--
45<?php
46require_once "tester.inc";
47FPM\Tester::clean();
48?>
49