Bug 73616 - --enable-discard-path kills standard CGI php
--enable-discard-path kills standard CGI php
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
7.2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-06 15:28 EDT by dharris
Modified: 2007-04-18 12:46 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description dharris 2002-09-06 15:28:20 EDT
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):

php-4.1.2-7.2.4

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

How Reproducible:

Always.

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 
package":

http://lists.dmsolutions.ca/pipermail/maplab-users/2002-July/000156.html
Comment 1 Bill Nottingham 2006-08-07 15:46:56 EDT
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
http://www.redhat.com/rhel/migrate/redhatlinux/.

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 11:45:09 EDT
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.