I want to send log entries from syslog-ng to a php script. Looking at this question: How do you know if syslog-ng stops your listening daemon? I tried to use the loop described in it:
while (!feof(STDIN)) {
$input = fgets(STDIN);
// do something with $input
}
Unfortunately I get the dreaded "POLLERR occurred while idle; fd='20'" message dozens of times a second from syslog-ng. Apparently this means that the script closed its stdin, but obviously my script is not doing that. Any ideas?