This is by far my favorite mod for punBB.  Koos did a beautiful job writing it and it works perfectly for all my 1.2 installations without a single problem.

Note:  it is not for 1.3

Today I keep getting multiple instances where there are 3-4 copies of the same new topic.   When we go in to delete the duplicates we get:

"File: /home/acct/public_html/forum/viewtopic.php
Line: 204

PunBB reported: Unable to fetch post info

Database reported: 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' at line 1 (Errno: 1064)"

Anybody know:

1)  Why we're getting duplicate new topics
2)  Why I'm getting this error when I try to access / delete the new topic?
3)  What I should do?

Thanks so much in advance for any suggestion!


(18 replies, posted in PunBB 1.2 discussion)

I'll move once there is a good Poll Mod for 1.3!  wink

As always, Smarty's is right on the money with his assessment.   Seriously though, I'm between 3 and 4 too!

At the reccomendation of a master of everything PunBB views were not only removed from visibility but also from being tracked on my forum which is getting 3.75 million pageviews a month.  Really helped with keeping mem & cpu usage down.

Very good idea.   The only issue is if I want to change the settings back in the future I won't know who was set as what before I made the change.   I guess I could export the current settings and save them and then import them if I go back.

I've got members that I believe are spamming other members to join another forum using email.  I've got the private message mod loaded and I'd like to force communication through PM so I can prohibit (and track) people that are poaching my members using email.

Is there an EASY way to disable the ability for members to use the forum to send emails?

I guess one option is to edit the code to strip out the display of the email link under the user's name and in their profile.

Anybody else ever deal with member stealing / poaching?

Smartys pointed out one of the slow queries was from a viewtopic query from a thread with 4000 posts in it.  He suggested that I should really consider not allowing topics to grow to more than a few thousand posts.

Maybe I'll delete all the posts in the middle of that topic (I've got a few "games" that run long).  Is that a good idea, and if so, what's the best way to use PhpMyAdmin to execute a sql command to do so?

Ugh... growing pains!   If only revenue increase in proportion to pageviews!

Great idea.  I've followed the excellent instructions for logging slow queries here: … l-queries/

Hopefully a culpret or two will rear their ugly heads!

The 11 query page was a regular thread / topic page I think.  The 13 query was the index page.   The problem is there is no consistency between which pages are slow and when.

Smartys, thanks for the offer, I shot you a quick email.

In general I was hoping that by using punBB I could keep resource usage and costs low... that's why I stayed away from vBulletin.

MattF wrote:

Just out of curiosity, how long is it taking to complete the queries, on average? Less than a second, several seconds or above?

Great question!   One of my big questions is the fact that I can be navigating the same pages and sometimes I'll see a bunch of fast queries and some slow ones.  For example, just now here's what I got:

[ Generated in 0.098 seconds, 11 queries executed ]

[ Generated in 34.366 seconds, 11 queries executed ]

[ Generated in 1.900 seconds, 13 queries executed ]

Right now things are pretty fast, but when things are going bad every page is generated in over 30 seconds.

Bluddy mods!   (You mean modifications, not moderators, right?  wink )

The mods that I've got loaded and are touching the DB are:

? Mark Topics Read
? Private Messages

Other than that I've got a bunch of minor changes to the code for things like "recent posts" etc.

On average I'm pushing 60,000 pageviews a day and about 1,000 new posts a day with about 80 members and 100 guests logged on throughout the day.  My DB is about 200 mb

I've got debug mode on and the query counts look pretty average (6 - 14 queries per page).   I'm thinking I should have some kind of slow query log running to catch any queries that end up being slow.

Smartys, do you do contract work?  If so, please email me.

Thanks Jeremie!    I guess I should probably start with PunBB, the mods, and the DB to make sure all is well and then go from there?

Hey All,

My forum is growing and I'm pushing the limits on my server with my forum.  I'm not sure if something is wrong with my forum, the mods I've got installed, the DB, or anything else.

I need an expert in PHP, MySQL, PunBB and overall Server Administration (LAMP environment running WHM / cPanel on a Virtuosso environment) to come in and do a deep analysis, make recommendations, and do optimizations.

Anybody interested in an hourly job and / or have recommendations on companies that are experts at optimizations?

Please email me with info and rates.


Thanks Smartys, I keep daily backups in 3 locations, but when this happened it was 3 hours before my next backup was going to start... basically meaning that I'd loose a whole day's worth of posts (about 1,500) which would be bad news.

What causes this to happen?  Anything at all I can do to prevent it?

Okay, I found a bandaid:

I went into PhpMyAdmin and repaired the DB and it worked.   In the thread above the guy said it happened one last time and when he repaired it killed everything.   I TOTALLY don't need this to happen to me.

Any idea what caused it and how I can guarantee it doesn't happen again?

Thanks way in advance for any suggestions.

I also tried a DB dump and received:

mysqldump: Can't get CREATE TABLE for table `users` (Can't open file: 'users.MYI                                '. (errno: 145))

First, how do I fix this?

Second, what could have caused it??

I just got the following error from my main forum:

An error was encountered
File: /home/site/public_html/forum/include/functions.php
Line: 45

PunBB reported: Unable to fetch user information 

Database reported: Can't open file: 'users.MYI'. (errno: 145) (Errno: 1016)

Does anybody have any ideas???

Thanks for the reply.   

So, are you saying that in theory if I have:

20 concurrent users on a 50 mb punBB DB it should perform the same as
20 concurrent users on a 500 mb punbb DB?

I really hope you are right?   Anybody else want to throw in their two cents?

Here are the current stats on one of my forums:

Rows: 7041265
Size: 282.57 MB
with about 1,500,000 pageviews a month

My forum is growing very fast and I'm a bit worried about what will start happening once it gets really big.  What's your experience and/or knowledge is of what happens on a server as the DB gets bigger and bigger. I've got questions like:

1) Is resource usage linear? Meaning that as the punBB DB increases by 10% then will resource usage (cpu, memory, etc.) go up proportionately? Or, will I hit a point where resource usage will grow exponentially?

2) In either case, are the only solutions to either dump data in the DB (old posts) or to upgrade the server?

3) Any other thoughts / ideas for a non-pro as to what to prepare for and how to prepare?

In short, I don't want to wake up one day and notice I hit a magic HUGE DB BARRIER and my forum performance drops of a cliff.

Any other big punbb forum owners out there willing to share their experiences?

Thanks in advance for any guidance!

Error was "topic list cannot be found".

What's up with that?