[BlueOnyx:19397] Re: Can not login to Server
Michael Stauber
mstauber at blueonyx.it
Tue Mar 29 12:36:26 -05 2016
Hi NETgemacht,
> I have restarted my server and wanted to enable the MySql Connection. Now I get this error after login:
>
> A PHP Error was encountered
> Severity: Warning
> Message: Invalid argument supplied for foreach()
> Filename: libraries/ServerScriptHelper.php
> Line Number: 958
I've never seen this error before and went digging what could cause it:
if (in_array("systemAdministrator", $uirights) ||
$this->loginUser["systemAdministrator"]) {
// I am god, so I get ALL the capgroups :)
$groups = $this->getAllCapabilityGroups();
$caplevels = array();
foreach($groups as $groupkey=>$groupval) // <--- This line
{
$caplevels[] = $groupkey;
}
}
Ok, so you logged in as "admin" and it threw the error in the line I
marked above. That's where it has polled CODB for all Capabilities that
a "systemAdministrator" user might have and loops through them to assign
them to the Array $caplevels.
This error can only happen if the call $this->getAllCapabilityGroups()
returns nothing.
However, the function getAllCapabilityGroups() uses a cache to speed up
things. There are two cases where this might cause this error: Cache
corruption or CODB corruption. Hopefully it's the cache, as that is easy
to fix.
To fix the cache please do this:
Login to the server by SSH as "admin" and use "su -" to gain "root" access.
Then delete the capability cache for with this command:
rm -f /usr/sausalito/capcache/*
Then (for good measure) restart CCEd and Admserv:
/usr/sausalito/sbin/cced.init restart
/sbin/service admserv restart
Then try to login to the GUI again and it should work. If that doesn't
work, then you might have a CODB corruption.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list