I've got a perl script that was written to grab the file name from the environmental variable script_filename
The problem I'm having is that server (Cobalt Raq) is returning
/usr/cgiwrap/cgiwrap as the script name.
That's causing the links and forms on the generated page to look like
[mysite.com...]
Instead of
[mysite.com...]
Will turning off cgiwrap on this virtual site fix the problem?
Perhaps manually placing the absolute path into the script (/home/sites/www.mysite.com/web )instead of allowing it to try and determine it will fix it. Unless you are the admin for the server don't count on getting the cgiwrap turned off.
The script in question is encrypted, so I can't view or edit the code. The author is in Malaysia. The lag time in his responses is quite long, and when he does reply, he hasn't been much help.
his last reply:
>you get cgiwrap as filename probably because you have another script named cgiwrap and you massed them up. try to install the script in some other directories which do not have conflicts.
I waited 24 hours for that.. :(
Is there a way I can get to the source so I can look at it?
Ah, that removes the major need to have cgiwrap. Yes, turning it off should fix the problem.
>get to the source
Not sure, the only way I can think of encrypting is using the compiler - if that's the case you could try
perl -MO=Deparse script.pl
from the command line to reconstruct the perl source.
I changed
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
to
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
Shouldn't that turn off cgiwrap for that individual site?
Since it didn't work, I put a .htaccess in the script directory with
Options +ExecCGI
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
And that seemed to do the trick.
As far as trying to view the source goes, running the compiler didn't work. I'm really bummed it didn't because now that I've got it working I've discovered that all the html output the script generates was done in FrontPage. Since the output is going to be dumped into optimized templates, I want the code to match.
I'm determined to edit this script!
Here's what a chunk looks like.
#!/usr/bin/perl
# >>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$lBEAXDEAXCCAXADDDXACCXACCXABDDXBABXECDXDBDDXECBXDDDXABAAXDEBXADEXB
Does it look familiar to anyone? I've found a few perl modules that do this, but I don't know how to figure out how to reverse it.
>>The only other sites on it are ones I run
>Ah, that removes the major need to have cgiwrap. Yes, turning it off
>should fix the problem.
I'd suggest that even if you own all the sites, if you are running CGIs that you haven't read (ie...they are encrypted) or tested, then cgi-wrapper is a good thing to use. :)