Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

Bill Lohrerdən -
Number of replies: 9

Hi,

We have had a test system running Moodle for several weeks.  Today when people attempted to logon they are receiving the following message:

phpCAS error: phpCAS::client(): type mismatched for parameter $server_version (should be `string') in C:\xmoodle\moodle\auth\cas\auth.php on line 170

What is the correct way to fix this.   This is running on a Windows 2003 R2 Box. 

Moodle is version 1.8 and was installed by running the setup_xampp.bat file

Bill Lohrer

Carle Place Schools

Orta qiymət: -
In reply to Bill Lohrer

Re: Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

sacha brostoffdən -
Did you fix this in the end? This problem has just happened to me!

I think I'd previously been playing around, and had unhidden CAS as an authentication mechanism.

Now I can't log in to do anything, as I get the phpCAS error.

I'm a bit stuck!

All the best,

Sacha
In reply to sacha brostoff

Re: Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

Sacha Brostoffdən -
I fixed my problem at least, touch wood.

I had to update the moodle database manually using the MySQL Query Browser. In the moodle.mdl_config table, record 127 has a name of "auth", and in my broken installation it had a value of "email,shibboleth,cas,radius,pam,ldap" - which was all the authentication mechanisms I'd enabled (but not configured).

I updated the value so it was just "email", and I could log in again - the error message had gone.

Thanks to everyone who made moodle discoverable and fixable, and the lovely people at MySQL for their great tools.

Sacha
In reply to Bill Lohrer

Re: Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

Vijay Reddydən -
Hi,

I too have the same problem now. The site (Moodle 1.8.1) was working fine until 2 days ago; suddenly users found this EXACT ERROR when they try to login.

Would you please post step-by-step instructions to fix this problem?

Thanks a lot in advance!
Vijay
In reply to Vijay Reddy

Re: Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

Vijay Reddydən -
Good news!

I was able to restore the system using the above solution!

Thanks a lot!!!
In reply to Vijay Reddy

Re: Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

Phil Jonesdən -

I tried editing the record in the manner described as the solution for this problem:

I went to the server site, cPanel, phpMyAdmin, on the left hand side was listed the name of my website.  Underneath that was mdle1 (185) and underneath that was listed mdle2 (185). I clicked on mdle1 (185) and opened up a list of tables.  I found mdl_config, chicked it, clicked on browse, and went to record 128, which had

128 auth email,cas,db,fc,imap,ldap,mnet,nntp,none,pam

I deleted all other words apart from email and left 128 and auth unchanged.

However, when I tried to save the changes the following error came up:

MySQL said: 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A' at line 1

Can anyone please tell me how to fix this.

Thanks

Phil Jones

In reply to Bill Lohrer

Re: Getting phpCAS error: phpCAS::client(): type mismatched for parameter $server_version Error

Mihai Mirosanudən -

Hi! I also got this error using Moodle 1.9.3.

We are using Email based self authentication, so what I did is that I logged in as the administrator, and from the administrator menu I selected: Users-> Authentication -> Manage Authentication and then i disabled CAS server (SS).

Now it works fine!

Regards,

Mihai.