3

Currently moving legacy code to the new server. My environment is configured to use only sockets.

Perhaps it is possible to configure zend framework 1 to use unix socket to connect to memcached server?

P.S. Not to confuse people: question is not regarding native php sessions mechanism, but ZF1 caching one.

e.g. we specify something like the following in application.ini (i need something for unix sockets, if there is some workaround):

; Cache
resources.cachemanager.database.frontend.name                            = Core
resources.cachemanager.database.frontend.options.automatic_serialization = On
resources.cachemanager.database.backend.name                             = Memcached
resources.cachemanager.database.backend.options.servers.local.host       = <%= @memcached['listen'] %>
resources.cachemanager.database.backend.options.servers.local.port       = <%= @memcached['port'] %>

I can't see anything that would work with memcached unix sockets in zf1 code, but perhaps someone could advice some painless workaround..

avasin
  • 9,186
  • 18
  • 80
  • 127
  • does using a php ini setting work? `session.save_path = hostname:11211` – Scott Dec 22 '15 at 20:32
  • @Scott thank you for suggestion, i have problem defining cache mechanism, not sessions one. I will update question. – avasin Dec 22 '15 at 22:37

1 Answers1

1

The ZF1 class should be using the Memcached class. It appears that it will take a socket path in place of host with a port of 0.

http://php.net/manual/en/memcached.addserver.php

datasage
  • 19,153
  • 2
  • 48
  • 54