xobotyi / beansclient

Robust PHP client for beanstalkd work queue
MIT License
91 stars 10 forks source link

unix sockets can not find/recognize socket file #21

Closed tolgaulas closed 3 years ago

tolgaulas commented 3 years ago

Sample code snippet does not work and throws exception;

PHP Fatal error:  Uncaught xobotyi\beansclient\Exception\SocketException: Host `/tmp/beanstalkd.sock` not exists or unreachable in /beans/vendor/xobotyi/beansclient/src/Socket/SocketSocket.php:32
Stack trace:
#0 /beans/vendor/xobotyi/beansclient/src/Socket/SocketFactory.php(120): xobotyi\beansclient\Socket\SocketSocket->__construct('/tmp/beanstalkd...', -1, 2)
#1 /beans/vendor/xobotyi/beansclient/src/Connection.php(34): xobotyi\beansclient\Socket\SocketFactory->createSocket()
#2 /beans/writer.php(9): xobotyi\beansclient\Connection->__construct('/tmp/beanstalkd...', -1)
------
root@box:~/beans$ ls -l  /tmp/beanstalkd.sock
srwxr-xr-x 1 root root 0 Mar 27 06:21 /tmp/beanstalkd.sock
xobotyi commented 3 years ago

UNIX sockets support implemented in v3