Bug #4088: The funcion yp_next() does not return any value
| From: | tex at cselt1 dot polito dot it | Date: | Mon, 10 Apr 2000 07:11:00 +0000 |
| Subject: | Bug #4088: The funcion yp_next() does not return any value | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17766@lists.php.net to get a copy of this message | ||
From: tex@cselt1.polito.it
Operating system: Solaris 7
PHP version: 3.0.15
PHP Bug Type: NIS related
Bug description: The funcion yp_next() does not return any value
// Found NIS Domain
$domain = yp_get_default_domain();
if(!$domain) {
error("NIS Error","No NIS Domain found");
exit();
}
if ($debug==1) {
$output .= "NIS Domain: <STRONG>" . $domain . "</STRONG>\n";
$output .="<BR>\n";
}
// Find first entry in NIS passwd table
$entry = yp_first($domain, "passwd.byname");
if(!$entry) {
error("NIS Error","No entry in passewd NIS table");
exit();
}
$key=$entry["key"];
$value=$entry["value"];
$output .= "Key: ".$key."<BR>\n";
$output .= Value: ".$value."<BR>\n";
$row = yp_next($domain,"passwd.byname","");
if(!$entry) {
echo yp_errno() . ": " . yp_err_string();
}
$key=$row["key"];
$value=$row["value"];
$output .= Key: ".$key."<BR>\n"; // No data return
$output .= "Value: ".$value."<BR>\n"; // No data return