[PHP-DEV] Bug #4088: The funcion yp_next() does not return any value From: tex <email protected>
Date: 04/10/00

From: tex <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>