By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,537 Members | 2,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,537 IT Pros & Developers. It's quick & easy.


P: n/a
Does anyone know what the deal is on ORIG_PATH_INFO vs. PATH_INFO?
I use the "real" path_info from the server
(e.g. in,
the path_info is /something/else) that used to be found in

However, under Apache 1.3.37 with a System:
Linux 2.6.17-11_4.BHsmp #1 SMP Fri Nov 17
17:14:51 MST 2006 x86_64
and PHP 5.1.6. CGI (on
regardless of the setting of cgi.fix_pathinfo, whether 0 or 1.

On the other hand, $_SERVER['ORIG_PATH_INFO'] returns the correct
information in the above setup.

So is the PHP version/Server independent way of doing this supposed to
be something like:
$path_info = @$_SERVER['ORIG_PATH_INFO'];
if (!$path_info) $path_info = @$_SERVER['PATH_INFO'];

Csaba Gabor from Vienna
See also
Searching for ORIG_PATH_INFO on's online documentation turned
up nothing.
Some references:

Finally, as an aside, note that you can do function lookups in on by writing something like the very pretty:
It is tempting to say that this is an example of PATH_INFO at work
(with an implied index.php), but it is not. For PATH_INFO to work, the
explicit URL, including the file, must be provided (e.g. which leads to the main php page).
To get apache to behave as you would expect it to behave, you have to
do URL rewriting within apache. Too bad.

Jan 9 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.