[Typo3-dev] PATH_TRANSLATED issues
Kasper Skårhøj
kasper at typo3.com
Fri Apr 30 12:11:40 CEST 2004
Hi Wolfgang and Ingmar.
We cannot change this for 3.6.0 - as Wolfgang says (or quotes me saying)
it is too risky.
BUT we can address this issue almost immediately for 3.6.1. Since there
will be a month or two for testing the next release that will be time
enough to test such changes so the whole world doesn't break down when
3.6.1 is out.
Generally to Ingmar: The problem is not your PHP code, that will test
the variables in the given order. That might be the final solution we
choose. If you ask me the problem is that we are not knowing what we are
doing. Could someone *explain* what these variables mean?
Last time we had these trouble (that was when t3lib_div::getIndpEnv()
was made) the code had been dealing with these issues on a per-case
basis and after a while the code was awfully patched up. So everything
was redone from scratch based on a more detailed analysis of various
systems. On that ground getIndpEnv() was created.
I don't want to just apply various "this works" patches. I want to know
WHY and in which case. That must be described just like I started to do
1,5 years ago in the Server Compatibility Chart.
See end of mail for more.
> (2)
> SCRIPT_FILENAME is reliable and should always be set to the right value
> (can anybody give an example where this is not true?)
> (even with cgi)
Yes, I just saw in the .htaccess thread that this becomes unreliable
when rewrite rules are used in the httpd.conf file instead of .htaccess
files.
Doesn't this should with all clarity what kind of dangers we are up
against? People reporting "ah, it doesn't work on my linux
this-and-that, version this-and-that" - and all we can do is ignore it
hopelessly left back with a feeling that Apache is feeding us very
strange values from the environment.
Conclusion: Why the @#¤% doesn't anyone/anywhere supply a complete
description of what system/env. variables we can expect and rely on in
all situations!
>
> (3)
> PATH_TRANSLATED or(!) ORIG_PATH_TRANSLATED are reliable if there were
> any transformations (cgi?)
> (while SCRIPT_FILENAME may contain the right path too here! see above)
>
> That's in case true for PHP 4.3.2
> (Linux, Windows, Mac OS X)
Thanks.
If anyone wants to speed this issues for 3.6.1:
- I'm willing to do some (conservative) changes to getIndpEnv() and
where else needed in CVS in two weeks from now or so if:
- Someone will maintain and expand if needed the Server Compatibility
Chart, including maybe a general seeking of information about the key
system variables we can rely on including why ORIG_PATH... and PATH...
and SCRIPT_NAME and ....SCRIPT_NAME are sometimes the same value...
- Someone will promise to organize broad testing of any changes I do so
we KNOW it will work on the 9+ profiles or servers I listed in the
Server Compatiblity Chart. (linux, windows, apache , ISS, using rewrite
rules in httpd.conf file, PHP as module/cgi/fast-cgi, SuPHP...)
More information about the TYPO3-dev
mailing list