FreeBSD fsockopen problem
| From: | Charles Williams | Date: | Wed, 17 Apr 2002 12:34:35 +0000 |
| Subject: | FreeBSD fsockopen problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93321@lists.php.net to get a copy of this message | ||
Hey all,
I am in need of opening a UDP socket on a FreeBSD box. The following code
works in Linux but not in FreeBSD. In FreeBSD $fp returns a valid resource
number and $error equals 0 (no error), but there is NO service on that port
when testing it.
$fp = fsockopen ("udp://" . $tmpserver, $tmpport, $errno, $errstr, 25);
echo "$fp , $errno , $errstr";
if(!$fp)
{
$tpl->parse("CONTENT", "notconnected", false);
$tpl->parse("OUT", "main", false);
$tpl->p("OUT");
exit;
}
In other words the block in the "if" statement doesn't execute.
Anyone have any ideas what this is?
thanks,
chuck