hello,
i just installed the Multi-router looking glass from
http://pilot.org.ua/mrlg/ and i was trying to configure it and i got this error:
Warning: fsockopen(): php_hostconnect: connect failed in /home/httpd/html/cisys/mrlg/mrlg.php on line 269
Warning: fsockopen(): unable to connect to x.x.x.x:23 in /home/httpd/html/cisys/mrlg/mrlg.php on line 269
Error connecting to router
this is the line 269.
// All Ok, do telnet
$address = $router[$routerid]["address"];
if (!empty ($router[$routerid][$handler . "_port"]))
$port = $router[$routerid][$handler . "_port"];
else
$port = $router["default"][$handler . "_port"];
if (!empty ($router[$routerid][$handler . "_password"]))
$password = $router[$routerid][$handler . "_password"];
elseif (!empty ($router[$routerid]["password"]))
$password = $router[$routerid]["password"];
else
$password = $router["default"]["password"];
$command = $request[$requestid]["command"] . (!empty ($argument) ? (" " . safeOutput ($argument)) : "");
$link = fsockopen ($address, $port, $errno, $errstr, 5);-----269----
if (!$link)
{
printError ("Error connecting to router");
return;
}
socket_set_timeout ($link, 5);
$username = $router[$routerid]["username"];
if (!empty ($username)) fputs ($link, "{$username}\n");
fputs ($link, "{$password}\nterminal length 0\n{$command}\n");
// let daemon print bulk of records uninterrupted
if (empty ($argument) && $request[$requestid]["argc"] > 0) sleep (2);
fputs ($link, "quit\n");
echo "<pre>\n";
while (!feof ($link)) $readbuf = $readbuf . fgets ($link, 256);
$start = strpos ($readbuf, $command);
$len = strpos ($readbuf, "quit") - $start;
while ($readbuf[$start + $len] != "\n") $len--;
echo substr($readbuf, $start, $len);
echo "</pre>\n";
fclose ($link);
}
so, anyway, i was searching aroud and i found that it was some kind of bug in php......
can anybody help me??