Fatal error: Call to undefined function: socket_create() in /usr/local/node-runner/include/query_icmp.php on line 21
I'm on a Fedora Core 3, AMD 64 box. I've been looking for a utility like this and it looks great. If I can just get that running, I'll be great.
BTW-I followed your thread on the FSockOpen and ran the test program you'd linked to. My FSockOpen also appears functional as the test program ran without problems.
Thanks for your help.
Nathan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It appears as though socket support has not been compiled into your php binary. But if you say you ran a test script from the command line and it worked okay, that couldn't be the case.
Do you have any nodes configured that do not query using ICMP (try on using TCP)? If so, disable the ones that use ICMP and try it again.
--Brad Fears
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the response. Progress!! I deleted the nodes that were querying based on ICMP and used only those that were TCP based (namely port 25). It now appears to work. I guess that's going to be as good as it gets for me until I figure out why the ICMP isn't happy.
The first node in the list was ICMP, which was probably causing the rest of the script to abort, don't know.
Any other thoughts as to the ICMP functionality? I hate to open ports simply for monitoring sake. But, the software works well and was so easy to setup. Prior to this, I tried nargios, what a pain!
Nathan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Glad to hear it's at least partially working. What error messages do you see again from the console when you try to ping something? Have you tried googling on those error messages? Perhaps it's something in the way your OS/distro is configured.
--Brad Fears
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Brad,
I ran some of this past the guy who compiled the PHP on the server. (I handle OS level, he's a PHP programmer so he sets up PHP/Apache the way he wants it.) Here's a snip from his last e-mail:
"The CLI version of PHP on the server was installed separately, and installed with a kitchensink compile, since it's not crucial for performance. That's my habit."
However, the polling is done via the cron job right? So that means the stripped down PHP buillt into Apache isn't an issue. Which, as you were saying, indicates the issue may be more OS than PHP related.
Thanks,
Nathan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is correct. I'm also basing my assumptions on the indication that you could not ping anything from the command line of the server (not through php, just the console).
--Brad Fears
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did you tell me that ICMP queries work from the web interface, but not the command line? I ask because there are two of you with the same problem right now, so I'm having trouble keeping the forum threads straight. :)
If so, can you email me a copy of the output from a phpinfo() function on your machine? If not, can you verify that php is generating the same error between the command line version and web version?
--Brad Fears
brad_fears@users.sourceforge.net
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ICMP queries don't appear to work from node.start. I can ping from the command line. I'll run down the info and send it to you. Thanks for your help.
Nathan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don't do what I did and realize that you never updated your php cli after you compiled it. Search your whole system for php cli (find / -name php -type f) and then run phpinfo against the command line to see if sockets are enabled (not the GUI version but from the command line) and php -v to see the compile date and version information. I was running a cli that was compiled without sockets support for another project and didn't realize it. I'm still having problems with query_icmp.php but I will start another thread for that as it's different than this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting the following when I run
php -q node.start
Fatal error: Call to undefined function: socket_create() in /usr/local/node-runner/include/query_icmp.php on line 21
I'm on a Fedora Core 3, AMD 64 box. I've been looking for a utility like this and it looks great. If I can just get that running, I'll be great.
BTW-I followed your thread on the FSockOpen and ran the test program you'd linked to. My FSockOpen also appears functional as the test program ran without problems.
Thanks for your help.
Nathan
It appears as though socket support has not been compiled into your php binary. But if you say you ran a test script from the command line and it worked okay, that couldn't be the case.
Do you have any nodes configured that do not query using ICMP (try on using TCP)? If so, disable the ones that use ICMP and try it again.
--Brad Fears
Thanks for the response. Progress!! I deleted the nodes that were querying based on ICMP and used only those that were TCP based (namely port 25). It now appears to work. I guess that's going to be as good as it gets for me until I figure out why the ICMP isn't happy.
The first node in the list was ICMP, which was probably causing the rest of the script to abort, don't know.
Any other thoughts as to the ICMP functionality? I hate to open ports simply for monitoring sake. But, the software works well and was so easy to setup. Prior to this, I tried nargios, what a pain!
Nathan
Glad to hear it's at least partially working. What error messages do you see again from the console when you try to ping something? Have you tried googling on those error messages? Perhaps it's something in the way your OS/distro is configured.
--Brad Fears
Hey Brad,
I ran some of this past the guy who compiled the PHP on the server. (I handle OS level, he's a PHP programmer so he sets up PHP/Apache the way he wants it.) Here's a snip from his last e-mail:
"The CLI version of PHP on the server was installed separately, and installed with a kitchensink compile, since it's not crucial for performance. That's my habit."
However, the polling is done via the cron job right? So that means the stripped down PHP buillt into Apache isn't an issue. Which, as you were saying, indicates the issue may be more OS than PHP related.
Thanks,
Nathan
That is correct. I'm also basing my assumptions on the indication that you could not ping anything from the command line of the server (not through php, just the console).
--Brad Fears
Ping works great from a command line. I can ping, arp . . .
Those appear fully functional.
Nathan
Did you tell me that ICMP queries work from the web interface, but not the command line? I ask because there are two of you with the same problem right now, so I'm having trouble keeping the forum threads straight. :)
If so, can you email me a copy of the output from a phpinfo() function on your machine? If not, can you verify that php is generating the same error between the command line version and web version?
--Brad Fears
brad_fears@users.sourceforge.net
Sorry for the delay. I forgot to check back. :) I'll get that Monday when I'm SSH'd in.
ICMP queries don't appear to work from node.start. I can ping from the command line. I'll run down the info and send it to you. Thanks for your help.
Nathan
I finally have a Fedora Core 3 machine set up and have duplicated the problem, so give me some time and I'll figure out a fix. Thanks.
--Brad Fears
Don't do what I did and realize that you never updated your php cli after you compiled it. Search your whole system for php cli (find / -name php -type f) and then run phpinfo against the command line to see if sockets are enabled (not the GUI version but from the command line) and php -v to see the compile date and version information. I was running a cli that was compiled without sockets support for another project and didn't realize it. I'm still having problems with query_icmp.php but I will start another thread for that as it's different than this.