php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33053 @imap_open shows errors
Submitted: 2005-05-18 12:57 UTC Modified: 2005-05-19 08:16 UTC
From: cajus at naasa dot net Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.3.10 OS: Debian GNU/Linux Sarge
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: cajus at naasa dot net
New email:
PHP Version: OS:

 

 [2005-05-18 12:57 UTC] cajus at naasa dot net
Description:
------------
When connecting IMAP servers via imap_open, I'm hiding 
messages. This doesn't not work for imap_open, neither with 
error_reporting(0), nor with @.

Reproduce code:
---------------
$mbox = @imap_open($cfg['connect'], $admin, $password, OP_HALFOPEN);

Expected result:
----------------
No output

Actual result:
--------------
Notice: (null)(): Connection failed to vserver-02.test.net,
143: Connection refused (errflg=2) in Unknown on line 0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-19 00:32 UTC] iliaa@php.net
Is error logging enabled and if so can PHP write to the error log file?
 [2005-05-19 07:10 UTC] cajus at naasa dot net
In Debian, log_errors seems to be set to Off by default. 
     
I've noticed that defining a dummy error handler before    
hides the message - but this is no real solution:    
 
8<------------------------------------------   
function eh($errno, $errstr, $errfile, $errline) {}   
 
... 
$tmp= set_error_handler('eh'); 
$mbox = @imap_open($c, $a, $p, OP_HALFOPEN); 
set_error_handler($tmp); 
...   
8<------------------------------------------
 [2005-05-19 08:16 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #33039

(same issue..)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 17:01:29 2024 UTC