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
The error appears when a forum is empty, having no topics inside. That's strange...
That should not matter at all. The error seems like your database connection is closing prematurely.
Jeff
thank you, do you have any suggestion about how I could attempt to solve this?
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
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.
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
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?
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
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.
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
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
was on maximum, changing it to one of the other options makes no difference, though.
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
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.
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!
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
Hi,
sorry but I'm at work now. I will have a look at it when I'm at home.
Kind regards,
Robbie
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!
Hi Mad_Griffith,
I'm not able to reproduce the error... But... I think I know where the problem is.
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
Great news.
It seems that newer versions of MySQL don't like statements like p.id = '' on integer fields. The value must be p.id = 0.