Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastCGI/Config: attempt to glob for sockets if no parameters supplied #38

Closed
wants to merge 1 commit into from
Closed

Conversation

kornrunner
Copy link
Contributor

@kornrunner kornrunner commented Jun 16, 2016

This covers #17
It alters the current behaviour, though (might be seen as a BC).

For simplicity, I've altered the logic in following way: if user didn't specify --fcgi option - cachetool shall try to find unix socket first, and in case no socket is found - it shall fallback to TCP.
Perhaps this behaviour should be documented?

@neoascetic
Copy link

Hey, can you please make it work for directories as well? Because we, for example, have our socket within /var/run/php directory.

@kornrunner
Copy link
Contributor Author

Sure, I can send a new PR or update this one, but since this is open for a half a year already - I don't know if owner is looking forward to this kind of changes.

$host = '/var/run/php5-fpm.sock';
$socket = current(glob('/var/run/php*.sock'));
if (!empty($socket)) {
$host = $socket;
Copy link
Contributor

@szepeviktor szepeviktor Dec 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be many sockets, please say $socket[0]
Sorry! current()

@gordalina
Copy link
Owner

Implemented in #49. closing

@gordalina gordalina closed this Oct 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants