yp/nis library in PHP
I recently upgraded a client's intranet server from RHEL 3 to Centos 5. The PHP code on the server heavily relies on YP/NIS functions that were available in earlier versions of PHP, but are no longer included (functions like yp_match () and yp_get_default_domain()). What's worse, the YP files at PECL are unmaintained and have been missing for years.
You can download the files YP source files you will need
here.
Make sure that you have php-pecl and php-devel installed before starting!
[root@server ]# unzip pecl_yp.zip
[root@server ]# cd pecl_yp
[root@server ]# phpize
[root@server ]# ./configure
[root@server ]# make
[root@server ]# make test
[root@server ]# make install
add the line below to your PHP configuration file (php.ini):
extension=yp.so
restart your apache server (service httpd restart)
You are done!