# Forums | Mahara Community

## Open Discussion / CAS Plugin for Mahara version 16.10

Posts: 19

22 November 2016, 9:46 PM

Hi All,

I have a problem when I install CAS Plugin (CAS for 15.04 adjustments by Robert Lyon) in Mahara version 16.10. When I open the URL http://mymahara/auth/cas/, I get blank page and the error_log as stated below

[Tue Nov 22 16:03:50.957114 2016] [:error] [pid 23970] [client IP PC:port] PHP Fatal error: Can't use method return value in write context in /var/www/html/mahara1610/auth/cas/CAS/CAS/Client.php on line 1501

Can anyone help me for this matter?For Mahara version 1.10, it seems not the problem to connect our CAS server.

-Anwar

Posts: 346
##### Re: CAS Plugin for Mahara version 16.10

23 November 2016, 10:07 AM

Hi Anwar,

It sounds like an issue with php and the empty() function - in older versions of php it has issues.

What you can do is go to line 1501 in the file at  /var/www/html/mahara1610/auth/cas/CAS/CAS/Client.php

it should look like:

 return !empty($SESSION->get('phpCAS/user')); you can change this to: $phpCASuser = $SESSION->get('phpCAS/user');  return !empty($phpCASuser);

And that should fix that problem.

You will also need to fix up lines 1530, 1554, 1569 as they will have the same problem.

So after this line (approx line 1527):

 if ( $this->isProxy() ) { Add this line $phpCASpgt = $SESSION->get('phpCAS/pgt'); And change the places that have:  !empty($SESSION->get('phpCAS/pgt')

to be:

  !empty(\$phpCASpgt);

Let me know if that all works for you

Cheers

Robert

Posts: 19
##### Re: CAS Plugin for Mahara version 16.10

23 November 2016, 1:52 PM

Hi Robert,

Yes, it's worked!!! Tqvm Robert for help me. =))

-Anwar

3 results