[BUG] Possible Database Error!

Started by nitins60, February 28, 2007, 06:20:27 PM

Previous topic - Next topic

SlammedDime

Quote from: Rudolf on July 15, 2007, 08:57:15 AM
Can you give exact, step by step instructions on how to reproduce the error? Can you give us a forum where performing these steps will result in the error?

The only way I can reproduce it is by forging a wrong url. Members using the forum should never ever get this error.

The only bug here is that the $topic variable is not checked if it exists before being used. I posted above the fix for it. If you don't apply it you will never know if it works or no.
Give exact instructions or stop forging fake urls.
I can't reproduce this anymore in 1.1.3.  In 1.1.2, when quick moderation was enabled on the messageindex, if you clicked the remove icon, then clicked it again, the error was shown.  I cant reproduce this anymore however.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

snape456

I have same problem. I've just upragded from version 1.1.1. to 1.1.3 and the problem remains. It is very easy to reproduce.

Just pickup any existing post and modify it by adding the following code:

[URL=http://img528.imageshack.us/my.php?image=mana5.jpg][IMG]http://img528.imageshack.us/img528/6906/mana5.th.jpg[/IMG][/URL]
[URL=http://img528.imageshack.us/my.php?image=mana3.jpg][IMG]http://img528.imageshack.us/img528/1670/mana3.th.jpg[/IMG][/URL]
[URL=http://img528.imageshack.us/my.php?image=mana4.jpg][IMG]http://img528.imageshack.us/img528/54/mana4.th.jpg[/IMG][/URL]
[URL=http://img528.imageshack.us/my.php?image=mana2.jpg][IMG]http://img528.imageshack.us/img528/5787/mana2.th.jpg[/IMG][/URL]
[URL=http://img528.imageshack.us/my.php?image=mana6.jpg][IMG]http://img528.imageshack.us/img528/9195/mana6.th.jpg[/IMG][/URL]
[URL=http://img528.imageshack.us/my.php?image=mana1.jpg][IMG]http://img528.imageshack.us/img528/210/mana1.th.jpg[/IMG][/URL]


You will get this error:

Error in database: MySQL server has gone away
File: /xxx ...  /smf/Sources/Post.php
Line: 1423

SleePy

snape456,

Using Apache, 2.0.59, php 5.2.3, and mysql 5.0.41 I have no issues with this.
I used one of my test forums and edited the first message (the welcome message) and it did it just fine.

This is usually contributed to poor/bad setup of the server.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

karlbenson

Snape456, I also have no problem with adding/editing/modifiying what you put (i tried it many times over) on both 1.1.2 and 1.1.3.

No errors in my logs or visible errors.

nitins60

I told in first post itself, it's very very Hard to reproduce it. I have got no idea why it's happening only very few times!

But this is not because of servers, because i shifted to new server 2 weeks back, got once same error n my log produced by some other user who don't have moderation option.

But don't blame users. It's SMF bug, but only developers can find what's tweak in it! One more time, it's hard to reproduce it.

@kalberson, can you try what i said in first post to reproduce?

karlbenson

@nitins60
If I modify the urls, then I can get that error in 1.1.2, but not in 1.1.3

I've read this topic fully, and I've yet to see a situation in which these urls are automatically produced.

But I do agree that anything that is in the 'url' should be continually checked.  These sorts of ways in can be used by people seeking to mysql injection.  Although sesc is probably checked its clean, just not if its empty ;)

snape456

Quote from: SleePy on July 28, 2007, 11:28:37 PM
Using Apache, 2.0.59, php 5.2.3, and mysql 5.0.41 I have no issues with this.
...
This is usually contributed to poor/bad setup of the server.

You might be right. I've tested this on my local server with last Apache and mysql and had no problem. But on the machine where the forum is actually running I still have a problem. They are running older php 4.4.6 and Apache 1.3. Unfortunately there is nothing I can do to change it. This is a hosting server and I have no power to force admin to upgrade. :-(

SleePy

Can you get specifics of what is installed? I never had good luck with compiling 1.3 on my machine but I can attempt to do it or just use the php/mysql versions you are.

Edit though my live site is running Apache 1.3.37.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

nitins60

This bug is still existing in v1.1.4 don't know what developers are lookin at

SlammedDime

Your first post says you got this error when trying to edit an old post:
QuoteUnfortunatly, when i am trying to edit an old post, got this error! I can reproduce this error!

A later post then says you were able to reproduce it on a clean install, so it can't be an old post and you added that you deleted the message from the recycle bin.
QuoteYes, now once again i got this error. I am trying to delete a post from recycle bin. Due to stupid internet connection, i had to click two times. When i clicked second time, got this error

Then you said it was from trying to delete an already deleted post (double clicking a 'delete' link before the page finishes loading I assume, like from a slow 'net connection)
QuoteI figured out that it's happening with mismatched posts (posts which are deleted, trying to delete them again)

Then you said the first post was correct too
QuoteYes 1st post also correct one, the same error is reported by another user also long time back! So i can confirm it's SMF problem/bug/anything. But developers are not replying!

So what is it?  A delete error?  An edit error?  New posts?  Old posts?  Both?  These are two seperate functions in the SMF Source files, which would indicate that there are two different bugs present, yet the thousands of other SMF users who edit and delete posts on a daily basis do not run into this error or problem.

I will say once again what Rudolf has already posted.  Post EXACT steps that you've used to reproduce this error continually on your system.  Exact means
Quote1) do this
2) Do this
3) do this
etc...
Include everything from installing SMF until it occurs.  Be SPECIFIC.  Then try it again to make sure you've got the steps down, then try it one more time to be sure its right, then post back here so we can verify it.  Until you do that, there is nothing that we or the devs can look at.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

nitins60

It's indeed hard to reproduce it. But you must observe that, all errors occured with QUICK MOD buttons. Sometimes in line edit is also gettin stucked and producing error in error log.

nitins60


SleePy

It is in the bug tracker. But the developers have not decided what to do.
Considering this is happening because of improper urls in the first place it isn't a high priority fix such as a security issue.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SlammedDime

SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

nitins60

There is no particular way to reproduce it. But it only happens with quick edit/mod buttons and due to missing sesc in url

SlammedDime

Ok, here are the steps to reproduce it, and while it isn't exactly 'easy', it would happen to someone on a slow connection.  I was not able to reproduce this on 1.1.4, only 1.1.3 and lower:

Create a board
Make sure you have no recycle board (or if you do, you must try the below *IN* the recycle board)
Create a topic in that board
Enable quick mod with icons
Go to board and *quickly* click the x to delete, hit the space bar, hit the x again, and hit the space bar again.

This causes a post that has already been deleted in some cases to try to be deleted again.  As I said, this doesn't happen in 1.1.4 any longer, no matter how many times I try.  An error is thrown in both in the error log, but nothing is visible to users regarding that error, and it is a very rare case anyway.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Rudolf

Quote from: SlammedDime on October 14, 2007, 10:13:57 AM
Go to board and *quickly* click the x to delete, hit the space bar, hit the x again, and hit the space bar again.

That's not a bug. It's a combo that admins can use as a finishing move when eliminating topics. :P
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

SlammedDime

Quote from: Rudolf on October 14, 2007, 02:16:54 PM
Quote from: SlammedDime on October 14, 2007, 10:13:57 AM
Go to board and *quickly* click the x to delete, hit the space bar, hit the x again, and hit the space bar again.

That's not a bug. It's a combo that admins can use as a finishing move when eliminating topics. :P
haha.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

nitins60

Yeah, this doesn't happen in v1.1.4 with quick mod buttons. But happens with quick edit button :(

SlammedDime

It would happen on any board with quick edit... its not really a bug, just a quirk of AJAX.  When you click the quick edit button, the Javascript kicks into action and starts editing the html entities on the page and preps them for the info received from XML.  If you click the quick edit button again before anything has loaded, you've interrupted the process but your HTML isn't the same as it was the first time because the Javascript has already kicked into action.  You'll just have to refresh the page and try again, or just know not to click it more than once.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: