Joo!BB - Making Community
Joo!BB - Joomla! Bulletin Board
Board Index
>
Support Forum
MySQL error in forumhome
Welcome, Guest

23 Replies

by Mad_Griffith on 09/27/2009 11:10
Post MySQL error in forumhome

Hello, I have this problem shown in the forumhome just after creating my first forums/category:

Code

No valid database connection 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.id' at line 6 SQL=SELECT p.id FROM jos_joobb_posts AS p INNER
JOIN jos_joobb_topics AS t ON t.id = p.id_topic INNER JOIN jos_joobb_forums AS f
ON f.id = t.id_forum WHERE p.id_topic = ORDER BY p.id


I don't know how to mess with my database... can you help please?

Thanks


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts

Last Edit on 09/29/2009 11:46


by Mad_Griffith on 09/27/2009 13:12
Post Re: MySQL error in forumhome

The error appears when a forum is empty, having no topics inside. That's strange...


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/27/2009 22:41
Post Re: MySQL error in forumhome

That should not matter at all. The error seems like your database connection is closing prematurely.

Jeff


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/27/2009 22:45
Post Re: MySQL error in forumhome

thank you, do you have any suggestion about how I could attempt to solve this? Smile


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/28/2009 00:41
Post Re: MySQL error in forumhome

Start by checking you mysql settings in the php of your server. www.yoursite.com/phpinfo.php5 if you have this page loaded in your server.

Then scan down to the mysql section and here is mine for reference.

mssql
MSSQL Support enabled
Active Persistent Links 0
Active Links 0
Library version FreeTDS

Directive Local Value Master Value
mssql.allow_persistent On On
mssql.batchsize 0 0
mssql.charset no value no value
mssql.compatability_mode Off Off
mssql.connect_timeout 5 5
mssql.datetimeconvert On On
mssql.max_links Unlimited Unlimited
mssql.max_persistent Unlimited Unlimited
mssql.max_procs Unlimited Unlimited
mssql.min_error_severity 10 10
mssql.min_message_severity 10 10
mssql.secure_connection Off Off
mssql.textlimit Server default Server default
mssql.textsize Server default Server default
mssql.timeout 60 60


Note mssql.allow_persistent is set to "on"
Note also mssql.timeout is set to "60"

If that is not your problem, then are you sure that you have the proper permissions set and user and password loaded for your database in your Joomla? I assume that you are as you got the application installed, but maybe a permission issue?

Jeff


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/28/2009 16:18
Post Re: MySQL error in forumhome

mysql.allow_persistent On On
mysql.connect_timeout 60 60

so that's not the problem.

when I check "folder permissions" in System Info (inside the Joomla Panel) everything appears as WRITABLE.


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/28/2009 16:22
Post Re: MySQL error in forumhome

I'm stumped then! Hopefully Robbie may shed some light on this. You are definitely running PHP Version 5.2.x or upper? What version of mysql are you running?

Jeff


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/28/2009 16:29
Post Re: MySQL error in forumhome

PHP Version 5.2.9-2
MySQL Version 5.0.51a

but:

mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value

is that normal?


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts

Last Edit on 09/28/2009 16:31


by Mad_Griffith on 09/28/2009 16:34
Post Re: MySQL error in forumhome

I updated my previous post.


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/28/2009 16:45
Post Re: MySQL error in forumhome

Yes, normal as the php program get those fed to it out of a file in your host when it needs to connect.

You can add forums no problem in the backend, you just can't add a topic in the frontend? You can sign into the frontend as a user?

Jeff


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/28/2009 16:52
Post Re: MySQL error in forumhome

I can do everything: add topics in the frontend, add forums/cats in the backend. And, as already said, one of those errors go away when I add a topic to the forum below it. In fact, those errors appear if forums are empty.
Unfortunately, they also appears in topics (just click on the first forum, then open the Jo!BB announcement: the error is above the first post) and in that case I haven't find a way to prevent errors from showing up there.


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/28/2009 17:01
Post Re: MySQL error in forumhome

Ok.. I'm getting it now, hang on for a few minutes. I've got to search, but I believe there is error reporting levels or settings as I've had them on before. It's reporting every little error, but you can choose to ignore them also I believe if everything is working but you are seeing some error messages at the top.

Jeff


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by jhetrick62 on 09/28/2009 17:05
Post Re: MySQL error in forumhome

Ok, for the heck of it, check in the joomla "global configuration", go to the server tab and check in the top left hand box, the "error reporting" is it set to system default, none, minimum or maximum?

Jeff


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/28/2009 17:14
Post Re: MySQL error in forumhome

was on maximum, changing it to one of the other options makes no difference, though.


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/28/2009 17:41
Post Re: MySQL error in forumhome

When you posted above to click on the announcement forum to view the error, did you mean here at joobb.org? If so, I don't get that error at all.

Jeff


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/28/2009 17:59
Post Re: MySQL error in forumhome

I meant the forum I linked you in the first post of this topic.


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/28/2009 18:12
Post Re: MySQL error in forumhome

I'm sorry. I see now. Do you have a temporary user or test user id that I could log in with? If so, send it to me at jeff.hetrick@gmail.com so that it isn't publicized.


jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/28/2009 23:16
Post Re: MySQL error in forumhome

Quote by jhetrick62:I'm sorry. I see now. Do you have a temporary user or test user id that I could log in with? If so, send it to me at jeff.hetrick@gmail.com so that it isn't publicized.

Hello, I just created a forum member with your email address. A mail activation should have come to you. Thanks a lot for you help, it is much appreciated!


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by jhetrick62 on 09/29/2009 01:04
Question Help with SQL error

A very nice website! Okay, I see where the error comes in now. It shows BEFORE the category when the category is empty and goes away when it has at least 1 post in it. Possibly Robbie can shed some light as the error seems to talk about not being able to order the mysql query by the proper field.

I tested my own live forum and added a blank category and did not replicate the error. I also wonder if having some but not all of the buttons changed into an alternate language would effect it, although I'm guessing not.

I have attached a screenshot for anyone who might be able to shed light on this. The error used to be infront of both of the last two categories but this shows only one as I added a test post to the last category.

Any help would be appreciated I'm sure,
Jeff


Attachments
jhetrick62 | Joined Board: 10/16/2008 03:04 | Last Visit: 09/03/2010 19:10
Joo!BB - Master
Moderator
Posts: 407
Offline Member is Offline
View all users posts


by Robbie on 09/29/2009 11:45
Post Re: MySQL error in forumhome

Hi,

sorry but I'm at work now. I will have a look at it when I'm at home.

Kind regards,
Robbie


Robbie | Joined Board: 12/14/2007 10:38 | Last Visit: 05/19/2012 08:29
Joo!BB - Master
Administrator
Posts: 785
Offline Member is Offline
View all users posts


by Mad_Griffith on 09/29/2009 11:48
Post Re: MySQL error in forumhome

Quote by Robbie:Hi,

sorry but I'm at work now. I will have a look at it when I'm at home.

Kind regards,
Robbie


thank you, your efforts are much appreciated!


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts


by Robbie on 09/29/2009 20:26
Post Re: MySQL error in forumhome

Hi Mad_Griffith,

I'm not able to reproduce the error... But... I think I know where the problem is. Smile

Please download the zip file and unzip it. Than copy the included file joobb.php to JOOMLA_ROOT/components/com_joobb/helpers/ overriding the existing file.

Please let me know if it works. Thank you.

Kind regards,
Robbie


Robbie | Joined Board: 12/14/2007 10:38 | Last Visit: 05/19/2012 08:29
Joo!BB - Master
Administrator
Posts: 785
Offline Member is Offline
View all users posts

Last Edit on 09/30/2009 07:52


by Mad_Griffith on 09/29/2009 22:57
Post Re: MySQL error in forumhome

Looks like it is working Smile

Thanks a lot... what was the problem?


Mad_Griffith | Joined Board: 09/27/2009 10:04 | Last Visit: 02/01/2010 20:30
Joo!BB - Newie
Registered
Posts: 20
Offline Member is Offline
View all users posts

Last Edit on 09/29/2009 23:07


by Robbie on 09/30/2009 07:42
Post Re: MySQL error in forumhome

Great news. Smile

It seems that newer versions of MySQL don't like statements like p.id = '' on integer fields. The value must be p.id = 0.


Robbie | Joined Board: 12/14/2007 10:38 | Last Visit: 05/19/2012 08:29
Joo!BB - Master
Administrator
Posts: 785
Offline Member is Offline
View all users posts


23 Replies

Joo!BB - Joomla! Bulletin Board

Copyright © 2007 - 2012 Joo!BB Project - All rights reserved.