symlink directory in apache perl .cgi script --- please help 
Author Message
 symlink directory in apache perl .cgi script --- please help

I have a web directory which is a symlink to another real directory,
and I need to get the current symlinked name of the directory.  `pwd`
only returns the real directory name, while $ENV{PWD} returns nothing
in the context of a .cgi script.

Please help !!!  any ideas for a workaround?

Thank you in advance,
Laszlo



Tue, 24 May 2005 08:54:50 GMT  
 symlink directory in apache perl .cgi script --- please help

Quote:

> I have a web directory which is a symlink to another real directory,
> and I need to get the current symlinked name of the directory.  `pwd`
> only returns the real directory name, while $ENV{PWD} returns nothing
> in the context of a .cgi script.

Note that the CGI spec does not define what the PWD should be.  As
such a portable CGI script must never make any assuptions about the
PWD.

Under Apache the PWD is set to the directory in which Apache finds the
CGI script.  Of course once one has set the PWD it's impossible to
determine what name was used to do this.

But have a look at all the other variables in %ENV - you'll find that
one of them contains something from which you could trivially derive
the directory name which Apache used to find the script.

BTW: Your question has nothing whatever to do with Perl.  The issues
inviolved would be identical whatever languge you'd used for your CGI.

This newsgroup does not exist.  If it did it would be a place to
discuss Perl.  Please do not start threads here.  Especially not ones
not about Perl.  See FAQ.



Tue, 24 May 2005 20:28:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Please help re cgi script on FreeBSD running Apache

2. can't run CGI scripts in Apache...help please

3. Please help - trying to get an Apache script to work on IIS

4. howto place perl scripts and static html files in the same directory with Apache-perl

5. please help - how to call a perl cgi script as a url

6. Please help me with the following perl/cgi scripts

7. Unlinking a symlink to a directory...

8. I broke my apache with perl Please Help!!

9. mark-symlinked-directories

10. Please help - CYGWIN install of Apache+Perl

11. Please help - Perl+Apache+IExplorer

 

 
Powered by phpBB® Forum Software