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:
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.