Hello,

using apache 2.2.4 we have these lines in our httpd.conf (among others of course):

AddType application/x-httpd-php .php
AddHandler server-parsed .html

This works generally fine: .php files are executed by the php interpreter and .html files processed by the SSI processor of apache.

Today a user informed us, that naming a file e.g. test.html.php results in an unexpected behaviour:

# telnet test.com 80
Trying 1.2.3.4...
Connected to test.com (1.2.3.4).
Escape character is '^]'.
GET /testcases/test.html.php HTTP/1.0
Host: test.com

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2008 15:07:32 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a
Accept-Ranges: bytes
Content-Length: 31
Connection: close
Content-Type: application/x-httpd-php

<?

print "Test";
sleep(20);

?>

On the one hand, apache is setting the content-type "application/x-httpd-php", but on the other hand, the script isn't passed to the php intepreter.

It also doesn't work the other way round (test.php.html):

# telnet test.com 80
Trying 1.2.3.4...
Connected to gotmilk.eu (1.2.3.4).
Escape character is '^]'.
GET /testcases/test.php.html HTTP/1.0
Host: test.com

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2008 15:19:56 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a
Accept-Ranges: bytes
Content-Length: 32
Connection: close
Content-Type: text/html

<?

print "Test";
sleep(20);

?>

Any ideas?

Regards
Marten

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to