PHP Classes

what am i missing in linux?

Recommend this page to a friend!

      DNServer  >  All threads  >  what am i missing in linux?  >  (Un) Subscribe thread alerts  
Subject:what am i missing in linux?
Summary:socket_bind error?
Messages:2
Author:chris
Date:2007-03-06 01:53:37
Update:2007-03-06 16:50:31
 

  1. what am i missing in linux?   Reply   Report abuse  
Picture of chris chris - 2007-03-06 01:53:37
Hi.

congratulations on doing this. i am thrilled to see it.

there must be something i am missing though, and this stuff isnt my forte.

i open your example scripts in a browser and this is what i am getting in linux:

Warning: socket_bind() [function.socket-bind]: Host lookup failed [-10004]: No address associated with name in /var/www/dnserver/DNServer.php on line 64
Error in line 64

any ideers anyone?

  2. Re: what am i missing in linux?   Reply   Report abuse  
Picture of Cesar D. Rodas Cesar D. Rodas - 2007-03-06 16:50:31 - In reply to message 1 from chris
That bug is fixed. That is because in Linux and Unix Like OS needs the IP to bind. In Windows just needs to give NULL.

Download the new version.

Thanks for report that Error.

PD1: And another recommendation. Do never run this script as a Apache module or CGI... Because this script never die. I recommend to run it as console application.

Ex:

php -q scriptname.php & #Execute and send to background


PD2: You need to have a permission from root to listen something in UDP in UnixLikeOS, and to stop the "named", because that's program is listening the 53 port that this script use.