Topic: Problem when posting longer code sample

Hi,

I have a problem - when I am posting a longer code sample within a code block (for instance, some HTML code about 2.78KB) and I hit the "Preview" button my copy of PunBB hags forever on the current page and visually does nothing. But if I visit the topic that I tried to post to in a minute I can see that the reply I tried to post has been posted numerous times with the code sample truncated at some position ending with "%3" although I didn't even manage to hit the "Submit" button as PunBB hanged when I hit the "Preview" button.

So I was wondering is there some kind of size limit that I could tweak or something like this? hmm

As far as I can see, the problem is not present on this forum when I try to post the same code sample.

Thanks for any help!

PS: I run the latest version 1.2.14.

Re: Problem when posting longer code sample

That's odd: if you're hitting up against the maximum size, you would get an error (and 2.78KB isn't that big in terms of size). And if you only hit Preview, it doesn't submit.
Have you modified post.php?

Re: Problem when posting longer code sample

Nope, I haven't modified post.php, as far as I remember.

I created a test forum where guests are allowed to post:

http://www.smartmenus.org/forum/viewforum.php?id=7

You can try posting the following code sample:

http://www.smartmenus.org/down/misc/pem … ucture.txt

to see what happens.

I noted, however, that when guests are trying to post such longer code samples and hit "Preview" it doesn't get posted after waiting awhile. But still PunBB seems to hang.

I wonder, could this be caused by some configuration on my hosting server. hmm

Re: Problem when posting longer code sample

Still no ideas? :?

Re: Problem when posting longer code sample

I have a basic idea yes. What's the max POST size set in php.ini? As it seems to cut of a portion of the post within the code tags, and thus making it give this error:

The following errors need to be corrected before the message can be posted:
    * The BBCode syntax in the message is incorrect. Missing end tag for [ code].

wink What is in the returned post is this:
http://elbekko.pastebin.ca/315310

6 (edited by smartmenus 2007-01-13 17:43)

Re: Problem when posting longer code sample

Thanks for your tip!

Hmm, let me check this...

EDIT:
---
post_max_size = 8M
---

So you suppose this problem is not related to PunBB itself? If that's the case, then it's better to talk to my hosting provider.. What do you think?

7

Re: Problem when posting longer code sample

What happens if you replace the modified version of post.php with a bog standard one. Do you still get the problem? Do you get the problem with the quick post form?

Re: Problem when posting longer code sample

Paul wrote:

What happens if you replace the modified version of post.php with a bog standard one. Do you still get the problem? Do you get the problem with the quick post form?

Just, checked it - the same thing happens with the original version of "post.php" from the PunBB v1.2.14 package. Yes, I now remember that I altered a bit the original version and added the smileys mod but now I checked it with the original version and there's no difference. hmm

I also tried with quick post and still the same behaviour.

I now noticed something even stranger. For instance, I click Preview or Submit and the browser hangs and I wait for about 30 seconds and then I close the browser window. I load the thread again immediately after that in a new browser window and the post I was trying to make is not there. But if I load the page again in say 2 minutes, the post is there (truncated). Sometimes it's even posted a few times even though I didn't even click Preview or Submit more than once. Phew, that's really weird..

9

Re: Problem when posting longer code sample

I just tested on your test board. Very weird. Its not the code tag either. I just posted the test markup as normal text and the same problem. Take out a couple of line and it previews fine except preview also submits it.

I also tried it with a long item of lorem ipsum text and the same problem happens so it seems to be long posts in general.

I can't see how this problem could be related to PunBB. If it was I'm pretty sure somebody else would have experienced it by now.

Re: Problem when posting longer code sample

Paul wrote:

I just tested on your test board. Very weird. Its not the code tag either. I just posted the test markup as normal text and the same problem. Take out a couple of line and it previews fine except preview also submits it.

I also tried it with a long item of lorem ipsum text and the same problem happens so it seems to be long posts in general.

I can't see how this problem could be related to PunBB. If it was I'm pretty sure somebody else would have experienced it by now.

Thank you very much for investigating the issue on your own! I appreciate your time and help!

I will contact my hosting provider as it seems there is something wrong with the server configuration.

Thanks everyone for your help! smile

11

Re: Problem when posting longer code sample

I have a similar problem with my punbb and long posts. If you edit a post that is longer than 2 or 3 "pages" the forum hangs, and also hangs apache in my case.
To unlock it I have to remove sqlite's DB -journal file and restart apache...

I run .14 on debian sarge..

12

Re: Problem when posting longer code sample

It seems the hang is due to sqlite 2 on debian sarge in my case. I just converted to mysql and I can edit long posts again...