php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39259 imap_delete argument is not a valid imap resource
Submitted: 2006-10-26 00:29 UTC Modified: 2006-10-26 17:04 UTC
From: mark at runryder dot com Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 5CVS-2006-10-25 (snap) OS: Linux 2.6.11.4-21.14-bigsmp
Private report: No CVE-ID: None
 [2006-10-26 00:29 UTC] mark at runryder dot com
Description:
------------
I have over a man week invested trouble shooting this with no luck. Now using the latest of everything. 

Works: $mBox=imap_open('{localhost:143}INBOX','username','password',CL_EXPUNGE);
Works: $check=imap_check($mBox);
Works: $header=imap_fetchheader($mBox,1);
Error: imap_delete($mbox,1);
Error: imap_close($mbox);

Error: [25-Oct-2006 16:27:04] PHP Warning:  imap_delete(): supplied argument is not a valid imap resource in /rr1/lib/readMail.dat on line 6
Error: [25-Oct-2006 16:27:04] PHP Warning:  imap_close(): supplied argument is not a valid imap resource in /rr1/lib/readMail.dat on line 7

wget http://snaps.php.net/php5.2-200610251830.tar.bz2

Configure Command  './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--without-sqlite' '--enable-mbstring' '--without-pear' '--with-zlib' '--with-gd' '--with-jpeg-dir=/usr/lib/' '--with-png-dir=/usr/lib/' '--with-freetype-dir=/usr/lib/' '--enable-gd-native-ttf' '--with-imap=/usr/local/imap-2006c/' '--with-imap-ssl'


Reproduce code:
---------------
<%
$mBox=imap_open('{localhost:143}INBOX','username','password',CL_EXPUNGE);
$check=imap_check($mBox);
$header=imap_fetchheader($mBox,1);
$delete=imap_delete($mbox,1);
$close=imap_close($mbox);
%>


Expected result:
----------------
Message 1 deleted

Actual result:
--------------
Nothing except the error:

Error: [25-Oct-2006 16:27:04] PHP Warning:  imap_delete(): supplied argument is not a valid imap resource in /rr1/lib/readMail.dat on line 6


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-26 09:14 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

$mBox=imap_open(..);
$close=imap_close($mbox);

$mbox != $mBox
 [2006-10-26 17:04 UTC] mark at runryder dot com
How embarrassing for my first bug report.
Thanks for pointing out that I do not equal. :)
== Case Closed ==
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 10:01:28 2024 UTC