Solved

Trouble with Matt's Message board

Posted on 1998-06-23
9
358 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

832 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