php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16891 PATH_INFO
Submitted: 2002-04-28 20:28 UTC Modified: 2002-04-28 20:40 UTC
From: mircea at nistor dot net Assigned:
Status: Not a bug Package: *Web Server problem
PHP Version: 4.2.0 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
17 - 7 = ?
Subscribe to this entry?

 
 [2002-04-28 20:28 UTC] mircea at nistor dot net
I have compiled PHP 4.2.0 with:
./configure --with-apache=../apache_1.3.24 --enable-ftp 
--enable-discard-path
and apache 1.3.24 with:
./configure --prefix=/usr/local/apache-1.3.24 
--activate-module=src/modules/php4/libphp4.a 

After I run httpd I can't see $PATH_INFO
I did the same thing with php 4.1.2 and works ok.

is there any settings to enable PATH_INFO or there is problem 
with that.

P.S. Also, I can't see the whole name from PHP Variables.
insted of HTTP_SERVER_..... I see _SERVER_...

Thanks,

here are more info:

PATH_INFO=





PHP Version 4.2.0



System
Linux netdot 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 
unknown


Build Date
Apr 28 2002 19:13:40


Configure Command
 './configure' '--with-apache=../apache_1.3.24' '--enable-ftp' 
'--enable-discard-path'


Server API
Apache


Virtual Directory Support
disabled


Configuration File (php.ini) Path
/usr/local/lib


Debug Build
no


Thread Safety
disabled



 This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies




PHP 4 Credits


Configuration

PHP Core 


Directive
Local Value
Master Value


allow_call_time_pass_reference

On
On


allow_url_fopen

1
1


always_populate_raw_post_data

0
0


arg_separator.input

&
&


arg_separator.output

&
&


asp_tags

Off
Off


auto_append_file

no value
no value


auto_prepend_file

no value
no value


browscap

no value
no value


default_charset

no value
no value


default_mimetype

text/html
text/html


define_syslog_variables

Off
Off


disable_functions

no value
no value


display_errors

On
On


display_startup_errors

Off
Off


doc_root

no value
no value


enable_dl

On
On


error_append_string

no value
no value


error_log

no value
no value


error_prepend_string

no value
no value


error_reporting

no value
no value


expose_php

On
On


extension_dir

/usr/local/lib/php/extensions/no-debug-non-zts-20010901
/usr/local/lib/php/extensions/no-debug-non-zts-20010901


file_uploads

1
1


gpc_order

GPC
GPC


highlight.bg

#FFFFFF
#FFFFFF


highlight.comment

#FF8000
#FF8000


highlight.default

#0000BB
#0000BB


highlight.html

#000000
#000000


highlight.keyword

#007700
#007700


highlight.string

#DD0000
#DD0000


html_errors

On
On


ignore_user_abort

Off
Off


implicit_flush

Off
Off


include_path

.:/usr/local/lib/php
.:/usr/local/lib/php


log_errors

Off
Off


magic_quotes_gpc

On
On


magic_quotes_runtime

Off
Off


magic_quotes_sybase

Off
Off


max_execution_time

30
30


open_basedir

no value
no value


output_buffering

0
0


output_handler

no value
no value


post_max_size

8M
8M


precision

14
14


register_argc_argv

On
On


register_globals

Off
Off


safe_mode

Off
Off


safe_mode_exec_dir

1
1


safe_mode_gid

Off
Off


safe_mode_include_dir

no value
no value


sendmail_from

no value
no value


sendmail_path

/usr/sbin/sendmail -t -i 
/usr/sbin/sendmail -t -i 


short_open_tag

On
On


SMTP

localhost
localhost


sql.safe_mode

Off
Off


track_errors

Off
Off


unserialize_callback_func

no value
no value


upload_max_filesize

2M
2M


upload_tmp_dir

no value
no value


user_dir

no value
no value


variables_order

no value
no value


xmlrpc_error_number

0
0


xmlrpc_errors

Off
Off


y2k_compliance

Off
Off


xml


XML Support
active


XML Namespace Support
active


EXPAT Version
1.95.2


standard


Regex Library
Bundled library enabled


Dynamic Library Support
enabled


Path to sendmail
/usr/sbin/sendmail -t -i 



Directive
Local Value
Master Value


assert.active

1
1


assert.bail

0
0


assert.callback

no value
no value


assert.quiet_eval

0
0


assert.warning

1
1


safe_mode_allowed_env_vars

PHP_
PHP_


safe_mode_protected_env_vars

LD_LIBRARY_PATH
LD_LIBRARY_PATH


url_rewriter.tags

a=href,area=href,frame=src,form=fakeentry
a=href,area=href,frame=src,form=fakeentry


session


Session Support
enabled



Directive
Local Value
Master Value


session.auto_start

Off
Off


session.cache_expire

180
180


session.cache_limiter

nocache
nocache


session.cookie_domain

no value
no value


session.cookie_lifetime

0
0


session.cookie_path

/
/


session.cookie_secure

Off
Off


session.entropy_file

no value
no value


session.entropy_length

0
0


session.gc_maxlifetime

1440
1440


session.gc_probability

1
1


session.name

PHPSESSID
PHPSESSID


session.referer_check

no value
no value


session.save_handler

files
files


session.save_path

/tmp
/tmp


session.serialize_handler

php
php


session.use_cookies

On
On


session.use_trans_sid

1
1


posix


Revision
$Revision: 1.42.2.2 $


pcre


PCRE (Perl Compatible Regular Expressions) Support
enabled


PCRE Library Version
3.4 22-Aug-2000


mysql


MySQL Support
enabled


Active Persistent Links
0


Active Links
0


Client API version
3.23.39


MYSQL_MODULE_TYPE
builtin


MYSQL_SOCKET
/tmp/mysql.sock


MYSQL_INCLUDE
?


MYSQL_LIBS
?



Directive
Local Value
Master Value


mysql.allow_persistent

On
On


mysql.default_host

no value
no value


mysql.default_password

no value
no value


mysql.default_port

no value
no value


mysql.default_socket

no value
no value


mysql.default_user

no value
no value


mysql.max_links

Unlimited
Unlimited


mysql.max_persistent

Unlimited
Unlimited


ftp


FTP support
enabled


ctype


ctype functions
enabled (experimental)


apache


APACHE_INCLUDE
?


APACHE_TARGET
?


Apache Version
Apache/1.3.24


Apache Release
10324100


Apache API Version
19990320


Hostname:Port
127.0.0.1:80


User/Group
nobody(99)/99


Max Requests
Per Child: 0 - Keep Alive: on - Max Per Connection: 100


Timeouts
Connection: 300 - Keep-Alive: 15


Server Root
/usr/local/apache-1.3.24


Loaded Modules
mod_php4, mod_auth, mod_access, mod_alias, mod_actions, 
mod_asis, mod_cgi, mod_dir, mod_include, mod_status, 
mod_negotiation, mod_mime, mod_log_config, mod_env, http_core



Directive
Local Value
Master Value


child_terminate

0
0


engine

1
1


last_modified

0
0


xbithack

0
0


Apache Environment


Variable
Value


DOCUMENT_ROOT
/usr/local/apache-1.3.24/htdocs


HTTP_ACCEPT
text/*, image/jpeg, image/png, image/*, */*


HTTP_ACCEPT_CHARSET
Any, utf-8, *


HTTP_ACCEPT_ENCODING
x-gzip, gzip, identity


HTTP_ACCEPT_LANGUAGE
en, en_US


HTTP_CACHE_CONTROL
no-cache


HTTP_CONNECTION
Keep-Alive


HTTP_HOST
localhost


HTTP_PRAGMA
no-cache


HTTP_USER_AGENT
Mozilla/5.0 (compatible; Konqueror/2.2-11; Linux)


PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/root/bin


REMOTE_ADDR
127.0.0.1


REMOTE_PORT
32913


SCRIPT_FILENAME
/usr/local/apache-1.3.24/htdocs/aa.php


SERVER_ADDR
127.0.0.1


SERVER_ADMIN
root@netdot.corp.nateng.com


SERVER_NAME
127.0.0.1


SERVER_PORT
80


SERVER_SIGNATURE
<ADDRESS>Apache/1.3.24 Server at 127.0.0.1 Port 80</ADDRESS>



SERVER_SOFTWARE
Apache/1.3.24 (Unix) PHP/4.2.0


GATEWAY_INTERFACE
CGI/1.1


SERVER_PROTOCOL
HTTP/1.1


REQUEST_METHOD
GET


QUERY_STRING
?


REQUEST_URI
/aa.php/aaaa


SCRIPT_NAME
/aa.php


PATH_INFO
/aaaa


PATH_TRANSLATED
/usr/local/apache-1.3.24/htdocs/aaaa


HTTP Headers Information


HTTP Request Headers


HTTP Request
GET /aa.php/aaaa HTTP/1.1


Accept
text/*, image/jpeg, image/png, image/*, */*


Accept-Charset
Any, utf-8, *


Accept-Encoding
x-gzip, gzip, identity


Accept-Language
en, en_US


Cache-control
no-cache


Connection
Keep-Alive


Host
localhost


Pragma
no-cache


User-Agent
Mozilla/5.0 (compatible; Konqueror/2.2-11; Linux)


HTTP Response Headers


X-Powered-By
PHP/4.2.0


Keep-Alive
timeout=15, max=100


Connection
Keep-Alive


Transfer-Encoding
chunked


Content-Type
text/html


Additional Modules


Environment


Variable
Value


PWD
/usr/src/apache_1.3.24


HOSTNAME
netdot


PVM_RSH
/usr/bin/rsh


QTDIR
/usr/lib/qt-2.3.1


LESSOPEN
|/usr/bin/lesspipe.sh %s


XPVM_ROOT
/usr/share/pvm3/xpvm


KDEDIR
/usr


USER
root


LS_COLORS
no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:


MACHTYPE
i386-redhat-linux-gnu


KDE_MULTIHEAD
false


MAIL
/var/spool/mail/root


INPUTRC
/etc/inputrc


OLDPWD
/usr/src/apache_1.3.24/src


BASH_ENV
/root/.bashrc


GTK_RC_FILES
/etc/gtk/gtkrc:/root/.gtkrc


XMODIFIERS
@im=none


LANG
en_US


COLORTERM
?


DISPLAY
:0


LOGNAME
root


SHLVL
3


SESSION_MANAGER
local/netdot:/tmp/.ICE-unix/1325


SHELL
/bin/bash


USERNAME
root


HOSTTYPE
i386


QT_XFT
1


OSTYPE
linux-gnu


HISTSIZE
1000


LAMHELPFILE
/etc/lam/lam-helpfile


PVM_ROOT
/usr/share/pvm3


HOME
/root


TERM
xterm


SSH_ASKPASS
/usr/libexec/openssh/gnome-ssh-askpass


PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/root/bin


_
/usr/local/apache-1.3.24/bin/httpd


PHP Variables


Variable
Value


_SERVER["DOCUMENT_ROOT"]
/usr/local/apache-1.3.24/htdocs?


_SERVER["HTTP_ACCEPT"]
text/*, image/jpeg, image/png, image/*, */*?


_SERVER["HTTP_ACCEPT_CHARSET"]
Any, utf-8, *?


_SERVER["HTTP_ACCEPT_ENCODING"]
x-gzip, gzip, identity?


_SERVER["HTTP_ACCEPT_LANGUAGE"]
en, en_US?


_SERVER["HTTP_CACHE_CONTROL"]
no-cache?


_SERVER["HTTP_CONNECTION"]
Keep-Alive?


_SERVER["HTTP_HOST"]
localhost?


_SERVER["HTTP_PRAGMA"]
no-cache?


_SERVER["HTTP_USER_AGENT"]
Mozilla/5.0 (compatible; Konqueror/2.2-11; Linux)?


_SERVER["PATH"]
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/root/bin?


_SERVER["REMOTE_ADDR"]
127.0.0.1?


_SERVER["REMOTE_PORT"]
32913?


_SERVER["SCRIPT_FILENAME"]
/usr/local/apache-1.3.24/htdocs/aa.php?


_SERVER["SERVER_ADDR"]
127.0.0.1?


_SERVER["SERVER_ADMIN"]
root@netdot.corp.nateng.com?


_SERVER["SERVER_NAME"]
127.0.0.1?


_SERVER["SERVER_PORT"]
80?


_SERVER["SERVER_SIGNATURE"]
<ADDRESS>Apache/1.3.24 Server at 127.0.0.1 Port 80</ADDRESS>
?


_SERVER["SERVER_SOFTWARE"]
Apache/1.3.24 (Unix) PHP/4.2.0?


_SERVER["GATEWAY_INTERFACE"]
CGI/1.1?


_SERVER["SERVER_PROTOCOL"]
HTTP/1.1?


_SERVER["REQUEST_METHOD"]
GET?


_SERVER["QUERY_STRING"]
?


_SERVER["REQUEST_URI"]
/aa.php/aaaa?


_SERVER["SCRIPT_NAME"]
/aa.php?


_SERVER["PATH_INFO"]
/aaaa?


_SERVER["PATH_TRANSLATED"]
/usr/local/apache-1.3.24/htdocs/aaaa?


_SERVER["PHP_SELF"]
/aa.php/aaaa?


_SERVER["argv"]

Array
(
)
?


_SERVER["argc"]
0?


_ENV["PWD"]
/usr/src/apache_1.3.24?


_ENV["HOSTNAME"]
netdot?


_ENV["PVM_RSH"]
/usr/bin/rsh?


_ENV["QTDIR"]
/usr/lib/qt-2.3.1?


_ENV["LESSOPEN"]
|/usr/bin/lesspipe.sh %s?


_ENV["XPVM_ROOT"]
/usr/share/pvm3/xpvm?


_ENV["KDEDIR"]
/usr?


_ENV["USER"]
root?


_ENV["LS_COLORS"]
no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:?


_ENV["MACHTYPE"]
i386-redhat-linux-gnu?


_ENV["KDE_MULTIHEAD"]
false?


_ENV["MAIL"]
/var/spool/mail/root?


_ENV["INPUTRC"]
/etc/inputrc?


_ENV["OLDPWD"]
/usr/src/apache_1.3.24/src?


_ENV["BASH_ENV"]
/root/.bashrc?


_ENV["GTK_RC_FILES"]
/etc/gtk/gtkrc:/root/.gtkrc?


_ENV["XMODIFIERS"]
@im=none?


_ENV["LANG"]
en_US?


_ENV["COLORTERM"]
?


_ENV["DISPLAY"]
:0?


_ENV["LOGNAME"]
root?


_ENV["SHLVL"]
3?


_ENV["SESSION_MANAGER"]
local/netdot:/tmp/.ICE-unix/1325?


_ENV["SHELL"]
/bin/bash?


_ENV["USERNAME"]
root?


_ENV["HOSTTYPE"]
i386?


_ENV["QT_XFT"]
1?


_ENV["OSTYPE"]
linux-gnu?


_ENV["HISTSIZE"]
1000?


_ENV["LAMHELPFILE"]
/etc/lam/lam-helpfile?


_ENV["PVM_ROOT"]
/usr/share/pvm3?


_ENV["HOME"]
/root?


_ENV["TERM"]
xterm?


_ENV["SSH_ASKPASS"]
/usr/libexec/openssh/gnome-ssh-askpass?


_ENV["PATH"]
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/root/bin?


_ENV["_"]
/usr/local/apache-1.3.24/bin/httpd?


PHP License




 This program is free software; you can redistribute it and/or 
modify it under the terms of the PHP License as published by 
the PHP Group and included in the distribution in the file: 
LICENSE 

This program is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

If you did not receive a copy of the PHP license, or have any 
questions about PHP licensing, please contact license@php.net. 




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-28 20:40 UTC] sniper@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-07-15 22:35 UTC] phpbugs at mattholland dot com
Okay, this isn't a support question, it's a BUG REPORT. Just like the previous user reported, $PATH_INFO is not accessible when using PHP in CGI mode.

Platform: Linux
PHP Version: 4.2.1
compile flags: ./configure' '--with-zlib=/usr' '--enable-force-cgi-redirect' '--prefix=/home/webpageweaver/usr/local' '--with-config-file-path=/home/webpageweaver/etc/' '--with-mysql' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-curl=/home/webpageweaver/usr/local/' '--enable-trans-sid'

User Experience: 
1) Create test script, e.g. pathinfo.pl in Perl.
2) access script as http://servername/cgi-bin/pathinfo.pl/more/path/stuff
3) see value of $PATH_INFO echoed back in webpage as /more/path/stuff
4) create test script, e.g. pathinfo.php in PHP
5) access script as http://servername/cgi-bin/pathinfo.php/more/path/stuff
6) see webserver generate 500 error
7) move php pathinfo test script out of cgi-bin directory, verify that php scripts are working in this new directory
8) access script as http://servername/newdir/pathinfo.php
9) see webserver generate 500 error

Seems like a non-Bogus issue to me.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC