php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24000 Apache Location/ForceType works with 4.3.2 RC4, but not with 4.3.2 FINAL !
Submitted: 2003-06-03 15:50 UTC Modified: 2003-06-03 16:58 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: daniel dot weck at free dot fr Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 4.3.2 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel dot weck at free dot fr
New email:
PHP Version: OS:

 

 [2003-06-03 15:50 UTC] daniel dot weck at free dot fr
IMPORTANT:
I have no problem with [PHP 4.3.2 RC4],
the bug only appears with [PHP 4.3.2 final]

I'm using the binary distribution of PHP for Windows,
along with Apache 2.0.46.
PHP is configured as CGI (not apache module) in httpd.conf.
So I use the CGI php.exe from the official PHP distribution.

I'm using the hilighting feature explained at:
http://fr.php.net/function.highlight-file
(Example 1. Creating a source highlighting URL)

Using PHP 4.3.2RC4, the example works fine,
but when I use the PHP 4.3.2 binaries (keeping the same php.ini, just overriding the binaries), I get this in my browser:

No input file specified.


I traced getenv("PATH_TRANSLATED") and it seems to be the source of the problem:


The following URL:
### http://localhost/source

generates an empty PATH_TRANSLATED with 4.3.2 RC4,
whereas 4.3.2 final generates this value:
[E:\www\source]
(which is the correct location on my file system)

The following URL:
### http://localhost/source/info.phps

generates this PATH_TRANSLATED with 4.3.2 RC4:
[E:/www/info.phps]
(which is the correct location on my file system)

whereas 4.3.2 final gives me the "No input file specified." message.

In fact,
### http://localhost/source/
(note the added '/' at the end)
returns PATH_TRANSLATED = [E:\www\source\]
(with the added '\' at the end)

and
### http://localhost/source/xxxxxxxx
with 'xxxxxxxx' that can be any phrase
returns "No input file specified."


According to these tests,
PHP 4.3.2FINAL differs from 4.3.2RC4
when it generates the PATH_TRANSLATED environement value.

I suspect the observed bug when using the basic hilighting script as discribded in the manual
(http://fr.php.net/function.highlight-file)
is related to the PATH_TRANSLATED issue.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-03 16:58 UTC] edink@php.net
The default value for cgi.fix_pathinfo has changed. Set it to 1 and it will work.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Dec 04 18:01:23 2020 UTC