473,581 Members | 2,891 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ


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 http://webcomp.org/index.php/something/else,
the path_info is /something/else) that used to be found in

However, under Apache 1.3.37 with a System:
Linux host45.hostmons ter.com 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 http://hostmonster.com)
regardless of the setting of cgi.fix_pathinf o, 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 http://bugs.php.net/bug.php?id=31892
Searching for ORIG_PATH_INFO on php.net's online documentation turned
up nothing.
Some references: http://hoohoo.ncsa.uiuc.edu/cgi/env.html

Finally, as an aside, note that you can do function lookups in on
php.net 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.
http://php.net/index.php/pathinfo 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
0 3696

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Preston Crawford | last post by:
I'm working on a site that's being developed on Apache/Linux and going to be hosted on IIS/Windows. Anyone know of a site with good tips on possible pitfalls, things to look for. Typical things I'll be looking to do that I can see tripping me up include file upload, email, etc. I'll be googling until then, but I thought I'd ask as well. ...
by: college | last post by:
I compiled a recent version of php 4.3.8 on Suse 9.0 Pro with apache 1.3.28 that was a precompiled for Suse as an rpm. When I look at phpinfo(), I do not see the environment setting $_SERVER however, I can see this setting on a different box running windows and on yet another box running linux. Is there something I have to set in the...
by: divya | last post by:
This is the problem I am having: I have an index page where I obtain input from the user (for example their date of birth). This information is passed to Page2. Page2 has frames. Outside of the frames I can access the user's input. But within the frames I can't seem to be able to get the value. The date is stored in a global variable. Here...
by: | last post by:
Could someone tell me if there is any reliable server variable that returns the Domain Name + Path in ASP? I have tried: Request.serverVariables("URL") Request.serverVariables("PATH_INFO") Both Return:
by: Christian Blackburn | last post by:
Hi Gang, I'm using the following code to generate a complete URL: Session("Destination") = Request.ServerVariables("Path_Info") & "?" & Request.ServerVariables("QUERY_STRING") However that seems like a lot of work. Is there one command coming off the request object that'll acomplish this? Thanks,
by: Chuck Anderson | last post by:
This may be more of an Apache question, but after an upgrade at my remote host (one of them being from Php4 to Php5), $_SERVER no longer contains any data. Instead, the string I am looking for is in $_SERVER (never heard of that one before - I found it using phpinfo). Example URL: http://example.com/index.php/Keyword Before the upgrade...
by: fmcarol | last post by:
In the course of playing with my new Lighttpd server, I ran into a problem with the PHP_SELF, PATH_INFO, and ORIG_PATH_INFO variables - specifically, Lighty doesn't provide them to my PHP install. Now, this isn't specifically a PHP issue, but so far no one in the Lighty community has come up with a good fix for this - short of doing without...
by: undbund | last post by:
Hi, i have a pdf file located at the following location: http://www.somedomain.com/2006/members/news/somepdf.pdf I want to be able to access the same pdf from the same location but with the follwing url http://www.somedomain.com/2006/news/somepdf.pdf or
by: Michael Windsor | last post by:
I've been trying to integrate some PHP pages of my own with some existing code. The details of this are for the support forums for that code (where I have been asking questions), but I wonder if someone here can enlighten me as to why the problematic code is having the effect it is. For reasons I don't know, if the PHP version is 5 or...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.