From:             osw at ld dot pages dot de
Operating system: Linux (SuSE 8.0)
PHP version:      4.3.0
PHP Bug Type:     Apache2 related
Bug description:  Execute Bit and XBitHack seems to breaks PHP

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 bug report at http://bugs.php.net/?id=22321&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22321&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22321&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22321&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22321&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22321&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22321&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22321&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22321&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22321&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22321&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22321&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22321&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22321&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22321&r=gnused

Reply via email to