I integrated my ZendFramework 1 project with this example.
require_once 'Cas/config.php' ;
require_once 'Cas/CAS.php' ;
phpCAS::setDebug("/var/www/html/tums/library/Cas/ooo.log");
phpCAS::setVerbose(true);
phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
phpCAS::setNoCasServerValidation();
$auth = phpCAS::checkAuthentication();
if($auth)
echo "Salam!";
else
{
phpCAS::forceAuthentication();
echo "bbbbbbbbbbbbbbbbbbbbbbb";
}
When User is not logged in phpCAS redirect to CAS login page properly but when User logged in phpCAS::checkAuthentication() repeats an infinite redirect loop until browser stop that. I run above example on a separate simple php file and it works fine but when i copy that code to my Zend Framework 1 controller this happens(infinite loop). What should i do?