log-bwd-limit-64-too-low-error.phpt 736 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. FPM: Buffered worker output decorated log with limit 64 fails because it is too low
  3. --SKIPIF--
  4. <?php include "skipif.inc"; ?>
  5. --FILE--
  6. <?php
  7. require_once "tester.inc";
  8. $cfg = <<<EOT
  9. [global]
  10. error_log = {{FILE:LOG}}
  11. log_limit = 64
  12. [unconfined]
  13. listen = {{ADDR}}
  14. pm = dynamic
  15. pm.max_children = 5
  16. pm.start_servers = 1
  17. pm.min_spare_servers = 1
  18. pm.max_spare_servers = 3
  19. catch_workers_output = yes
  20. EOT;
  21. $code = <<<EOT
  22. <?php
  23. file_put_contents('php://stderr', str_repeat('a', 2048) . "\n");
  24. EOT;
  25. $tester = new FPM\Tester($cfg, $code);
  26. $tester->start();
  27. $tester->expectLogError('log_limit must be greater than 512');
  28. $tester->close(true);
  29. ?>
  30. Done
  31. --EXPECT--
  32. Done
  33. --CLEAN--
  34. <?php
  35. require_once "tester.inc";
  36. FPM\Tester::clean();
  37. ?>