MyBB Community Forums

Full Version: Blank page - mysql error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

i have a huge problem at my forum.

I get 2 error codes in my error.log and for some users its showing a blank page if they open it in their web browser. I cant fix it by myself so I need your help.

Here is the first error code I get:
<error>
	<dateline>1304992150</dateline>
	<script></script>
	<line>0</line>
	<type>20</type>
	<friendly_type>MyBB SQL Error</friendly_type>
	<message>SQL Error: 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 ')
			ORDER BY p.dateline' at line 3
Query: 
			SELECT subject, message
			FROM mybb_posts p
			WHERE pid IN()
			ORDER BY p.dateline
		</message>
</error>

Error code 2:
<error>
	<dateline>1304991741</dateline>
	<script></script>
	<line>0</line>
	<type>20</type>
	<friendly_type>MyBB SQL Error</friendly_type>
	<message>SQL Error: 1054 - Unknown column 'averagerating' in 'order clause'
Query: 
		SELECT t.*, t.username AS threadusername, u.username
		FROM mybb_threads t
		LEFT JOIN mybb_users u ON (u.uid = t.uid)
		WHERE t.fid='10' AND t.visible='1' 
		ORDER BY t.sticky DESC, averagerating desc , t.totalratings DESC
		LIMIT 0, 20
	</message>
</error>

Please help me Smile

Thanks in advance!
For the first error: http://dev.mybb.com/issues/1290
The bug has been fixed and will be available in the next maintenance release.


The second error, can you run File Verification under Tools & Maintenance and check if all the files are ok? I'm looking at the code and it should not be whats showing up there.
Hi thanks for the quick answer Smile

I checked the files but everything is ok. I dont know where the second error code comes from i dont understand.

Hope youll find a answer for this. Thanks!
Like I said that query is not how it is in the code, if your files show all ok then we need to look at your plugins. What plugins do you have installed?

One more thing you could try, although the file verification said its all ok, could you still re-upload a new forumdisplay.php file from a fresh download of the MyBB package, overwriting the old one.
The problem is index.php, not forumdisplay.php. Wink
(2011-05-10, 09:44 AM)StefanT Wrote: [ -> ]The problem is index.php, not forumdisplay.php. Wink

We're talking about the second error he's getting. That query is in forumdisplay.php, not index.php
But the index.php is showing the white page, while the forumdisplay.php seams fine to me.
I'm asking him to reupload forumdisplay.php due to the second sql error that he is getting in his logs, the query for which is in forumdisplay.php. The query being logged has parts missing that should be in the query as can be checked in forumdisplay.php hence my reason for asking him to upload forumdisplay.php.

I missed the white pages part in the OP having concentrated on the SQL errors, in which case yes you can try re-uploading the index.php file as well.

Hi i have reuploaded both files but nothing has changed im still getting the same error codes.

Plugin list:

Max Post Views Guest (1.0)
SignHeightLimit (1.0)
Admin Notes (1.0)
Advanced Quick Reply Form (1.0)
Ajax PM Notification (1.8.1)
Akismet (1.2.1)
Auto Media (1.1.9)
Automatic Website Removal (1.0)
Banning Trash-Email Adresses (1.0)
Spider Bots (1.1)
Courtesy Edit Time (0.1)
Default Avatar (1.0)
Favicon in address bar (1.0.1)
Fit on Page (2.3)
Google Analytics (1.5)
HP / MP / EXP Statistics (1.0.0)
IM Icons on Postbit (1.0)
Its My Birthday! (2.2)
Last Visitors in Profile (1.1)
Master Meta Tags (1.0)
My Advertisements (1.9.2)
NewPost Marker (1.01)
ProStats (1.8)
Random Thread (1.0 Stable)
reCAPTCHA Plugin (1.1)
Reputation Bars (0.1)
RSS To Post (1.2.2)
SEO Links! (1.1 Beta 1)
Enhanced Signature Sep (1.0)
Spoiler BBCode (1.6)
Thank You/Like System (1.3.1)
ThemePeek (1.0.1)
Thread Tooltip Preview (1.32)
Twitter New Thread (1.2)
User Online (1.0)
Welcome PM/Email (1.1)
WinPulse Scanner (1.0)
MyBB WYSIWYG (1.0.2)

So thats it i hope this will help you. I dont know what to do so i need your help.
Hi its very urgent! I need your help!!!