Solved

Trouble with Matt's Message board

Posted on 1998-06-23
9
356 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now