5

I'm trying to use Memcached as a session for Symfony 1.4 running under HHVM 3.1.0

But I seem to be getting this error:

\nFatal error: No storage module chosen - failed to initialize session in /sites/SecureAccountsServices/lib/vendor/symfony/lib/storage/sfSessionStorage.class.php on line 93

Below is my php.ini file for HHVM:

; php options

pid = /var/run/hhvm/pid

display_startup_errors = On
error_reporting = E_ALL
display_errors = On


session.save_handler = memcache
session.save_path = "tcp://10.32.32.161:11211,tcp://10.32.32.162:11211"


; hhvm specific

hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hvvm.server.source_root = /sites/SecureAccountsServices/oauth

hhvm.eval.enable_xhp = true
hhvm.eval.allow_hhas = true
hhvm.eval.enable_hip_hop_syntax=true
hhvm.eval.enable_zend_compat = true

hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log

hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc

; hhvm debug
hhvm.error_handling.enable_hip_hop_errors = true
hhvm.debug.full_backtrace = true
hhvm.debug.server_stack_trace = true
hhvm.debug.server_error_message = true
hhvm.debug.translate_source = true

I don't know why it doesn't save to memcached as it should include memcache module as part of HHVM 3.1.0 core.

Is there something that needs changing from Symfony side?

It's working and saves the session files under /tmp folder when I remove session.save_handler and session.save_path from php.ini.

Mick
  • 30,759
  • 16
  • 111
  • 130
Passionate Engineer
  • 10,034
  • 26
  • 96
  • 168
  • I'm assuming you have the memcache module correctly installed in PHP? Care to post your phpinfo output to confirm? – Rylab Nov 11 '14 at 00:36

1 Answers1

0

Looks like you aren't passing the correct value to session.save_handler, it should be memcached not memcache at least according to the HHVM docs: http://docs.hhvm.com/manual/en/memcached.sessions.php

Erik Giberti
  • 1,235
  • 9
  • 11