Forum Moderators: open
I am new to this forum and thought it would be a great place to ask advice on cloaking.
Here's the scenario, I am not efficient in Perl, I can set up CGI, create .htaccess pages, and use ssi. But I am having a lot of problems getting the inline cloaking script from Spider Hunter to work. I know I can run this program from the unix servers my host has I just cannot get it to work from this end. I guess the instructions were not helpful enough for a lot of people who don't already know programming and the logic behind simple scripts like this. I would also like to know how to set this up using NT servers if possible.
If any one can help with a little step by step information I would really, really appreciate it.
Thank you
There really isn't enough information to go on, but I'll cover the steps for most cgi installations and hope it helps.
1. make sure you upload the script in ASCII mode
2. the shebang line at the beggining of the script is correct for your server usually - #!/usr/bin/perl
3. change permissions (chmod) on the script to 755
4. change permissions on any files that are read by the script to 766
5. run the script on it's own, instead of SSI and see what error messages you get.
6. If you have access to the server's error_log check to see what error you are getting when the script runs.
7. if you are using a comma separated values file make sure there are no extra commas, or commas in the wrong place.
Having said all that, your best source of information is probably the author of the script, or the webmaster of the site you got it from, but usually the problem is in one of the above steps.
As for running the script on NT, probably all that is required in a simple script is to change the paths from the /unix/style/paths to the h:\windows\style\paths for any file processing within the script.
>your best source of information is probably the author of the script...
I wrote about 65% of that script so you could give me a stickymail if you have any questions.
I have tried what you said and I cannot get it to work. Here is the problem more specifically.
#1/usr/bin/perl
print "Content-type:text/html\n\n";
$datadir = "/usr/bin";
# replace this with the absolute path to the directory that hold your data
Ok, I have tried replacing all lines that say usr/bin... with my direct path...doesn't work, I have set the chmod to the 755 and 766 for the data.db it is linking to, nothing. I have named it index.cgi, search-engine.html, .cgi, .txt... you name it. When it has .html at the end it shows the code, like when you type html and forget to enclose something, you can see the whole thing. I have uploaded it to the cgi-bin, and to my main directory and tried a bunch of different ways and names to make it work. Do I need a special .htaccess for it, maybe rename it something else, or change the paths?
Do you have any other advice?
thank you,
Dan
Just a quick notice, you have the path to perl with a "1" in it, it should be an exclamation mark "!" i.e. #!/usr/bin/perl not #1/usr/bin/perl unless that was just a typo.