What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.



yp_err_string — Fetches a human-readable error string for an error number.


string yp_err_string(errorcode);
int errorcode: Error code to match to an error message


A string; FALSE on error


yp_err_string() fetches the error message for a given error number. If the error number provided is not a valid error number, a message such as Unknown NIS error code is returned.

The error message returned may vary between implementations of NIS. The following table shows the list of messages returned by the glibc implementation of NIS.

Number Description
1 Request arguments bad
2 RPC failure on NIS operation
3 Can't bind to server that serves this domain
4 No such map in server's domain
5 No such key in map
6 Internal NIS error
7 Local resource allocation failure
8 No more records in map database
9 Can't communicate with portmapper
10 Can't communicate with ypbind
11 Can't communicate with ypserv
12 Local domain name not set
13 NIS map database is bad
14 NIS client/server version mismatch - can't supply service
15 Permission denied
16 Database is busy


PHP 4+ (At the time of writing, this function was not documented in the online manual)

See also

To fetch the error number for the last yp_* function call:



Example 1439. Display all the yp error messages

<table border="1">
// Initialize variables
$last_errstr = '';

for ($errno = 1; TRUE; ++$errno) {
   // Find an error message for the given error number
   $errstr = yp_err_string ($errno);

   // If the last error message matches the current error message
   // we have likely gone past the range of valid error numbers
   if ($last_errstr == $errstr)

   printf ('<tr><td align="right">%d</td><td>%s</td></tr>', $errno, $errstr);
   $last_errstr = $errstr;

PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at The authors of this book have elected not to choose any options under the OPL. This online book was obtained from and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.