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!

Home directories on NT

Status
Not open for further replies.

Loon

Programmer
May 24, 2000
100
GB
Hi

I'm having trouble getting my scripts to find my web page and vice versa.

In other words my first page has a link to a perl script. This is in ./mobile/cgi-bin compared to my home directory.

Then this creates a page on the fly with a reference to another script in the same cgi-bin directory. However, when the page calls the script the browser comes back URL not found.

What I'd really like to do is something similar to the ~ on Unix to use complete paths to my pages and scripts e.g.

~/mobile/cgi-bin/somescript.pl
or
~/mobile/somepage.htm

The problem is that the ~ doesn't seem to work on NT and I can't for the life of me think of how to do it on NT....

Durrhhhh....

Cheers!
Loon [sig][/sig]
 
Hi Loon,

Is this on a hosted server or on your own?
Does your host refer to an absolute path?

Do you happen to know what webserver it is running on?
Have you checked the rights to the file?

higginsd [sig][/sig]
 
higginsd,

this is on a hosted web server. NT4.0 running Micro$oft IIS 4.0. After a lot of investigation and trial and error I found that scripts executed from a page in ./mobile directory will create a file in my ./ home directory. However if that page (generated from the script) is then used to call another CGI (or even the same CGI) in the ./mobile/cgi-bin/ directory, it will create a file in ./mobile. From then on it will attempt to read/write files from ./mobile.

This is very strange behaviour as this is the first Web Server I've ever encountered that uses different directories based on CGI calling page's location.

Any ideas appreciated, I'd still really like to get absolute paths working in my scripts so I don't fill up the ./mobile directory with hundreds of files and don't have to worry about keeping copies in my root directory so the script works the first time I call it.

Cheers
Loon [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top