[php-maint] Bug#492739: Bug#492739: $_SERVER['PATH_TRANSLATED'] does not more work
Michelle Konzack
linux4michelle at tamay-dogan.net
Wed Jul 30 01:31:24 UTC 2008
Hello Ondrej,
Am 2008-07-28 16:07:27, schrieb Ond??ej Surý:
> From http://us2.php.net/manual/en/reserved.variables.server.php:
>
> """ Note: As of PHP 4.3.2, PATH_TRANSLATED is no longer set
> implicitly under the Apache 2 SAPI in contrast to the situation in
> Apache 1, where it's set to the same value as the SCRIPT_FILENAME
> server variable when it's not populated by Apache. This change was
> made to comply with the CGI specification that PATH_TRANSLATED should
> only exist if PATH_INFO is defined. Apache 2 users may use
> AcceptPathInfo = On inside httpd.conf to define PATH_INFO. """
I have set "AcceptPathInfo On" in my VHost
----[ '/etc/apache2/sites-available/net.tamay-dogan.debian.devel' ]-----
<VirtualHost devel.debian.tamay-dogan.net>
ServerAdmin linux4michelle at tamay-dogan.net
ServerName devel.debian.tamay-dogan.net
DocumentRoot /var/www/net.tamay-dogan.debian.devel/htdocs/
<Directory />
Options FollowSymLinks Indexes
AllowOverride None
</Directory>
DirectoryIndex index.php index.html /DirIndex.php
AcceptPathInfo On
ScriptAlias /cgi-bin/ /var/www/net.tamay-dogan.debian.devel/cgi-bin/
<Directory "/var/www/net.tamay-dogan.debian.devel/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/www/net.tamay-dogan.debian.devel/log/error.log
LogLevel warn
CustomLog /var/www/net.tamay-dogan.debian.devel/log/access.log com
ServerSignature On
</VirtualHost>
----8<------------------------------------------------------------------
and restarted Apache but it does not work.
$_SERVER[PATH_INFO] and $_SERVER[PATH_TRANSLATED] return empty strings
and in
/doc/apache2-doc/manual/mod/core.html#acceptpathinfo
it is written:
----8<------------------------------------------------------------------
This directive controls whether requests that contain trailing pathname
information that follows an actual filename (or non-existent file in an
existing directory) will be accepted or rejected. The trailing pathname
information can be made available to scripts in the PATH_INFO
environment variable.
For example, assume the location /test/ points to a directory that
contains only the single file here.html. Then requests for
/test/here.html/more and /test/nothere.html/more both collect /more as
PATH_INFO.
The three possible arguments for the AcceptPathInfo directive are:
Off A request will only be accepted if it maps to a literal path that
exists. Therefore a request with trailing pathname information
after the true filename such as /test/here.html/more in the above
example will return a 404 NOT FOUND error.
On A request will be accepted if a leading path component maps to a
file that exists. The above example /test/here.html/more will be
accepted if /test/here.html maps to a valid file.
----8<------------------------------------------------------------------
So why ist the VARIABLE always empty?
For example I have
DirectoryIndex index.php index.html /DirIndex.php
and if I enter an empty directory like
/debian-devel/pool/main/
it execute /DirIndex.php and should generate a Directory Listing but:
PATH_INFO <empty>
PATH_TANSLATED <empty>
SCRIPT_NAME /DirIndex.php
SCRIPT_FILENAME /var/www/net.tamay-dogan.debian.devel/htdocs/DirIndex.php
But the URL show me /debian-devel/pool/main/
> So did you do your homework properly before filling this bug report
> and have you read the docs and is PATH_INFO defined in your
> environment?
I have read it but nothing is working. Any hints?
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20080730/2ff25b6a/attachment.pgp
More information about the pkg-php-maint
mailing list