各位大大
我在http://www.math.ohio-state.edu/~ccunning/pam_auth/
下載
pam_auth-0.4-4.3.tar.gz
安裝
安裝過程
為
1) unpack the pam_auth tarball anywhere
2) cd pam_auth
3) phpize
4) ./configure
5) make
6) make install
然後再PHP.ini加入
extension=pam_auth.so
pam_auth.servicename = "php"
我寫了一個測試程式
$username = "kiki";
$password = "1234qwerASDF";
echo "Test PAM Begin....<br>";
if(pam_auth($username, $password, &$error)) {
echo "Yeah baby, we're authenticated!";
} else {
echo $error;
}
在/etc/pam.d/下
加入一個php 與 httpd的檔案
作為pam認證用
但是始終是 "Authentication failure"
我的Apache的mod_pam_auth都可以測試ok
就PHP的pam不ok
安裝過程是有出現
# phpize
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
run info '(automake)Extending aclocal'
or see
http://sources.redhat.com/automake/automake.html#Extending-aclocalconfigure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
Configuring for:
PHP Api Version: 20020918
Zend Module Api No: 20020429
Zend Extension Api No: 20021010
在make時候
出現以下訊息
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(

manual pages.
但我還是繼續作make install
#make install
Installing shared extensions: /usr/lib/php4/
結果還是都試認證錯誤
另外我有嘗試去要安裝
php-pam_auth-4.3.10_0.4-2mdk.i586.rpm
但是這個檔案不是Fedora Core 3或是RedHat的系統
我也不知道怎麼把這檔案解開只安裝pam_auth.so
所以放棄
除此
我有上ftp://ftp.netexpress.net/pub/pam/去抓
php_pam.newest.tgz
要來安裝
執行
#phpize
#./configure
卻出現以下錯誤訊息
configure: error: cannot run /bin/sh ./config.sub
所以就安裝不下去
請大家幫幫我忙
要怎麼解決這問題