ID:               37481
 User updated by:  phpbugs at thequod dot de
 Reported By:      phpbugs at thequod dot de
-Status:           Bogus
+Status:           Open
 Bug Type:         CGI related
 Operating System: Ubuntu Linux
 PHP Version:      5CVS-2006-05-17 (CVS)
 New Comment:

Apache does not attach the "in FILE on LINE" to the error 
PHP creates!

Re: "mod_fastcgi logs FastCGI application error (stderr) 
output to the server log associated with the request. 
Errors reported by the FastCGI process manager, fcgi-pm, 
are reported to the main server log (typically, 
logs/error_log). Data written to stdout or stderr before 
entering the FastCGI accept loop or via a mechanism that 
is not FastCGI protocol aware will also be directed to the 
main server log." 
(http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html)
it seems that the "memory exhausted" error is "Data 
written to stdout or stderr before entering the FastCGI 
accept loop or via a mechanism that is not FastCGI 
protocol aware".

I also don't see any reason why mod_php would 
display/deliver the page that has been processed/created 
before this error, but the php-fastcgi returns an invalid 
response.


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

[2006-05-17 19:45:56] [EMAIL PROTECTED]

PHP has nothing to do with your web server logging utilities.

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

[2006-05-17 19:00:59] phpbugs at thequod dot de

I don't see why.

Additionally, as far as I remember, the behaviour is 
different with mod_php: the error gets displayed in the 
browser (with display_errors "on") and therefor probably 
also get logged into the virtual host's error log.

IMHO it's very confusing to just have the error, without 
any time, file or vhost information in the main error.log!

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

[2006-05-17 18:48:16] [EMAIL PROTECTED]

This is the way it works and this is expected.

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

[2006-05-17 18:34:50] phpbugs at thequod dot de

Description:
------------
If memory_limit gets reached, I get "Allowed memory size 
of XXX bytes exhausted (tried to allocate XXX bytes)" 
written to the server's main error log and 

[Wed May 17 20:22:26 2006] [error] [client XXX] 
(104)Connection reset by peer: FastCGI: comm with 
server "/var/www/XXX/php5-fcgi-starter" aborted: read 
failed
[Wed May 17 20:22:26 2006] [error] [client XXX] FastCGI: 
incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

into the virtual host's error log.

Reproduce code:
---------------
<?php
ini_set('memory_limit', '1M' );

$s = '';
while( 1 )
        $s .= 'foo';
?>


Expected result:
----------------
[Wed May 17 20:23:49 2006] [error] [client XXX] FastCGI: 
server "/var/www/XXX/php5-fcgi-starter" stderr: PHP Fatal 
error: Allowed memory size of XXX bytes exhausted (tried 
to allocate XXX bytes) in /var/www/XXX/web/index.php on 
line XXX


Actual result:
--------------
No entry about the exhausted memory in the virtual host's 
error log, but only in the main error log, _without_ any 
source file or line mentioned (which is the case with 
mod_php AFAIK)


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


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

Reply via email to