If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Messages posted by: Mark_Magill
Forum Index » Profile for Mark_Magill » Messages posted by Mark_Magill
Author Message
andrew wrote:Hello,

I have just uploaded the download counter script, it is exactly what I was looking for.
It will not find any files in the base directory though, have I set it up wrong? I wasn't sure what to put

the script is at www.holystonemill.co.uk/cgi-bin/downloader/download.pl
the directory to scan is www.holystonemill.co.uk/downloadnet

Thanks


Mine found the files easily enough, remember to put the path from the document root - if you're hosted by someone (I'm on PowWeb.com) for example, my path is www/w/wordforlife/htdocs-- and so on. This is "invisible" to the outside world, but important to Perl scripts

Put this tiny script into your CGI-BIN directory, CHMOD to 755 and execute it to find your document root:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Document Root is: ";
print $ENV{'DOCUMENT_ROOT'};

This also solved my probems getting Advanced Guestbook and FFA Links scripts running that I got from here.

I have another problem, though, in that I just can't seem to figure out how to put the counter into use. The instructions say,

"To count a download use: <a href="download.pl?file=file_id">file</a>

Would somone PLEASE tell me what to put there to download a file called worry.zip located at (here's the full path) www.wordforlife.com/files/public/mp3/sermons/worry.zip

Or do I have to use the administration utility to assign them file ID's?

Please give an elementary reply, I'm just getting started wtih Perl scripts, but have a strong background in files, paths, relative paths and so on.

Thanks -
Mark
 
Forum Index » Profile for Mark_Magill » Messages posted by Mark_Magill
Go to:   
Based on the open source JForum