The readme.txt file told me to download the cgi scripts to this path: #!/usr/bin/perl
Now, this is my first question. I can get all the way to: #!/usr/bin, but then "perl" is NOT a folder, but a file. Does this mean I need to right click on that "perl" file and upload my CGI scripts that way, or can I just upload them into the "bin" folder?
What I did was upload my cgi scripts to the bin folder...which is where I think the problem is coming in.
Anyway, it could be how I've scripted the code right on my page? Here's a sample of the code I have on my web page:
<!-- Start of code:
<a href="http://www.advertiser-site.com/#!/usr/local/bin/clickmanager.cgi?dl=http://www.mydomain.com">AnchorText</a>
<!-- This is where classified text goes --><br>
[Hits: <!-- #include virtual="/#!/usr/local/bin/clickmanager.cgi?num=http://www.advertiser-site.com/" -->]
End of Code -->
The "Hits" part above is where I want the number to increment everytime my advertiser's site is clicked on. Can any of you see where I'm flawed in this script...Or perhaps the path where I've uploaded my CGI scripts? Thank-you so much for your time! I hope that someone knows enough about scripts that they can help me! Thanks :)
Dave.
Use of uninitialized value at /stats.cgi line 92.
Use of uninitialized value at /stats.cgi line 98.
Use of uninitialized value at /stats.cgi line 112.
Use of uninitialized value at /stats.cgi line 151.
Line 92:) if ($form{sort} eq "id") {
LIne 98:) elsif ($form{sort} eq "url") {
Line 112:) chomp;
Line 151:) $template =~ s/<\$(.+?)>/$tmpl{$1}/ig;
Each time you click on a link all four errors appear in the log file
Try using the search function on top of the page looking for "htaccess" - there's a lot of threads on it. I believe there are other methods too, using some ".conf" file or other, as well as setting permissions on folders and files. It's a very large subject and deserves at least a full thread of it's own. You might also want to run "apache access control" through your favorite Search Engine.
2) Include doesn't work:
The comment tags must be there, it's part of how SSI works. You could try this syntax in stead though:
<!--#exec cgi="/cgi-bin/clickmanager.cgi?num=http://www.urltocount.com"-->
- please make sure that you use the trailing "/" in this command (as well as in the command you use already - added) if you have linked using it. These two might not be the same to the script:
- [urltocount.com...]
- [urltocount.com...]
3) Numall or num
I had to download the script to answer this one. The "numall=1" is used when you want to view the total number of clicks for all links.
The "num=http://www.example.com/" is used when you want the stats for one particular link.
4) wrap up
You don't seem to have done anything wrong. What seems to be missing right now is only getting SSI to work on your server. The file extension didn't do the trick, but keep it, as it's the normal one used for SSI-html.
Now we try changing the command from "include virtual" to "exec cgi" - this does the trick sometimes. An if it don't then we'll probably have to get you server properly configured to accept SSI, but one thing at a time, easiest first. The upside of all this is that you get to know your server a little better ;)
/claus
[edited by: claus at 9:04 am (utc) on July 23, 2003]
Shawn