1--TEST--
2FPM: gh12232 - loading shared ext in FPM config
3--SKIPIF--
4<?php
5include "skipif.inc";
6FPM\Tester::skipIfSharedExtensionNotFound('dl_test');
7?>
8--FILE--
9<?php
10
11require_once "tester.inc";
12
13$cfg = <<<EOT
14[global]
15error_log = {{FILE:LOG}}
16[unconfined]
17listen = {{ADDR}}
18pm = static
19pm.max_children = 1
20pm.status_path = /status
21catch_workers_output = yes
22php_admin_value[extension] = dl_test
23EOT;
24
25$code = <<<EOT
26<?php
27var_dump(extension_loaded('dl_test'));
28var_dump(ini_get('dl_test.string'));
29ini_set('dl_test.string', 'test');
30var_dump(ini_get('dl_test.string'));
31EOT;
32
33$tester = new FPM\Tester($cfg, $code);
34$tester->start();
35$tester->expectLogStartNotices();
36$tester->request()->expectBody(['bool(true)', 'string(5) "hello"', 'string(4) "test"']);
37$tester->request()->expectBody(['bool(true)', 'string(5) "hello"', 'string(4) "test"']);
38$tester->terminate();
39$tester->expectLogTerminatingNotices();
40$tester->close();
41
42?>
43Done
44--EXPECT--
45Done
46--CLEAN--
47<?php
48require_once "tester.inc";
49FPM\Tester::clean();
50?>
51<?php
52