Advertisement:

Author Topic: Forum throwing errors  (Read 5906 times)

Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Forum throwing errors
« on: May 28, 2013, 04:19:24 AM »
Hi,
Our forum moved from a host to another host. It has now been on line for a pair of days, a glitch with encoding was fixed, all went well so far. We had some sluggishness, but the host has fixed it on the server side.

This morning while hitting the button "answer", in order to answer to a post I get this error message:
Quote
Data bases error:
MySQL server has gone away
Fichier: /home/orditux/public_html/linuxvillage.net/Sources/Post.php
Lign: 149
Note : It is possible that your database needs an update. Actually, the version of the files of the forum is SMF 2.0.4,
whereas your databases in in version SMF 2.0.3. The above error could be corrected by executing the last upgrade.php version.

Here is the file Post.php:
http://pastebin.fr/27543

lign 149 and above:
Code: [Select]
    // Check if it's locked.  It isn't locked if no topic is specified.
    if (!empty($topic))
    {
        $request = $smcFunc['db_query']('', '
            SELECT
                t.locked, IFNULL(ln.id_topic, 0) AS notify, t.is_sticky, t.id_poll, t.id_last_msg, mf.id_member,
                t.id_first_msg, mf.subject,
                CASE WHEN ml.poster_time > ml.modified_time THEN ml.poster_time ELSE ml.modified_time END AS last_post_time
            FROM {db_prefix}topics AS t
                LEFT JOIN {db_prefix}log_notify AS ln ON (ln.id_topic = t.id_topic AND ln.id_member = {int:current_member})
                LEFT JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
                LEFT JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)
            WHERE t.id_topic = {int:current_topic}
            LIMIT 1',
            array(
                'current_member' => $user_info['id'],
                'current_topic' => $topic,
            )
        );

How can I fix it?

Thanks,
Mélodie


Offline Storman™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,027
Re: Forum throwing errors
« Reply #1 on: May 28, 2013, 06:34:10 AM »
Could you attach your Post.php file here, the one linked in your post above is incomplete, about a third of it is missing.

Not sure if thats the problem (might be a cut and paste error) but it would be good to check.
Any Backup method is bettter than no Backup method....

Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #2 on: May 28, 2013, 06:56:24 AM »
Hi,

Here is the file attached.

Thank you


kat

  • Guest
Re: Forum throwing errors
« Reply #3 on: May 28, 2013, 07:15:36 AM »
You can safely ignore the "Database upgrade" message, Mel...

It's what Microsoft call "A feature". ;)


Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #4 on: May 28, 2013, 07:23:47 AM »
You can safely ignore the "Database upgrade" message, Mel...

It's what Microsoft call "A feature". ;)

Therefore it's a bug. ;)

What can cause this message whose effects look like a timeout? The members say it's slow : from the US, and the forum is hosted in France. I am in France and at times I find it also a bit slow. I have seen half a dozen guests trying to register or to connect last time: all from China (I think we have the good plugins to prevent spambots registering). Could the problem come from there? Any other idea related to databases?




kat

  • Guest
Re: Forum throwing errors
« Reply #5 on: May 28, 2013, 07:46:17 AM »
Not a bug, really. Just a little something that someone forgot to change, really. People are people, after all. ;)

"Slow" is always difficult to figure-out. Often, it's down to the host being oversellers and that kinda thing. If a host offers "Unlimited" anything, it's a bit of a giveaway. "Unlimted" doesn't exist!

Who is your host, now?

Just a quickie, though. Have a look in Admin>Server settings>Caching.

Is that being used? Level one's usually OK, there. If you get any warnings, there, don't use it.

Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #6 on: May 28, 2013, 12:52:40 PM »
Yes, it is exactly the setting which is on, and there is no warning. So I suppose it's good. Yes, the host has some not limited things, such as bandwidth uses and space, but before moving the forum there I have asked if my contract allowed me to add the forum to my own account, and I was told it's not a problem on their side but might slow down my own website. So I have been warned. On the other hand for the time being it is the best solution I have, considering I know the host, and the quality of service and support+availability which is very good.

Thanks for all your answers,
Mélodie


kat

  • Guest
Re: Forum throwing errors
« Reply #7 on: May 28, 2013, 02:44:11 PM »
As you've just moved, the cache'll need to refill, if you know what I mean.

Maybe, after a while, things'll speed up. If not, there's precious little more that you can do, really, that won't involve throwing cash at your host.

Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #8 on: May 28, 2013, 03:02:37 PM »
As you've just moved, the cache'll need to refill, if you know what I mean.

Ok.

Quote
If not, there's precious little more that you can do

Translation please? :)

Quote
that won't involve throwing cash at your host.

The cash was already spent for my own website. The forum is not that slow now, but it is attacked by a hurd of spammers who try to register. I realized I had to remove and reinstall the MOD's. I reinstalled KeyCaptcha and StopForumSpam, because when I moved I chose to first install a brand new forum, so the php files used by these MOD's had not been modified : at least this is what it seems to me, because before I do this they were not activated and I didn't find any mean to activate them, and after reinstalling they were activated.

I have to remember or try now how to setup the registering options so that KeyCaptcha works because I have not succeeded in having it display while registering with a test user yet.

I am using Midori for the configuration and tests, it's way faster than Firefox!

kat

  • Guest
Re: Forum throwing errors
« Reply #9 on: May 28, 2013, 03:17:16 PM »
"If not, there's precious little more that you can do" = "If that doesn't change anything, there's not a lot more that can be done". Something like "Sinon, il n'y a rien de plus précieux que vous pouvez faire"?

I tried Midori, a little while ago. I found Opera to be even faster. :)

Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #10 on: May 28, 2013, 03:33:46 PM »
"If not, there's precious little more that you can do" = "If that doesn't change anything, there's not a lot more that can be done". Something like "Sinon, il n'y a rien de plus précieux que vous pouvez faire"?

I was not sure at all. In French we would not refer to the Lord of Rings in such case. :)

"Sinon, il n'y a rien de mieux que vous puissiez faire" - or "rien de plus"/nothing more…
Quote
I tried Midori, a little while ago. I found Opera to be even faster. :)

Did you benchmark it with "time" ?

Anyhow for the time being Midori does the job alright, and I master it's configuration, whereas I'm a bit lost in the options in Opera.

Thank you for your support and discussion.



kat

  • Guest
Re: Forum throwing errors
« Reply #11 on: May 28, 2013, 03:46:59 PM »
That's just a normal English phrase. We used it long before LOTR was even written. :)

I can understand why someone who's not English would read it and think it was odd, though.

I've spent a lot of time, in France. Loved every minute of it, too. :)

Dijon, Lyon, Paris, of course, Beune, Presqu'île de Giens, Rhiems... all over the place, really.

Unfortunately, my French is a bit rusty, now. :(

Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #12 on: May 28, 2013, 04:04:03 PM »
Unfortunately, my French is a bit rusty, now. :(

The forums and IRC channels have helped me improve my English a lot. Our forum is in both languages, as well as our channel. If it is of any interest to you…



kat

  • Guest
Re: Forum throwing errors
« Reply #13 on: May 28, 2013, 04:15:25 PM »
Having had a look around, that looks like a very well run site, to me!

If I get time, I might well come and join you, if my health allows. :)


Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #14 on: May 28, 2013, 04:34:13 PM »
Having had a look around, that looks like a very well run site, to me!

Thank you! And we are fighting spam too.   :P

Quote
If I get time, I might well come and join you, if my health allows. :)

You could also visit us on the chan although less members stay at it currently. It's logged here.

Quote

Nice smiley! :D


kat

  • Guest
Re: Forum throwing errors
« Reply #15 on: May 28, 2013, 05:04:58 PM »
I have a site full of them.

If you want to take any, or use them, feel free!

http://www.katzy.dsl.pipex.com

And we are fighting spam too.


Offline YogiBear

  • SMF Hero
  • ******
  • Posts: 1,936
Re: Forum throwing errors
« Reply #16 on: May 29, 2013, 05:52:32 PM »
Hé, meylodie, vous dirigez un forum très intéressant-là. J'ai envie de m'y inscrire aussi. Hihi, quant au Linux, K@ et moi, nous pouvons vous posez des questions en français...  ;D
SMF v2.0.15  Mods : Ohara YouTube Embed v1.2.9,  Custom Tab v1.2 , Bakers' Dozen Pages v1.2 , SMFPacks Shoutbox v1.1,  Board Color & Icons v1.1 , Simple Image Upload , Snow & Garland v1.4

kat

  • Guest
Re: Forum throwing errors
« Reply #17 on: May 30, 2013, 04:54:10 AM »
Poseur...  ;)

Offline meylodie

  • Semi-Newbie
  • *
  • Posts: 59
Re: Forum throwing errors
« Reply #18 on: June 05, 2013, 07:54:25 AM »
Hé, meylodie, vous dirigez un forum très intéressant-là. J'ai envie de m'y inscrire aussi. Hihi, quant au Linux, K@ et moi, nous pouvons vous posez des questions en français...  ;D

Posez, posez ! Nous attendons les questions ! :)

Aren't you also at the unity-linux community?


MrPhil

  • Guest
Re: Forum throwing errors
« Reply #19 on: June 05, 2013, 09:26:01 AM »
The forums and IRC channels have helped me improve my English a lot.

Actually, it can be quite hazardous to learn (or improve) your English online. You need to be careful not to pick up habits of bad spelling and grammar. Even if some construct is quite common online, that doesn't make it correct (i.e., you need formal instruction, and reference materials at hand). Americans, due to our poor educational system, tend to be the worst of all, often even worse than ESL people (who at least, have an excuse for making mistakes). So, be careful when learning (or polishing) your English from what is written online!