Skip to main content

Sessionhandling with hhvm

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

After trying to get a few application to run on hhvm I came across the following error:

HipHop Fatal error: Stack overflow in /vagrant/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php on line 45

After a bit of debugging it seemed that the open() method of PHP's SessionHandler implementation in hhvm was throwing the error. After digg a bit deeper it seemed that hhvm did not pass a $savePath to the open() method of PHP's SessionHandler class. The "fix" was pretty straight forward, use ini_set to the the session.save_path and session.save_handler options:

ini_set('session.save_path', '/tmp');
ini_set('session.save_handler', 'files');