From:             hm2k
Operating system: CentOS
PHP version:      5.3.3
Package:          IMAP related
Bug Type:         Bug
Bug description:imap_search 'ALL' always returns false

Description:
------------
An imap_search for all always seems to return false, even though the
mailbox Nmsgs returns a positive integer.

Test script:
---------------
<pre>

<?php



ini_set('display_errors','On');

error_reporting(E_ALL);



include 'settings.php';



//php version details

echo 'PHP '.phpversion()."\n";



//connect to mailbox

$stream=imap_open('{'.$host.'/imap/notls/norsh/novalidate-cert/readonly}INBOX',$user,$pass,OP_SILENT);

           

echo "imap_mailboxmsginfo->Nmsgs\n";

var_dump(imap_mailboxmsginfo($stream)->Nmsgs);

echo "\n";



$search='ALL';

echo "imap_search $search\n";

var_dump(imap_search($stream,$search)); //bool(false)

if (imap_last_error()) { echo 'Error: '.imap_last_error()."\n"; }

echo "\n";



echo "imap_alerts\n";

var_dump(imap_alerts());

echo "imap_errors\n";

var_dump(imap_errors());



Expected result:
----------------
imap_search should return an array of message numbers or UIDs.



If it failed, there should be an error in imap_last_error().

Actual result:
--------------
PHP 5.3.3

imap_mailboxmsginfo->Nmsgs

int(981)



imap_search ALL

bool(false)



imap_alerts

bool(false)

imap_errors

bool(false)



-- 
Edit bug report at http://bugs.php.net/bug.php?id=53375&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53375&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53375&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53375&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53375&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53375&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53375&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53375&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53375&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53375&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53375&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53375&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53375&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53375&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53375&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53375&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53375&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53375&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53375&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53375&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53375&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53375&r=mysqlcfg

Reply via email to