#48041 [Opn->Fbk]: no headers sent if output is blank
| From: | lbarnaud@php.net | Date: | Fri, 24 Apr 2009 13:38:23 +0000 |
| Subject: | #48041 [Opn->Fbk]: no headers sent if output is blank | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136205@lists.php.net to get a copy of this message | ||
ID: 48041
Updated by: lbarnaud@php.net
Reported By: mortals at seznam dot cz
-Status: Open
+Status: Feedback
Bug Type: *General Issues
Operating System: linux
PHP Version: 5.2.9
New Comment:
Both display_errors and log_errors are Off, please try enabling one of
them and check if you have any error. Please also check if you have any
differences compared to your 32bit setup (ini settings, fcgi module,
etc). Also check your apache error log with LogLevel set to debug,
eventually mod_fcgid logs, etc.
Previous Comments:
------------------------------------------------------------------------
[2009-04-24 13:00:44] mortals at seznam dot cz
output of /usr/local/php5latest/bin/php-cgi -i
http://www.korous.net/phpcgi_i.html
------------------------------------------------------------------------
[2009-04-24 11:53:19] lbarnaud@php.net
Could you please sent the output of the following command:
"/usr/local/php5latest/bin/php-cgi -i"
------------------------------------------------------------------------
[2009-04-24 08:37:05] mortals at seznam dot cz
ok, little more info for reproduce:
I am using distribution gentoo and fastcgi (fcgid), but I have try
minimal manually instalation without extensions:
./configure --prefix=/usr/local/php5latest --host=x86_64-pc-linux-gnu
--enable-cgi --enable-fastcgi --enable-force-cgi-redirect
--with-config-file-path=/etc/php/cgi-php5 --without-pear
/usr/local/php5latest/bin/php-cgi -v
PHP 5.2.10-dev (cgi-fcgi) (built: Apr 24 2009 10:06:17)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
in virtualhost is
<directory /home...>
FCGIWrapper /usr/local/php5latest/bin/php-cgi .php
</directory>
and still doesnt work.
I have added
echo $test; to example reproduce code and headers are
sent, without echo no headers.
I have make strace with output:
http://www.korous.net/strace-echo.txt
and without output:
http://www.korous.net/strace-noecho.txt
------------------------------------------------------------------------
[2009-04-23 16:13:21] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
I can not reproduce this on 3 servers (all being 64bit..)
------------------------------------------------------------------------
[2009-04-22 09:52:55] mortals at seznam dot cz
Description:
------------
no headers sent if output is blank on 64bit system (for example
redirection dont work). 5.2.9 on 32bit servers is ok.
Reproduce code:
---------------
<?
$test = 0;
?>
or
<?
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.example.com');
?>
Expected result:
----------------
telnet example.com 80
GET /test.php HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Date: Wed, 22 Apr 2009 09:23:11 GMT
Server: Apache
Cache-Control: max-age=7200
Expires: Wed, 22 Apr 2009 11:23:11 GMT
Content-Length: 0
Content-Type: text/html
Connection closed by foreign host.
Actual result:
--------------
telnet example.com 80
GET /test.php HTTP/1.1
Host: example.com
Connection closed by foreign host.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48041&edit=1