I have recently tried to install a little program that a friend of mine
made onto my website. This program is supposed to allow the visitor to
click the link, and be taken to a page where they can enter a comment. At
that point, you're redirected back to the refering page and the text you
entered is now there and remains until someone else changes it. EX: John
smith visits the site and decides to sign "John was here" from then on,
the link will say "John was here" until let's say, Brad Brown comes along
and changes it to "Brad was too" This is a neat little concept when you
actualy see it working as on my friends site. It allows visitors to place
their own two cents onto your website. However, the one problem I am
having is that the link remains blank. It doesn't even display the default
text of "Click here to change this" as it's supposed to read from the log
file. I have all permissions set correctly, but it's still not working. I
suspect that I have the path to the log and text files wrong and this is
what's causing it to remain blank. Can you advise on how I would find the
correct path to the files? They are located in a directory called
"httpdocs" which is where my hosting company requires all files (other
than .cgi and .pl of course) to be uploaded to. In the script I have
entered the following as per the authors instructions, though again, I
think this is where I'm going wrong. The following is a paste directly
from the .pl file which includes his comments on what to enter here.
$walllog = "/httpdocs/fruitwall_log.html"; #path to your log file
Please let me know what you think and if my path command is indeed wrong,
how I can find the true unix path back to th httpdocs directory. Thank you
in advance for your help!
you really detailed your problem, and this is something I really
The easiest way to get the path of the httpdocs directoty should have been
to ask the system manager. This however may not be the case in your
situation. This really happens when programs are uploaded on free web
hosting sites. They provide service free of charge, but support really
costs them money and thus they do not provide support, even not just
telling what the path is.
If you really have to investogate yourself what the path is, you can
either try and error or write a small program that prints the current path
to the screen.
print "Status: 200 OK\nContent-Type: text/plain\n\n";
should print the current working directory as well as the full path to the
script (which may not be in the current working directory). From that you
may be able to find out what the htdocs directory is. However there is no
100% sure solution.
[ back to toc ]