bug60634_error_1.phpt 881 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --TEST--
  2. Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec
  3. --INI--
  4. session.save_path=
  5. session.name=PHPSESSID
  6. --SKIPIF--
  7. <?php include('skipif.inc'); ?>
  8. --FILE--
  9. <?php
  10. ob_start();
  11. function open($save_path, $session_name) {
  12. return true;
  13. }
  14. function close() {
  15. echo "close: goodbye cruel world\n";
  16. }
  17. function read($id) {
  18. return '';
  19. }
  20. function write($id, $session_data) {
  21. echo "write: goodbye cruel world\n";
  22. undefined_function();
  23. }
  24. function destroy($id) {
  25. return true;
  26. }
  27. function gc($maxlifetime) {
  28. return true;
  29. }
  30. session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
  31. session_start();
  32. session_write_close();
  33. echo "um, hi\n";
  34. ?>
  35. --EXPECTF--
  36. write: goodbye cruel world
  37. Fatal error: Call to undefined function undefined_function() in %s on line %d
  38. close: goodbye cruel world