httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Peña Escobio <ro...@infomed.sld.cu>
Subject [users@httpd] problems with PATH_TRANSLATED and index pages inside PATH_INFO directory
Date Thu, 19 Aug 2004 16:31:28 GMT
hi, i'm trying to find if the problem i'm having is because a bug in httpd or something
wrong or missing in the httpd configuration file
here is the problem:

when i need the PATH_TRANSLATED information in a CGI but also have a
valid Index page inside the PATH_INFO directory, the variable will not
be a translated version of PATH_INFO, i will get the file name of
index page added to the end of the translated version of PATH_INFO:
like this:

PATH_TRANSLATED :/var/www/html/conf/index.html
PATH_INFO :/conf/

if i don't have any valid Index page i get the right values:

PATH_TRANSLATED :/var/www/html/conf/
PATH_INFO :/conf/

according to http://hoohoo.ncsa.uiuc.edu/cgi/env.html, which is
reference from  http://httpd.apache.org/docs-2.0/howto/cgi.html,
PATH_TRANSLATED is, and i cuote,
"a translated version of PATH_INFO, which takes the path and does any
virtual-to-physical mapping to it"

i create this simple cgi perl script to show the variables:
#!/usr/bin/perl

# script to test the PATH_INFO and the PATH_TRANSLATED enviroment variables

print "Status: 200\n";
print "Content-Type: text/html\n\n";


print "<HTML><HEAD><TITLE>OK</TITLE></HEAD><BODY><H1>Checking
enviroment
variables</H1>\n";

$filename = $ENV{'PATH_TRANSLATED'};
print "PATH_TRANSLATED :$filename <br>\n";

$filename = $ENV{'PATH_INFO'};
print "PATH_INFO :$filename <br>\n";

print "</BODY></HTML>\n";
exit;

and the way to check the problem can as easy as:

http://localhost/cgi-bin/cgi-perl.pl/conf/

first, create an index file: touch conf/index.html
visit the URL, see the value of the variables, and the problem :-)

second, erase the index file:
visit the URL, see what should be the right out put


is these a bug or a configuration problem?

thanks
roger
PD: sorry, i'm using httpd-2.0.46-32.ent.3 with RHEL-3

----------------------------------------------------------------------
Nodo central de la red Infomed                 (http://www.sld.cu)
Usuario linux: 97152                           (http://counter.li.org)
Miembro del grupo de coordinacion de LinuxCuba (http://www.linux.cu)

"Whatever you do will be insignificant, but it is very important
 that you do it."
                       Gandhi
----------------------------------------------------------------------


-------------------------------------------------
Este mensaje fue enviado usando el servicio de correo en web de Infomed
http://webmail.sld.cu

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message