How to let CAS handle session I am using the phpCAS  library and would like sessions to be handled by that library.

I am instantiating the client this way:

function my_module_init(){
    ...
    phpCAS::client(CAS_VERSION_2_0,'casdomain' , 8443, '/cas',true);
    ...
}


I have it in hook_init() since I want to check for user authentication on each page load. 

But I am getting this error.  


  phpCAS error: phpCAS::client(): Another session was started before
  phpcas. Either disable the session handling for phpcas in the client()
  call or modify your application to leave session handling to phpcas


How can I get rid of this error and have phpCAS handle the session?

Thanks.
Any reason why you are not using the module cas? It seems like a fairly stable module with over 5000 people using it. I would give that a shot before attempting any custom code in hook_init().