1--TEST-- 2FPM: Process user setting ignored when FPM is not running as root 3--SKIPIF-- 4<?php 5include "skipif.inc"; 6FPM\Tester::skipIfNotRoot(); 7FPM\Tester::skipIfUserDoesNotExist('www-data'); 8?> 9--FILE-- 10<?php 11 12require_once "tester.inc"; 13 14$pw = posix_getpwnam('www-data'); 15$uid = $pw['uid']; 16$gid = $pw['gid']; 17 18$cfg = <<<EOT 19[global] 20error_log = {{FILE:LOG}} 21[unconfined] 22listen = {{ADDR}} 23user = $uid 24pm = dynamic 25pm.max_children = 5 26pm.start_servers = 1 27pm.min_spare_servers = 1 28pm.max_spare_servers = 3 29EOT; 30 31$code = <<<EOT 32<?php 33echo posix_getgid(); 34EOT; 35 36$tester = new FPM\Tester($cfg, $code); 37$tester->start(); 38$tester->expectLogStartNotices(); 39$tester->request()->expectBody((string) $gid); 40$tester->terminate(); 41$tester->expectLogTerminatingNotices(); 42$tester->close(); 43 44?> 45Done 46--EXPECT-- 47Done 48--CLEAN-- 49<?php 50require_once "tester.inc"; 51FPM\Tester::clean(); 52?> 53