Skip to main content
Error thrown on login - preventing all users from viewing forum Started by jmilholen87 · · Read 11304 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Error thrown on login - preventing all users from viewing forum

Greetings all. Hoping I can get some help with an error that is plaguing me.

Some quick background:
I recently inherited ownership of an online web forum from a friend who could no longer devote the time to owning the forum/community. The forum has been around for quite a few years now. It is hosted on a domain that it shares with a front end website, a wiki, and a backend db as well as the forum itself. The version of the forum is: ElkArte 1.1.8 | SimplePortal 1.0.1

Up until a few days ago, everything was running swimmingly. But, as early as January 15th (first reported incident from user base to me), users have begun to encounter a white screen of death when trying to access any page on the forum. They can access the main site, they can access the wiki, but the forum leads to an error screen. IMPORTANT NOTE: this only happens if the user was already logged in. If the user is NOT logged in, they can access the main forum page, and any posts on the forum. BUT, when they try to log in, they get the same error. The error that appears is as follows:

QuoteWarning: Trying to access array offset on value of type null in /customers/6/a/e/uss-theurgy.com/httpd.www/forum/sources/database/Db-mysql.class.php on line 545 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay

Has anyone encountered this particular error before? I was able to find the Db-mysql.class.php file through the domain backend browser, but the code line in question is simply the code for throwing an error when something doesn't work. And nowhere in the php file did I see any select query. This is keeping anyone from accessing and posting on our forums. The Domain host tech support suggesting posting the issue here. I would have reached out sooner but it took a while for my account registration confirmation email to show up.

My apologies if this is the wrong part of the community to post this. We've got almost 200 users (though not that many active these days) and I'd like to restore services to them as swiftly as I can. So, many thanks in advanced.

Re: Error thrown on login - preventing all users from viewing forum

Reply #1

I've not personally seen that error before ...

What version of MySQL is you site running ?  You can find that from Admin -> Main -> Support and Credits 
Also let us know the version of PHP you are running. 
One other thing would be to is enable the query in the error log ... Admin -> Security and Moderation -> General -> Include database query in the error log If we are lucky we may catch where that error is being thrown from.

Re: Error thrown on login - preventing all users from viewing forum

Reply #2

You can also try as a test ...

Edit your Db-mysql.class.php  which will be in your sources/database directory.

Towards the top you will find:
Code: [Select]
		self::$_db->_connection = $connection;
around line 83

After that add the following
Code: [Select]
		self::$_db->query('', '
SET SQL_BIG_SELECTS = 1',
array(
)
);

That should be the workaround as suggested by the error you are seeing, so that may help in the short term.

In my quick reading about that error, it seems like your host is providing pretty limited resources.  Many hosts are setup for static sites and do a poor job hosting dynamic ones including forums, CMS and ...

Re: Error thrown on login - preventing all users from viewing forum

Reply #3

@Spuds 

Thank you, sincerely, for that advice. The code snippet you suggested seems to have fixed the issue.
I need to have a conversation with my hosting site about resources....