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
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.
There is a 99.9% chance that this has been resolved in Fedora Core.