log-bm-limit-2048-msg-4000.phpt 876 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --TEST--
  2. FPM: Buffered message output log with limit 2048 and msg 4000
  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 = 2048
  12. log_buffering = yes
  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. catch_workers_output = yes
  21. EOT;
  22. $code = <<<EOT
  23. <?php
  24. error_log(str_repeat('t', 4000));
  25. EOT;
  26. $tester = new FPM\Tester($cfg, $code);
  27. $tester->start();
  28. $tester->expectLogStartNotices();
  29. $tester->request()->expectEmptyBody();
  30. $tester->terminate();
  31. $tester->expectFastCGIErrorMessage('t', 2048, 4000);
  32. $tester->expectLogMessage('NOTICE: PHP message: ' . str_repeat('t', 2023) . '...', 2048);
  33. $tester->close();
  34. ?>
  35. Done
  36. --EXPECT--
  37. Done
  38. --CLEAN--
  39. <?php
  40. require_once "tester.inc";
  41. FPM\Tester::clean();
  42. ?>