1

Topic: Unable to update topic error

Hi,

i'm having these error 'Unable to update topic' message when opening two particular topic only. No error message when opening other topics.

here's the error when debug mode is enabled

An error was encountered
File: /home/xxxx/public_html/viewtopic.php
Line: 905

PunBB reported: Unable to update topic

Database reported: MySQL server has gone away (Errno: 2006)

here's the line 905 part of view topic

 
// Increment "num_views" for topic

line 903 - $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
line 904 -
line 905 - $db->query('UPDATE '.$low_prio.$db->prefix.'topics SET num_views=num_views+1 WHERE id='.$id) or error('Unable to update topic', __FILE__, __LINE__, $db->error());
line 906 -
line 907 - $forum_id = $cur_topic['forum_id'];

Re: Unable to update topic error

That's likely a problem with your host, as a workaround try replacing line 903 with

$low_prio = '';

3

Re: Unable to update topic error

hi Smartys,

I got the same error message... What do you this is the problem? this error happens only to the two topics of my forum , the rest is working fine.

thanks

Re: Unable to update topic error

Talk to your host, "MySQL server has gone away" errors are their issue.

5

Re: Unable to update topic error

Its something to do with mysql config?  I've open a ticket to my host and I'll update this tread once I've got reply from them.

Thanks for your help.