ID:               22321
 Updated by:       [EMAIL PROTECTED]
 Reported By:      osw at ld dot pages dot de
 Status:           Open
 Bug Type:         Apache2 related
 Operating System: Linux (SuSE 8.0)
 PHP Version:      4.3.0
 New Comment:

This is not really an XBitHack scenario.  XBitHack is meant for
specifying text/html files as PHP files.  This would mean having an
.html file parsed as a PHP because the execute bit is set.

FWIW, #3 is not a bug.  That is correct behavior.  I'm not sure what
you expect to see for case #3.  xxx is not a method.

However, this should be resolved in the apache2handler SAPI in HEAD of
php5.  This new SAPI still needs to be merged back into 4.x.  It may
make it into 4.4 or later though.

(The apache2filter SAPI can't handle this case cleanly.)


Previous Comments:
------------------------------------------------------------------------

[2003-02-20 04:17:03] osw at ld dot pages dot de

Dear PHP-Developers!

I got a very, very strange problem with PHP 4.3.0, Apache 2.0.44  (see
typscript #3 below) and XBitHack on.

If I set the eXecute flag on PHP-parsed files (for example file with
ending .php) PHP don't work correctly any more:

Simple PHP scripts work perfectly (see typescript #2 below) but more
complex  don't work (the PHP code don't get parsed, see typescript #1
below).

In the httpd.conf I set the XBitHack to on. If I turn it off anything
works fine. Or if I remove the x bit from the files it works fine too.

So I'm not really sure whether this is an Apache problem or a PHP
problem.

Hoping it's a real bug and not just a problem with my installation.

Greetings and many thanks in advance,
Kai Seidler




Small typescript #1:

htdocs # cat test.php
<html>
<body>
<?
        echo "hello world!\n";
?>
</body>
</html>
htdocs # ls -l test.php
-rw-r--r--    1 root     root     60 Feb 20 10:55 test.php
htdocs # lynx -source -dump http://localhost/test.php
<html>
<body>
hello world!
</body>
</html>
htdocs # chmod a+x test.php
htdocs # lynx -source -dump http://localhost/test.php
<html>
<body>
<?
        echo "hello world!\n";
?>
</body>
</html>
htdocs # 



Small typescript #2:

htdocs # cat test2.php
<?
        echo "hello world!\n";
?>
htdocs # ls -l test2.php 
-rw-r--r--    1 root     root     30 Feb 20 11:01 test2.php
htdocs # lynx -source -dump http://localhost/test2.php
hello world!
htdocs # chmod a+x test2.php
htdocs # lynx -source -dump http://localhost/test2.php
hello world!
htdocs # 



Small typescript #3:

htdocs # telnet localhost 80
Trying ::1...
Connected to localhost.
Escape character is '^]'.
xxx
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Method Not Implemented</title>
</head><body>
<h1>Method Not Implemented</h1>
<p>xxx to /index.html not supported.<br />
</p>
<hr />
<address>Apache/2.0.44 (Unix) mod_perl/1.99_08 Perl/v5.8.0
mod_ssl/2.0.44 OpenSSL/0.9.7 PHP/4.3.0 DAV/2 Server at localhost Port
80</address>
</body></html>
Connection closed by foreign host.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22321&edit=1

Reply via email to