心有多大舞台便有多大

Embrace changes, pursue excellence, share niceness.

耶鲁cas单点登录系统的php客户端使用注意事项

以前用CAS一直是用java的客户端,今天想把自己的phpMyAdmin集成到中心认证系统中,这样就不需要到apache的目录中用access文件去控制了.
在集成phpCAS的时候,系统报出一些错误:
Warning: include_once(DB.php) [function.include-once]: failed to open stream: No such file or directory in /opt/httproot/phpMyAdmin/cas/PGTStorage/pgt-db.php on line 11

Warning: include_once() [function.include]: Failed opening 'DB.php' for inclusion (include_path='.:/usr/local/php-5.2.5/lib/php') in /opt/httproot/phpMyAdmin/cas/PGTStorage/pgt-db.php on line 11

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /opt/httproot/phpMyAdmin/cas/PGTStorage/pgt-db.php:11) in /opt/httproot/phpMyAdmin/cas/client.php on line 489

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /opt/httproot/phpMyAdmin/cas/PGTStorage/pgt-db.php:11) in /opt/httproot/phpMyAdmin/cas/client.php on line 489

Warning: Cannot modify header information - headers already sent by (output started at /opt/httproot/phpMyAdmin/cas/PGTStorage/pgt-db.php:11) in /opt/httproot/phpMyAdmin/cas/client.php on line 880
查了些资料,重新安装了php后问题解决:
1.在编译php的时候,要加上--with-curl, --with-openssl, --with-dom, --with-zlib这些选项
如果系统中还没有安装curl包:
wget http://curl.haxx.se/download/curl-7.18.1.tar.gz
tar -zxvf curl-7.18.1.tar.gz
./configure --prefix=/usr/local/curl
make
sudo make install
编译安装php:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs  --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml-2.6.30/ --with-gd=/usr/local/gd-2.0.35/ --with-curl=/usr/local/curl/ --with-openssl --with-zlib --with-pear=/usr/local/php_pear
make
make test
sudo make install
注意,有可能pear安装不成功,要看你下载的php包,安装完后到php源代码目录下的pear下看看是有有错,否则,要现下载一个pear的安装包:
wget http://pear.php.net/install-pear.phar
再执行make,make install

2.安装PEAR:DB
cd /usr/local/php/bin
pear install DB

3.测试phpCAS
把phpCAS包里的example_simple.php以及source目录里的所有文件拷贝到一个可以从apapche执行php文件的目录中
然后访问http://host/dir/example_simeple.php
结果页面转向到https://sso-cas.univ-rennes1.fr的中心认证地址,说明phpCAS安装成功。

posted on 2008-05-07 14:00 pony 阅读(2585) 评论(3)  编辑  收藏 所属分类: linux

评论

# re: 耶鲁cas单点登录系统的php客户端使用注意事项 2008-05-07 14:05 pony

在安装curl包的时候,突然想到,现在java的http connection编程一般都是使用apache上的httpclient包,虽然这个包做的不错,但能否改为通过jni调用curl接口呢?因为curl所支持的协议要比httpclient多,支持更多的功能。  回复  更多评论   

# re: 耶鲁cas单点登录系统的php客户端使用注意事项 2009-11-25 22:08 ly3551

如果是在windows下,php是解压包,怎么修改  回复  更多评论   

# re: 耶鲁cas单点登录系统的php客户端使用注意事项 2009-11-25 22:12 ly3551

如果可以的话能否联系我ly@huat.edu.cn  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航: