Forum

php-fcgi error in unix socket mode

Aditya Jain
17 May 2012, 17:08
Hello Hugo

Greetings

I was trying to use php-fcgi with unix sockets as mentioned in the manual.
I used default php-fcgi.conf(removed the comment).
I also tried to change the location of socket file to /temp , but php-fcgi
throws an error:

#php-fcgi
starting PHP FastCGI daemons
PHP FastCGI daemon exited with code 65280

the other modes work fine.
I downloaded the deb package(i686) from tuxhelp.org

Thanking you

Aditya Jain

Hiawatha version:
# hiawatha -v
Hiawatha v8.2, cache, CommandChannel, IPv6, Monitor, SSL, URL toolkit, XSLT
Copyright (C) by Hugo Leisink <hugo@leisink.net>
Operating System: debian squeeze i386
Hugo Leisink
18 May 2012, 16:51
I don't think the /tmp directory is suitable for creating socket files. It's protected against such files. Choose a different location and make sure the user you use for the PHP FastCGI daemon is allowed to create files in that directory.
Aditya Jain
21 May 2012, 03:42
Thanks

php-fcgi was not able to write in the default location & it also didnot use /tmp.
I made a different directory with user:group www-data:www-data
& gave permission 770. And it worked. Thankyou for pointing out.
BTW Hiawatha is great !!

Aditya Jain
Aditya Jain
21 May 2012, 03:45
One more question,

I generally point hiawatha to use network socket to connect to php-fcgi.
Different posts over the net say that unix socket is faster.
What is your recommendation ?


Aditya Jain
Hugo Leisink
21 May 2012, 07:16
Unix sockets are indeed faster than TCP sockets. Use Unix sockets when the FastCGI daemon is on the same host as Hiawatha and TCP sockets for remote FastCGI daemons.
Aditya Jain
23 May 2012, 09:03
Thankyou!
It was much confusing over the internet.
Thankyou for clarifying.
I use it on a VPS so using Unix sockets would be better then.
Ginghong Wong
29 May 2012, 14:22
Debian/Ubuntu and related distros seem to recommend /var/run or /run(newer) directory for the socket files which is, however, not in the way of Unix traditionally.
This topic has been closed.