Hi,

In my WIN Nt, i have a Apache server running and there is a CGI 
perl application located in a separate folder (c:\mycgi) other than 
the default apache cgi-bin folder. In httpd conf file, i changed the 
document root as well as <directory > stanzas to point to c:\mycgi.

The problem is when i run the cgi application, some pages fails to 
send request to a cgi program which has its action url generated 
by variables. On debugging i found that the action url is coming up 
with absolute path to the target cgi program instead of relative path 
due to failure to split the url upto the last slash. Below is the code 
parts,

       if (!defined $nexturl || $nexturl eq "") {
            # Sets nexturl to be argv0, stripping everything up to and
            # including the last slash.
            $0 =~ m:[^/]*$:;
            $nexturl = $&;
        }
      <FORM action=$nexturl method=$method>
.......
this is one of the statement is CGI.pl file.
As seen above, the $0 =~ m:[^/]*$:; doesn't seem to work as the 
resulting page is showing it as,
      <FORM action="c:\mycgi\enterMy~1.cgi" method=$method>

You could also observe that enterMyDetails.cgi has been truncated 
in WIN NT to enterMy~1.cgi.

Please help me out in solving the above problems.

Thanking You,


Byju P.Nair
Software Engineer,
Coas India,174,Road No. 72,
Prasashan Nagar,Jubilee Hills,
Hyderabad, India

Reply via email to