Hi,

it might very well be an ignorant oversight, but I can't explain the following 
behaviour. Consider a file containing -only- this code:

-snip-
<?

?>
-snip-

As you can see, it doesn't do anything. It should return an empty file. However, 
what it does return is the following (copy/paste from telnet.exe):

-snip-
HTTP/1.1 500 Internal Server Error
Date: Sun, 28 Apr 2002 17:32:45 GMT
Server: Apache/2.0.35 (Win32) PHP/4.2.0
Accept-Ranges: bytes
X-Powered-By: PHP/4.1.0
Content-Length: 0
Connection: close
Content-Type: text/html; charset=ISO-8859-1



Connection to host lost.
-snip-

Evidently, Apache reports an error 500, however error.log doesn't show anything, 
access.log reports a successful access ("127.0.0.1 - - [28/Apr/2002:19:34:10 +
0100] "GET /test2.php HTTP/1.1" - 0"). Note that the X-Powered-By reports 
PHP/4.1.0 while the server info says (correctly) 4.2.0. That's probably a simple 
oversight, and I assume has been reported before.

Furthermore, with three different browsers, I get three different kind of 
behaviours. Opera 6.0 apparently just sits there waiting for incoming data 
("Completed request to 127.0.0.1"). Mozilla 0.9.9 displays an empty white page, 
viewing the source displays "<html><body></body></html>", which I assume Mozilla 
automatically added when receiving an empty file. MSIE 6.0, finally, displays a 
standard "The page cannot be displayed" error message, signifying an error 500 
at the bottom.
Further testing Opera reveals that this is "consistent" behaviour and not 
related to PHP, it also does this when trying to retrieve a 0b txt file, while 
the other browsers work fine.

I can do basically everything in the PHP code, calculate, database calls, 
writing to a log file - as long as an empty file is returned, it doesn't work. 

As already mentioned, I'm using Apache2 with the experimental PHP 4.2.0 module 
("LoadModule php4_module F:/Apache2/php/experimental/apache2filter.dll", I hope 
this is correct) on a Windows XP system. I do think I had a similar behaviour on 
Apache 1.3, though, but I didn't really test it on that platform.

I stumbled on this problem when trying to redirect using a Location header 
directive, as in:

-snip-
<?
$redirect = TRUE;
 
if ($redirect) 
{
        header("Location: http://www.php.net";);
        exit;
}
else
{
        echo "No redirection for you!\n";
}
?>
-snip-

If $redirect is set to TRUE, the behavious describes above occurs, if set to 
FALSE the echo works as expected. Similarily, all my other scripts, by and 
large, seem to work fine.

I hope the solution isn't too obvious, and thanks in advance,

Moritz



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to