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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 - 12 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Apr 25 21:01:36 2024 UTC