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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC