php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22165 output inside custom error handling function doubles.
Submitted: 2003-02-11 05:47 UTC Modified: 2003-02-20 08:15 UTC
Votes:3
Avg. Score:2.7 ± 1.2
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: congo at justnet dot lt Assigned:
Status: No Feedback Package: Output Control
PHP Version: 4.3.0 OS: 4.7-STABLE FreeBSD
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: congo at justnet dot lt
New email:
PHP Version: OS:

 

 [2003-02-11 05:47 UTC] congo at justnet dot lt
It seems that PHP versions 4.3.0 and 4.2.3 (mod_php) doubles output buffer inside cusom error handling function.
Let's take simple error handling script:
<?php
function error_handler($errno, $errstr, $errfile, $errline,$errcontext)
{
  echo "123";
  echo "abc";
}

set_error_handler('error_handler');
pg_query('asdf'); // let's trigger error;
?>

I get output "123abc123abc".
Testet on serveral servers/configurations.

my compile options:
Configure Command  './configure' '--with-apxs=/usr/local/sbin/apxs' '--with-config-file-path=/usr/local/etc' '--enable-versioning' '--with-regex=system' '--without-gd' '--without-mysql' '--with-gd=/usr/local' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-bz2=/usr' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local' '--with-pdflib=/usr/local' '--with-zlib-dir=/usr' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-tiff-dir=/usr/local' '--with-mysql=/usr/local' '--with-pgsql=/usr/local' '--with-openssl=/usr' '--with-snmp=/usr/local' '--enable-ucd-snmp-hack' '--with-openssl=/usr' '--with-expat-dir=/usr/local' '--with-xmlrpc' '--enable-ftp' '--with-curl=/usr/local' '--with-gettext=/usr/local' '--enable-sockets' '--enable-trans-sid' '--with-iconv=/usr/local' '--prefix=/usr/local' 'i386-portbld-freebsd4.7'

flushing buffer before/after triggering error or before/after the err handling ouput doesn't help.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-11 09:59 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2003-02-11 14:18 UTC] why2liz at php dot lt
it's no bug.

Some errors have more than 1 error.

example

if error will be in this line:

include('badfilename.blabla');

so be 2 error's.:
1.
main(badfilename.blabla) [function.main]: failed to create stream: No such file or directory
2.
main() [function.main]: Failed opening 'badfilename.blabla' for inclusion (include_path='.;c:\php4\pear')

because it's warning type error, so every time error apears.
example.
join('', 'sting is mine');

will be only one.
 [2003-02-11 15:23 UTC] sniper@php.net
I don't have pgsql compiled right now..but does
it output 2 errors? why2liz@php.lt is right about
the include() error, it does output 2 errors..

 [2003-02-20 08:15 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC