Configuration of php::CAS to avoid looping

Overview

This document shows some configuration settings that should be used when configuring the php::CAS module. These changes are needed to stop a looping problem with php::CAS.

php::CAS Configuration Settings

Numerous people have noticed that php::CAS seems to loop until the browser gives up, when trying get the examples to work, or even when integrating php::CAS into their applications. To fix this problem, you need to enable session management, and then tell php::CAS to not use its own session management.

First, turn on session management (if you have not done so already) by adding the following to the top of the php script:

session_start();

Now, initialize php::CAS by telling it to use auth-test, and to not use its own session management:

phpCAS::client(CAS_VERSION_2_0, 'auth-test.berkeley.edu'443'/cas'false);

The false at the end tells php::CAS to use your session management, i.e., to not use its own session management. If you do not do this, then php::CAS does not actually authenticate the person, and just keeps sending the user to CAS over and over until the browser detects that it is looping, and then stops.

Once you do this, it should "just work".

Of course, for production, you would change that to auth.berkeley.edu.