Page Index Toggle Pages: 1
Topic Tools
Normal Topic Internal Server Error - Rebuild Message Index (Read 1,424 times)
Martin.W
Full Member
***
Offline



Posts: 245
Location: UK
Re: Internal Server Error - Rebuild Message Index
Reply #8 - Apr 7th, 2013 at 7:01pm
Post Tools
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.
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,126
Location: Earth

YaBB 2.6.0
Re: Internal Server Error - Rebuild Message Index
Reply #7 - Apr 7th, 2013 at 6:57pm
Post Tools
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.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Martin.W
Full Member
***
Offline



Posts: 245
Location: UK
Re: Internal Server Error - Rebuild Message Index
Reply #6 - Apr 7th, 2013 at 6:08pm
Post Tools
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;
}
  
Back to top
 
IP Logged
 
Martin.W
Full Member
***
Offline



Posts: 245
Location: UK
Re: Internal Server Error - Rebuild Message Index
Reply #5 - Apr 7th, 2013 at 9:37am
Post Tools
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.
  
Back to top
 
IP Logged
 
Martin.W
Full Member
***
Offline



Posts: 245
Location: UK
Re: Internal Server Error - Rebuild Message Index
Reply #4 - Apr 7th, 2013 at 8:12am
Post Tools
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...
  
Back to top
 
IP Logged
 
Martin.W
Full Member
***
Offline



Posts: 245
Location: UK
Re: Internal Server Error - Rebuild Message Index
Reply #3 - Apr 7th, 2013 at 6:53am
Post Tools
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.
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,126
Location: Earth

YaBB 2.6.0
Re: Internal Server Error - Rebuild Message Index
Reply #2 - Apr 6th, 2013 at 7:53pm
Post Tools
My bet is there is still a problem with a corrupted file or possibly an issue with the edited board file.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Martin.W
Full Member
***
Offline



Posts: 245
Location: UK
Re: Internal Server Error - Rebuild Message Index
Reply #1 - Apr 6th, 2013 at 9:41am
Post Tools
I should say, it's a YaBB2.3 forum with 147732 posts in 17436 topics!
  
Back to top
 
IP Logged
 
Martin.W
Full Member
***
Offline



Posts: 245
Location: UK
Internal Server Error - Rebuild Message Index
Apr 6th, 2013 at 8:18am
Post Tools
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.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top