php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28238 --enable-discard-path prevents PHP from being run as CGI with Apache
Submitted: 2004-04-30 19:24 UTC Modified: 2004-07-11 21:47 UTC
From: floeff at arcor dot de Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 4.3.6 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: floeff at arcor dot de
New email:
PHP Version: OS:

 

 [2004-04-30 19:24 UTC] floeff at arcor dot de
Description:
------------
It seems that --enable-discard-path prevents PHP from being run as CGI with Apache.

My configure options are as follows:
./configure --enable-safe-mode --with-mm --with-mysql --enable-discard-path --with-exec-dir --enable-memory-limit --enable-force-cgi-redirect

PHP has been enabled in Apache with these settings in httpd.conf:
<Directory /usr/local/bin>
<Files php>
Order allow,deny
Allow from all
</Files>
</Directory>
ScriptAlias /.php-script/ /usr/local/bin/
AddHandler php-script .php
Action php-script /.php-script/php

This does not work. I receive parse errors for ASCII characters, it seems that no PHP script is being parsed, but some binary data. As soon as I remove --enable-discard-path it works fine. I run Apache 2.0.49.

Seems to be related to Bug #18371.

Reproduce code:
---------------
<? phpinfo(); ?>
or any other PHP code.

Expected result:
----------------
Parse error.

Actual result:
--------------
Correct PHP output.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-11 21:47 UTC] sniper@php.net
You have misconfigured PHP for Apache as CGI.
Please ask further support questions on php-generals@lists.php.net

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 00:01:35 2025 UTC