Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl runs in top level web folder instead of cgi-bin

Status
Not open for further replies.

macrame

Technical User
Joined
Jul 19, 2006
Messages
2
Location
GB
I have Perl scripts for a website in a /cgi-bin folder, but when they run under IIS, they run as if they are in the top-level web folder.

For example, if I write a script to list the file contents of "." I get a list of the files in the folder above the /cgi-bin folder, rather than the /cgi-bin folder itself.

Or if I try to read the contents of file "test.txt" it doesn't work if the file is in /cgi-bin, but it does work if the file is in the home directory. Any ideas?

Details: ActivePerl 5.6.1 on Windows 2000.

C.
 
Sounds like your IIS is not configured correctly.

Check to see if the Execute attribute (Script attribute in Microsoft IIS 4.x) is enabled for the cgi-bin directory.
 
The execute permission is there.

The scripts run, but when they are running they think the "." directory is at the web root folder, whereas the scripts are placed below this in the cgi-bin folder. So relative paths to other folders are now all wrong.

The issue showed up when working scripts were migrated to a new server.

I agree it's a configuration issue, either with IIS or with Perl, but I can't figure out what.

I've tested other websites on the same server and they have the same issue.

C.
 
I'm sure this is a perl issue, maybe ask in the appropriate server forum and see if anyone can help you figure this out.
 
Í'm sure KevinADC meant this is NOT a perl issue. :)
 
Sounds like it's a permissions issue for the user Perl is running under on the server. Check in the IIS forum for how to resolve.

- George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top