← Back to team overview

mahara-contributors team mailing list archive

[Bug 1428918] Re: session_write_close() errors during Behat

 

After much investigation I'm not sure of the precise cause of this
problem, except that it's caused by calling session_write_close()
repeatedly during CLI execution of the install script by Behat. Running
the install script normally, doesn't cause this problem. And doing the
install through the web interface instead of CLI, also doesn't cause
this problem.

Since the CLI interface doesn't actually generate and use sessions
anyway, the easiest fix is just to make the functions in our Session
class short-circuit if you're running in CLI.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1428918

Title:
  session_write_close() errors during Behat

Status in Mahara ePortfolio:
  New

Bug description:
  The session changes that we made for the Bug 1352028 bulk loader
  status bar (closing the session after each update) cause the Behat CLI
  installer script to throw a whole lot of the following PHP warning:

  PHP Warning:  session_write_close(): open(/home/aaronw/dataroot/mahara/behat/sessions/7/4/3/sess_743cc5981da7bf0026f59d27bbb2adf5, O_RDWR) failed: No such file or directory (2) in /home/aaronw/www/mahara/htdocs/auth/session.php on line 309
  ensure session!
  /home/aaronw/dataroot/mahara/behat/sessions
  743cc5981da7bf0026f59d27bbb2adf5
  PHP Stack trace:
  PHP   1. {main}() /home/aaronw/www/mahara/htdocs/testing/frameworks/behat/cli/util.php:0
  PHP   2. BehatTestingUtil::install_site() /home/aaronw/www/mahara/htdocs/testing/frameworks/behat/cli/util.php:91
  PHP   3. upgrade_mahara() /home/aaronw/www/mahara/htdocs/testing/frameworks/behat/classes/util.php:85
  PHP   4. log_info() /home/aaronw/www/mahara/htdocs/lib/mahara.php:218
  PHP   5. log_message() /home/aaronw/www/mahara/htdocs/lib/errors.php:85
  PHP   6. Session->add_info_msg() /home/aaronw/www/mahara/htdocs/lib/errors.php:206
  PHP   7. Session->ro_session() /home/aaronw/www/mahara/htdocs/auth/session.php:204
  PHP   8. session_write_close() /home/aaronw/www/mahara/htdocs/auth/session.php:309
  PHP   9. error() /home/aaronw/www/mahara/htdocs/auth/session.php:309
  PHP  10. log_message() /home/aaronw/www/mahara/htdocs/lib/errors.php:441
  PHP  11. Session->add_error_msg() /home/aaronw/www/mahara/htdocs/lib/errors.php:206
  PHP  12. Session->ro_session() /home/aaronw/www/mahara/htdocs/auth/session.php:221
  PHP  13. session_write_close() /home/aaronw/www/mahara/htdocs/auth/session.php:309

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1428918/+subscriptions


References