File tree 4 files changed +100
-139
lines changed
4 files changed +100
-139
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ FPM: bug75212 - php_value acts like php_admin_value
3
+ --SKIPIF--
4
+ <?php include "skipif.inc " ; ?>
5
+ --FILE--
6
+ <?php
7
+
8
+ require_once "tester.inc " ;
9
+
10
+ $ cfg = <<<EOT
11
+ [global]
12
+ error_log = {{FILE:LOG}}
13
+ [unconfined]
14
+ listen = {{ADDR}}
15
+ pm = dynamic
16
+ pm.max_children = 5
17
+ pm.start_servers = 1
18
+ pm.min_spare_servers = 1
19
+ pm.max_spare_servers = 3
20
+ php_admin_value[memory_limit]=32M
21
+ php_value[date.timezone]=Europe/London
22
+ EOT ;
23
+
24
+ $ code = <<<EOT
25
+ <?php
26
+ echo "Test Start \n";
27
+ var_dump(ini_get('memory_limit'), ini_get('date.timezone'));
28
+ echo "Test End \n";
29
+ EOT ;
30
+
31
+ $ ini = <<<EOT
32
+ memory_limit=64M
33
+ date.timezone=Europe/Paris
34
+ EOT ;
35
+
36
+ $ tester = new FPM \Tester ($ cfg , $ code );
37
+ $ tester ->setUserIni ($ ini );
38
+ $ tester ->start ();
39
+ $ tester ->expectLogStartNotices ();
40
+ $ tester ->request ()->expectBody ([
41
+ 'Test Start ' ,
42
+ 'string(3) "32M" ' ,
43
+ 'string(12) "Europe/Paris" ' ,
44
+ 'Test End '
45
+ ]);
46
+ $ tester ->terminate ();
47
+ $ tester ->close ();
48
+
49
+ ?>
50
+ Done
51
+ --EXPECT--
52
+ Done
53
+ --CLEAN--
54
+ <?php
55
+ require_once "tester.inc " ;
56
+ FPM \Tester::clean ();
57
+ ?>
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ FPM: Socket port connection falls back to IPv4
3
+ --SKIPIF--
4
+ <?php
5
+ include "skipif.inc " ;
6
+ FPM \Tester::skipIfIPv6IsNotSupported ();
7
+ ?>
8
+ --FILE--
9
+ <?php
10
+
11
+ require_once "tester.inc " ;
12
+
13
+ $ cfg = <<<EOT
14
+ [global]
15
+ error_log = {{FILE:LOG}}
16
+ [unconfined]
17
+ listen = {{PORT}}
18
+ pm = dynamic
19
+ pm.max_children = 5
20
+ pm.start_servers = 2
21
+ pm.min_spare_servers = 1
22
+ pm.max_spare_servers = 3
23
+ EOT ;
24
+
25
+ $ tester = new FPM \Tester ($ cfg );
26
+ $ port = $ tester ->getPort ();
27
+ // Occupy our port and let things fail
28
+ $ busy = stream_socket_server ("tcp://[::]: $ port " );
29
+ $ tester ->start ();
30
+ $ tester ->expectLogNotice ('Failed implicitly binding to ::, retrying with 0.0.0.0 ' );
31
+ $ tester ->expectLogError ("unable to bind listening socket for address ' $ port': " .
32
+ 'Address already in use \(\d+\) ' );
33
+ $ tester ->expectLogError ('FPM initialization failed ' );
34
+ $ tester ->close (true );
35
+ ?>
36
+ Done
37
+ --EXPECT--
38
+ Done
39
+ --CLEAN--
40
+ <?php
41
+ require_once "tester.inc " ;
42
+ FPM \Tester::clean ();
43
+ ?>
You can’t perform that action at this time.
0 commit comments