473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

path_info - orig_path_info (PHP5?)

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['PATH_INFO']
no longer contains any data. Instead, the string I am looking for is in
$_SERVER['ORIG_PATH_INFO'] (never heard of that one before - I found it
using phpinfo).

Example URL:
http://example.com/index.php/Keyword

Before the upgrade $_SERVER['PATH_INFO'] would contain /Keyword. Now it
is blank, and there is a new server variable, $_SERVER['ORIG_PATH_INFO']
that does contain /Keyword.

Is this a Php5 issue, ... an Apache issue, ... something else?

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Everyone's journey should be different,
so that we all are enriched
in new and endless ways
*****************************
Jul 1 '06 #1
4 9742
Chuck Anderson wrote:
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['PATH_INFO']
no longer contains any data. Instead, the string I am looking for is in
$_SERVER['ORIG_PATH_INFO'] (never heard of that one before - I found it
using phpinfo).

Example URL:
http://example.com/index.php/Keyword

Before the upgrade $_SERVER['PATH_INFO'] would contain /Keyword. Now it
is blank, and there is a new server variable, $_SERVER['ORIG_PATH_INFO']
that does contain /Keyword.

Is this a Php5 issue, ... an Apache issue, ... something else?
I don't think it's PHP, sounds like something else...
I just checked my php 5.2 / Apache 2 and it is returning the PATH_INFO
per your expectations (and no ORIG_PATH_INFO in sight).

Csaba Gabor from Vienna

Jul 1 '06 #2
*** Chuck Anderson escribió/wrote (Sat, 01 Jul 2006 16:29:53 -0600):
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['PATH_INFO']
no longer contains any data. Instead, the string I am looking for is in
$_SERVER['ORIG_PATH_INFO'] (never heard of that one before - I found it
using phpinfo).
Check this Apache directive:

AcceptPathInfo Directive
Description: Resources accept trailing pathname information
Syntax: AcceptPathInfo On|Off|Default
Default: AcceptPathInfo Default
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Core
Module: core
Compatibility: Available in Apache 2.0.30 and later

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Jul 2 '06 #3
Csaba Gabor wrote:
Chuck Anderson wrote:
>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['PATH_INFO']
no longer contains any data. Instead, the string I am looking for is in
$_SERVER['ORIG_PATH_INFO'] (never heard of that one before - I found it
using phpinfo).

Example URL:
http://example.com/index.php/Keyword

Before the upgrade $_SERVER['PATH_INFO'] would contain /Keyword. Now it
is blank, and there is a new server variable, $_SERVER['ORIG_PATH_INFO']
that does contain /Keyword.

Is this a Php5 issue, ... an Apache issue, ... something else?

I don't think it's PHP, sounds like something else...
I just checked my php 5.2 / Apache 2 and it is returning the PATH_INFO
per your expectations (and no ORIG_PATH_INFO in sight).

Csaba Gabor from Vienna

I finally found something about this.

There seems to be a bug in Php when run as cgi that is not being addressed.
http://bugs.php.net/bug.php?id=31843

After reading that, I think the easiest thing for me to do now is make
my scripts check to see if PATH_INFO *or* ORIG_PATH_INFO is set.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Everyone's journey should be different,
so that we all are enriched
in new and endless ways
*****************************
Jul 3 '06 #4
Alvaro G. Vicario wrote:
*** Chuck Anderson escribió/wrote (Sat, 01 Jul 2006 16:29:53 -0600):
>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['PATH_INFO']
no longer contains any data. Instead, the string I am looking for is in
$_SERVER['ORIG_PATH_INFO'] (never heard of that one before - I found it
using phpinfo).

Check this Apache directive:

AcceptPathInfo Directive
Description: Resources accept trailing pathname information
Syntax: AcceptPathInfo On|Off|Default
Default: AcceptPathInfo Default
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Core
Module: core
Compatibility: Available in Apache 2.0.30 and later
I was being a little daft here. Php is run as cgi on the server.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Everyone's journey should be different,
so that we all are enriched
in new and endless ways
*****************************
Jul 3 '06 #5

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

Similar topics

8
by: Rob Ristroph | last post by:
I have tried out PHP 5 for the first time (with assistance from this group -- thanks!). The people I was working with have a site that uses lots of php objects. They are having problems with...
11
by: neur0maniak | last post by:
Hi, I've been eager to try out PHP5, so I've dumped it on my little dev machine. It's running WinXP with IIS5. I've put the php-cgi.exe in the "mappings" page as I'm used to doing with PHP4....
2
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...
0
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") ...
5
by: Aziz | last post by:
Hi, I've recently contacted technical service of a web hosting company and asked them wheter or not they're gonna upgrade to PHP5 and MySQL5. Here's a quote from their response which confused me...
1
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...
0
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...
0
by: Csaba Gabor | last post by:
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...
19
by: McKirahan | last post by:
I am working in two environments neither configuration of which I can change; one's my Web host the other a client. My Web host requires the use of the ".php5" extension to use PHP v5.1.4; where...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.