Call To A Member Function Getonline() On A Non-Object Error

Hi All,



I am not a developer. I just know I have some buggy code because there are a ton of errors being thrown on our server. See attached error rate.png.



I am running 4.2.2.



If I click on the first error it shows this stack:





Error message



E_ERROR: Call to a member function getOnline() on a non-object



Sample stack trace



…ssion::getOnline called at /mnt/ebs/stilettosolutions.com/app/Tygh/

Session.php (479)

…ion::getOnline called at /mnt/ebs/stilettosolutions.com/app/addons/ct/

func.php (1101)

…mnt/ebs/stilettosolutions.com/app/addons/ct/controllers/frontend/

init.post.php (21)

… include called at /mnt/ebs/stilettosolutions.com/app/functions/

fn.control.php (608)

…ntroller called at /mnt/ebs/stilettosolutions.com/app/functions/



fn.control.php (391)

in fn_dispatch called at /mnt/ebs/stilettosolutions.com/index.php (25)



What is my problem? How can it be fixed?



Thanks in advance for any light that can be shed on this to help our sites run better.

Error Rate.png

The getOnline method definitely exists in the app/Tygh/Sessions.php and there are overriding methods in both Backend/SessionRedis.php and Backend/Session/Database.php



So I would assume that you have a backend defined that is not mysql nor redis. Check your config.local.php settings.

Here is our config.local.php settings for the backend. We are only using redis.



// Cache backend

// Available backends: file, sqlite, database, redis

// To use sqlite cache the “sqlite3” PHP module should be installed

$config['cache_backend'] = 'redis';

$config['cache_redis_server'] = 'stiletto.xdltia.0001.usw2.cache.amazonaws.com';



// Storage backend for sessions. Available backends: database, redis

$config['session_backend'] = 'redis';

$config['session_redis_server'] = 'stiletto.xdltia.0001.usw2.cache.amazonaws.com';



// CDN server backend

$config['cdn_backend'] = 'cloudfront';

Shouldn't these be localhost?

$config['cache_redis_server'] = 'localhost';

We have the site on a load balancer.

Don't know… I don't use Redis so not familiar. But based on the errors you are getting, it's not finding the appropriate method for the session storage device.