consistency help please. [message #31666] |
Thu, 11 May 2006 09:13 |
|
andy_scouser
Messages: 76 Registered: June 2003
Karma: 1
|
Member |
|
|
I have a problem with my forum and haven't a clue how to progress it, im running version 2.7.3 with mysql version 4.0.13-max. Basically, indexing searches seemed to fail a few weeks ago.
I ran a consistency check, and then ran a search index rebuild. At which point i recieved the output below (this is just a snippet of it). This may have started a few weeks ago when I had a power supply failure on the server and had to use another machine, swapping just the drives.
Disabling the forum for the duration of maintenance run
Please wait while index is being rebuilt.
This may take a while depending on the size of your forum.
Warning: fopen(): Unable to access /forum/httpd/FUDforum/messages/msg_-490000 in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 20
Warning: fopen(/forum/httpd/FUDforum/messages/msg_-490000): failed to open stream: No such file or directory in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 20
Warning: fseek(): supplied argument is not a valid stream resource in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 23
Warning: fread(): supplied argument is not a valid stream resource in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 24
Warning: fopen(): Unable to access /forum/httpd/FUDforum/messages/msg_-260000 in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 20
Warning: fopen(/forum/httpd/FUDforum/messages/msg_-260000): failed to open stream: No such file or directory in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 20
Warning: fseek(): supplied argument is not a valid stream resource in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 23
Warning: fread(): supplied argument is not a valid stream resource in /forum/httpd/FUDforum/include/theme/default/fileio.inc on line 24
Now some messages are giving the following
Some threads have the message number intact but no message content and i get the following output at the top of the thread
Warning: fopen(): Unable to access /forum/httpd/FUDforum/messages/msg_-350000 in /forum/httpd/htdocs/theme/honda/msg.php on line 532
Warning: fopen(/forum/httpd/FUDforum/messages/msg_-350000): failed to open stream: No such file or directory in /forum/httpd/htdocs/theme/honda/msg.php on line 532
Warning: fseek(): supplied argument is not a valid stream resource in /forum/httpd/htdocs/theme/honda/msg.php on line 535
I dropped the database and fixed all the table, but no change, any help would be massively appreciated.
[Updated on: Thu, 11 May 2006 09:17] Report message to a moderator
|
|
|
Re: consistency help please. [message #31683 is a reply to message #31666] |
Thu, 11 May 2006 21:21 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The problem is that the file_id appears to have negative value, rather then a positive one. But in the new version there is a specific check to prevent that from being an issue m.file_id>0 check your forum install's compact.php to see if this limiter is there.
FUDforum Core Developer
|
|
|
Re: consistency help please. [message #31688 is a reply to message #31683] |
Thu, 11 May 2006 23:18 |
|
andy_scouser
Messages: 76 Registered: June 2003
Karma: 1
|
Member |
|
|
Yes it does...sorry im not a coder.
$pc = ceil(q_singleval('SELECT count(*) FROM '.$tbl.'msg WHERE file_id>0') / 10);
Should i change this to
$pc = ceil(q_singleval('SELECT count(*) FROM '.$tbl.'msg') / 10);
$c = q('SELECT m.id, m.foff, m.length, m.file_id, f.message_threshold, f.id FROM '.$tbl.'msg m INNER JOIN '.
$tbl.'thread t ON m.thread_id=t.id INNER JOIN '.$tbl.'forum f ON t.forum_id=f.id WHERE m.file_id>0 LIMIT 100');
and change this to
$c = q('SELECT m.id, m.foff, m.length, m.file_id, f.message_threshold, f.id FROM '.$tbl.'msg m INNER JOIN '.
$tbl.'thread t ON m.thread_id=t.id INNER JOIN '.$tbl.'forum f ON t.forum_id=f.id LIMIT 100');
No giggling thanks for the reply too!
[Updated on: Thu, 11 May 2006 23:23] Report message to a moderator
|
|
|
Re: consistency help please. [message #31709 is a reply to message #31688] |
Sun, 14 May 2006 15:02 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
No, the current code is correct, it only fetches messages where file_id is greater then zero. The problem appears to be that despire the limiter that says that file_id must be greater then zero, it still picks those up.
Could you add the following bit of code above the line which says:
New Code:
<?php var_dump($r[1], $r[2], $r[3]); ?>
Line:
<?php $m1 = write_body_c(read_msg_body($r[1], $r[2], $r[3]), $len, $off, $r[5]); ?>
FUDforum Core Developer
|
|
|
|