0

我在Tomcat 6中安装了CAS 3.4.12,带有OpenLDAP,openssl ..我尝试应用phpCAS,但我得到空白页..和浏览器中的URL:

http://sso.jarkom.com/index.php?ticket=ST-7-nqIcVhNfOwPDVDRodaEK-cas

任何人都可以帮助我找到错误并解决它......??

这是示例 phpCAS 的源代码

<?php 
// import phpCAS lib 
include_once('CAS.php'); 
phpCAS::setDebug(); 
// initialize phpCAS 
phpCAS::client(CAS_VERSION_2_0,'sso.jarkom.com',443,'cas'); 
// no SSL validation for the CAS server 
phpCAS::setNoCasServerValidation(); 
// force CAS authentication
phpCAS::forceAuthentication(); 
// logout if desired 
if (isset($_REQUEST['logout'])) { 
    phpCAS::logout(); 
} 
// for this test, simply print that the authentication was successfull 
?> 
<html> 
   <head> 
      <title>phpCAS simple client</title> 
   </head> 
<body> 
<h1>Successfull Authentication!</h1> 
  <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p> 
<p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p> 
<p><a href="?logout=">Logout</a></p> 
</body> 
</html>
4

2 回答 2

0

I have resolve this problem.. this problem need to install php5-curl in ubuntu :

apt-get install php5-curl

于 2014-09-16T10:26:42.937 回答
0

我也有同样的事情发生在我身上。在我的测试服务器上 phpCAS 工作得很好,但在生产服务器上它停在它为你做的同一个地方。

我无权访问 PROD 服务器上的 apache 日志,因此我必须将以下内容添加到 .htaccess 文件中,以便将错误转储到浏览器:

php_flag display_errors 1

一旦我这样做了,我得到了以下错误:

Fatal error: Class 'DOMDocument' not found in /path/to/CAS-1.3.3/CAS/Client.php on line 3130

事实证明,php DOM 模块安装在我的测试服务器上,但没有安装在生产环境中。如果您在 Apache 日志或使用该 php_flag 设置的浏览器中看到该错误,请执行此操作(当然,仅限 RHEL/CentOS)。

yum install php-xml
于 2014-09-12T22:16:35.853 回答