YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
Internal Server Error - Rebuild Message Index (Read 1,224 times)
 Apr 6th, 2013 at 8:18am
There are no actions to perform.  

Martin.W 
Full Member
***
Offline
Posts: 245
UK


None
Internal Server Error - Rebuild Message Index
I had a corrupt file, and deleted the thread.txt file, and ammended the board.txt file to reflect this, and the forum now works fine.

BUT.

When I try to rebuild the message index or recount board totals in the admin center, they both result in an internal server error very quickly (seconds), the log file on the server showing premature end of script headers.

Whats the best way to try to locate this issue?

Thanks.
 
 
IP Logged  
 Reply #1 - Apr 6th, 2013 at 9:41am
There are no actions to perform.  

Martin.W 
Full Member
***
Offline
Posts: 245
UK


None
Re: Internal Server Error - Rebuild Message Index
I should say, it's a YaBB2.3 forum with 147732 posts in 17436 topics!
 
 
IP Logged  
 Reply #2 - Apr 6th, 2013 at 7:53pm
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,860
Earth


YaBB 2.5
Re: Internal Server Error - Rebuild Message Index
My bet is there is still a problem with a corrupted file or possibly an issue with the edited board file.
 
WWW  
IP Logged  
 Reply #3 - Apr 7th, 2013 at 6:53am
There are no actions to perform.  

Martin.W 
Full Member
***
Offline
Posts: 245
UK


None
Re: Internal Server Error - Rebuild Message Index
I thought this too, but I had a play with the sub routine that does the board recount.

When it initially reads the messages dir and puts all the .txt files into an array @topiclist, i then created a for loop, setting the start as 0, the end as 10000, and put the results of this into the @topiclist array, (making it smaller if that makes sence).  The boards would then recount just fine.  I then put the count to start at 10000 and end at 18000 (all my topics), and ran it again, and again it completes just fine.  Put the start and finish as 0 and 18000 and it fails  Sad

I have not looked at the message recount sub routines, as that it much more involved.  It seems odd it will work in two seperate chunks, but not as one?  Although as both board and message rebuild wont work, it does seem to point to a corrupt file.
 
 
IP Logged  
 Reply #4 - Apr 7th, 2013 at 8:12am
There are no actions to perform.  

Martin.W 
Full Member
***
Offline
Posts: 245
UK


None
Re: Internal Server Error - Rebuild Message Index
I have had another play, and oddly, this morning, without doing anything, it worked for the board recount, but wouldn't for the message rebuild.

The board recount then wont run a second time!

I have then edited the two routines, and added $max_process_time = 3; to force the step time to 3 seconds and not 20 seconds.  Both now run fine.  Beginning to wonder if my hosting company are a tad dodgy?

Will have a look in the admin settings and see if the $max_process_time is a variable that can be set?  Rather than hard coding it to 3s in the script...
 
 
IP Logged  
 Reply #5 - Apr 7th, 2013 at 9:37am
There are no actions to perform.  

Martin.W 
Full Member
***
Offline
Posts: 245
UK


None
Re: Internal Server Error - Rebuild Message Index
On a slightly different note.

I think perhaps this is a known bug, so will have a search for this in the forum, but the message index rebuild works, but drops the username from moved thread banner (The contents of this Topic have been moved to this Topic by...).  The username at the end of this line vanishes.
 
 
IP Logged  
 Reply #6 - Apr 7th, 2013 at 6:08pm
There are no actions to perform.  

Martin.W 
Full Member
***
Offline
Posts: 245
UK


None
Re: Internal Server Error - Rebuild Message Index
Found an error in MoveSplitSplice.pl, I guess this is likely documented somewhere?

my $hidename = &cloak($username) if $do_scramble_id;

The above line will only fill $hidename if you are using the encrypt username option under security settings, so if you don't encrypt the username, it is never put into the message or subject in the retained .txt file when a post/thread is moved, this doesn't become apparent until you rebuild the message index.

I have altered the line(s) to this for now on my forum:

$hidename = $username;            

Although, I guess this would be the way it should be?

my $hidename;
if ($do_scramble_id){
 $hidename = &cloak($username);
}else{
 $hidename = $username;
}
 
 
IP Logged  
 Reply #7 - Apr 7th, 2013 at 6:57pm
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,860
Earth


YaBB 2.5
Re: Internal Server Error - Rebuild Message Index
What you have should solve the problem in 2.3. In 2.4 and above, that bit of code was rewritten and doesn't reference '$do_scramble_id' at all.
 
WWW  
IP Logged  
 Reply #8 - Apr 7th, 2013 at 7:01pm
There are no actions to perform.  

Martin.W 
Full Member
***
Offline
Posts: 245
UK


None
Re: Internal Server Error - Rebuild Message Index
I literally just looked through a 2.4 download, and noticed that - I was coming back here to edit my post!

It scrambles the username and de-scrables it regardless of if you have the encrypt username option enabled, as it makes no odds either way, as only stored in a file.

Will copy the 2.4 way, editing the MoveSplitSplice.pl and Subs.pl accordingly.

Thanks.
 
 
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.