Bug 73616 - --enable-discard-path kills standard CGI php
Summary: --enable-discard-path kills standard CGI php
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-09-06 19:28 UTC by dharris
Modified: 2007-04-18 16:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-08 15:45:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description dharris 2002-09-06 19:28:20 UTC
Description of Problem:

The php package now has the --enable-discard-path configuration option which 
breaks this Apache configuration for running php scripts through CGI:

AddType handler/x-script-php .php
Action  handler/x-script-php /cgi-bin/php

When called this way with --enable-discard-path, php tries to interpret its own 
binary instead of the php script when.

The --enable-discard-path causes php to ignore the PATH_INFO and 
PATH_TRANSLATED info from Apache. It is designed for hash-bang 
("#!/usr/bin/php") running of php scripts.

Version-Release number of selected component (if applicable):


(I had been using php-4.0.6-15 which was --enable-discard-path free.)

How Reproducible:


Steps to Reproduce:
1. Install php-4.1.2-7.2.4
2. Setup apache CGI php with above AddType and Action directives.
3. Create test php file in document root.
4. Request test php file.

Actual Results:

Warning: Unexpected character in input: ' ' (ASCII=4) state=1 in /usr/bin/php 
on line 7026
Warning: Unexpected character in input: ' in /usr/bin/php on line 7027
Warning: Unexpected character in input: ' ' (ASCII=4) state=1 in /usr/bin/php 
on line 7027
Warning: Unexpected character in input: ' ' (ASCII=4) state=1 in /usr/bin/php 
on line 7028
Warning: Unexpected character in input: ' ' (ASCII=28) state=1 in /usr/bin/php 
on line 7029
Parse error: parse error in /usr/bin/php on line 7029

Expected Results:

"hello world"

Additional information:

Others are having this problem too and concluding "don't use the RedHat php 


Comment 1 Bill Nottingham 2006-08-07 19:46:56 UTC
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at

Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.

Comment 2 dharris 2006-08-08 15:45:09 UTC
There is a 99.9% chance that this has been resolved in Fedora Core.

Note You need to log in before you can comment on or make changes to this bug.