Solved

Trouble with Matt's Message board

Posted on 1998-06-23
9
367 Views
Last Modified: 2013-12-25
I have set up, with the help of my ISP, the message board located at: http://www.spectech.com/mpulse/techsupp/msgboard/index.html
but as you can see if you go there, and post a message, it is duplicating the replies to every message on the board.  This is the final problem...please help!
0
Comment
Question by:Thorin
  • 3
  • 3
  • 3
9 Comments
 
LVL 2

Expert Comment

by:tpryor
ID: 1829923
need to see the code.
is print getting called twice?
0
 
LVL 6

Expert Comment

by:alamo
ID: 1829924
Looking at that URL, it appears your problem was with data.txt and is now fixed... at least i could post Ok.

If there is still a problem then please describe it more precisely and  post the "# Define Variables" at the top of the file, that should be all we need.
0
 
LVL 2

Expert Comment

by:tpryor
ID: 1829925
I thought Matt's Board was in PERL?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 6

Expert Comment

by:alamo
ID: 1829926
Yes, it is. The problem seemed to be that the script wasn't able to properly update the data.txt file which tracks the highest message number - every message on the page called the same message file. That seems to now be fixed.
0
 
LVL 2

Author Comment

by:Thorin
ID: 1829927
I don't think the problem is fixed.  Go to the page described above and post a reply to any of the messages and then reload the page.  You can even go and look at what at it did to one I posted this morning from 'Joe Blow'.  It repeats the reply after every message that is on the board.  I hope I am explaining this right.  I think the easiest way to show it is just to  go there and try it.

Here is the # Define Variables:

# Define Variables
$basedir = "/var/www/docs/spectech/mpulse/techsupp/msgboard";
$baseurl = "http://www.spectech.com/mpulse/techsupp/msgboard/";
$cgi_url = "http://www.spectech.com/cgi-bin/wwwboard.pl";
$mesgdir = "messages";
$datafile = "data.txt";
$mesgfile = "index.html";
$faqfile = "faq.html";
$ext = "html";
$date_command = "/bin/date";
$title = "WWWBoard Version 2.0 Test";
# Done

Does that help?

-Thorin
0
 
LVL 2

Expert Comment

by:tpryor
ID: 1829928
not me
0
 
LVL 2

Author Comment

by:Thorin
ID: 1829929
tpryor,

what code did you want to see then?
0
 
LVL 6

Accepted Solution

by:
alamo earned 100 total points
ID: 1829930
I can't get to the board any more since you've installed a password, but I'll explain what I observe hapening.

You originally had a problem with the data.txt file, the file which remembers the highest message number. When a new message is entered the script gets the number from data.txt, adds 1, and writes it back to data.txt. This originally was broken  - probably file rights - but was fixed by the time you posted the URL. I know, because I added a new message last night and replied to myself and it worked fine.

Before data.txt was fixed, the highest message number wasn't being properly saved, so each new message was 1.html and was overwriting the last message. The main page showed all the messages entered but the all linked to the *same* file! (Click on one, you'll see all the links suddenly show visited). When you replied to one of those messages you were replying to the message in 1.html, so in a way you *were* replying to every single message, which is why it showed your reply multiple times.

The solution: use the wwwadmin program to delete 1.html. (Or reinitialize the system and add new messages from scratch). Once all the old test messages are deleted replies will not be repeated.

Good luck!

p.s. tpryor, since the script Thorin is using is a standard script you can get off the net, it wasn't that important to me for him to post all 550 lines of it. All he needed to post was the path and filename customization section, and those look fine.
0
 
LVL 2

Author Comment

by:Thorin
ID: 1829931
Ahhhhhh, you are right!  Looks like my ISP did an end run on me and fixed it.  I just didn't understand until you explained it.  
Thanks
-Thorin
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
view results of google SQL query 9 67
Need help editing script 3 80
Combine DSQuery result into loop script 6 71
Remove all hidden metadata properties of MS .Docx Files 7 46
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to dynamically set the form action using jQuery.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question