![]() |
|
#1
|
|||
|
|||
Trouble with CGI Variables PATH_*Using PHP, the CGI variables $_SERVER['PATH_INFO'] and $_SERVER['PATH_TRANSLATED'] are always initialized to an empty string on my local server:
Here are descriptions of what I expect: PATH_TRANSLATED: Filesystem- (not document root-) based path to the current script, after the server has done any virtual-to-real mapping. The problem is repeatable to some degree on a remote server:
Are my definitions of the variables and interpretations of them correct; what is? Does anyone else have this problem, and with what setup? What other ways can be used to get these values? Because the called page isn't the executing page in this case, getcwd() and similar aren't options. Thanks! |
|||
|
#2
|
|||
|
|||
|
It looks like standard behavious to me. Here's what I found from the ie.php.net:
Quote:
I'd not heard of PATH_INFO before this. I see it's part of the CGI spec though. Hope this helps! GF |
|
#3
|
|||
|
|||
|
I think my project hit a brick wall here. The note in the manual must be relatively new; last time I tried fixing this (~2 months ago), I checked that page only too often.
The new note implies that non-Apache servers do provide PATH_TRANSLATED, or that other server software packages have already made this change (is this true, which?): Quote:
Also, why does Apache not provide PATH_INFO by default? Quote:
Could it be that by running PHP as a module as opposed to a CGI, some CGI standards don't apply? "...under the Apache 2 SAPI..." Thanks for that link to the manual, though. I can finally get back to work on the actual work :D . |
|
#4
|
|||
|
|||
|
Yeah, I see this is quite a hummdinger. PATH_INFO strikes me a a very useful variable, especially for helping SEs with pretty request strings.
After a quick search through the Apache manual, I found something which may be related: apache.active-venture.com Quote:
This must be more of an Apache thing than a PHP one, and it doesn't look like it's been handled too well with only a strange workaround available. GF |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing variables out of an iframe by url | JUNK KED | MySQL / PHP Forum | 5 | 31-Jul-2007 10:33 |
| Visual C++ 6.0 trouble | LuciWiz | MS Visual C++ / MFC Forum | 3 | 02-Aug-2004 07:40 |
| Having trouble trying to format C: | Nickster64 | Computer Software Forum - Windows | 2 | 27-Jul-2004 08:31 |
| getting variables from $_GET & $_POST | Dunc | MySQL / PHP Forum | 2 | 29-Mar-2004 06:45 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The