473,699 Members | 3,282 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 3709

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. Preston
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 configuration for the value to show up? Ty
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 are snippet's of code: ##Variables my ($BDAY, $path_info, $script_name);
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 $_SERVER would contain /Keyword. Now it
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 PATH_INFO. Even after applying all the fixes I could find:
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 greater, register_long_arrays is false and $_SESSION exists, the following statement is executed: ...
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.