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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
43 - 7 = ?
Subscribe to this entry?

 
 [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: Sat May 04 05:01:30 2024 UTC