Blank page after success login CAS

916 Views Asked by At

i installed CAS 3.4.12 in Tomcat 6, with OpenLDAP, openssl.. i try to apply phpCAS, but i get blank page.. and the URL in browser :

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

any one can help me to find the error and resolve it...??

this's the source code of sample 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>
2

There are 2 best solutions below

0
On

I had the same thing happen to me. On my test server phpCAS worked great, but on the production server it stopped at the same place that it did for you.

I don't have access to the apache logs on the PROD server, so I had to add the following to an .htaccess file in order to dump errors to the browser:

php_flag display_errors 1

Once I did that I got the following error:

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

It turns out that the php DOM module was installed on my test server but not on production. If you see that error in your Apache logs, or in the browser using that php_flag setting, then do this (RHEL/CentOS only, of course).

yum install php-xml
0
On

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

apt-get install php5-curl