Was working now not able to login (no prompt)

I’ve got an issue that I would really like to fix it instead of having to reinstall again as i have now set up quite a bit.

The problem is that whenever I try to access the CMS I get “Unexpected Error, please contact support.” This is before logon and means I have no way to get to the logs through the CMS.

Is there anything I can do to bring back more detailed messages or view the logs outside of the CMS?

Thanks

Trev

Login

@Dan replied to a previous occurrence of this issue for a different user back in May. His advice at the time was:

I am running 2.0.3 with MySQL 5.7.26
My other versions are:
PHP 7.2.18
Apache 2.4.39

I hope that this helps.

Trev

Try looking in the log table in the cms database to see if its logging anything.

I’ve had a look in the Log table and recorded what happens during a refresh. These results are in the linked csv data.

I looks like a data issue as the error that keeps coming up is:

rand() expects parameter 2 to be integer, float given#0 [internal function]: Slim\Slim::handleErrors(2, 'rand() expects ...', 'C:\\wamp\\xibo-cm...', 76, Array)
#1 C:\wamp\xibo-cms-2.0.3\lib\Middleware\CsrfGuard.php(76): rand(0, 4294967295)
#2 [internal function]: Xibo\Middleware\CsrfGuard->check()
#3 C:\wamp\xibo-cms-2.0.3\vendor\slim\slim\Slim\Slim.php(1208): call_user_func_array(Array, Array)
#4 C:\wamp\xibo-cms-2.0.3\vendor\slim\slim\Slim\Slim.php(1354): Slim\Slim->applyHook('slim.before.dis...')
#5 C:\wamp\xibo-cms-2.0.3\vendor\slim\slim\Slim\Middleware\Flash.php(85): Slim\Slim->call()
#6 C:\wamp\xibo-cms-2.0.3\vendor\slim\slim\Slim\Middleware\MethodOverride.php(92): Slim\Middleware\Flash->call()
#7 C:\wamp\xibo-cms-2.0.3\lib\Middleware\Actions.php(150): Slim\Middleware\MethodOverride->call()
#8 C:\wamp\xibo-cms-2.0.3\lib\Middleware\Theme.php(36): Xibo\Middleware\Actions->call()
#9 C:\wamp\xibo-cms-2.0.3\lib\Middleware\WebAuthentication.php(131): Xibo\Middleware\Theme->call()
#10 C:\wamp\xibo-cms-2.0.3\lib\Middleware\CsrfGuard.php(63): Xibo\Middleware\WebAuthentication->call()
#11 C:\wamp\xibo-cms-2.0.3\lib\Middleware\State.php(119): Xibo\Middleware\CsrfGuard->call()
#12 C:\wamp\xibo-cms-2.0.3\lib\Middleware\Storage.php(47): Xibo\Middleware\State->call()
#13 C:\wamp\xibo-cms-2.0.3\lib\Middleware\Xmr.php(37): Xibo\Middleware\Storage->call()
#14 C:\wamp\xibo-cms-2.0.3\vendor\slim\slim\Slim\Slim.php(1300): Xibo\Middleware\Xmr->call()
#15 C:\wamp\xibo-cms-2.0.3\web\index.php(127): Slim\Slim->run()
#16 {main}

Export of the log file in csv format is here

If any one has any ideas I would really appreciate the help.

Trev

This is the line that is throwing the error:

Could you try chainging this line to:
$session->set($this->key, bin2hex(random_bytes(20)));

Let us know if that solves the problem for you.

I will also log this issue in GitHub.

1 Like

Thanks for your help Peter, that has worked perfectly.

1 Like