Description of problem: The mail_search_full function always returns false. I'm using an implementation of the libc-client library in php-imap. I have reported the bug at php.net, but have been advised that the bug lies in this library and should report it to the operating system. Version-Release number of selected component (if applicable): 2002e How reproducible: <pre> <?php ini_set('display_errors','On'); error_reporting(E_ALL); include 'settings.php'; //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()); Actual results: imap_mailboxmsginfo->Nmsgs int(981) imap_search ALL bool(false) imap_alerts bool(false) imap_errors bool(false) Expected results: imap_search should return an array of message numbers or UIDs. If it failed, there should be an error in imap_last_error().
I have the same issue with my SugarCRM. Mailbox Nmsgs returns a positive integer and imap_search always returns false.
I updated my php version from 5.2.10 to 5.3. Now everything is going smoothly..
I was under the impression that the problem was in the library not PHP itself. The version of PHP the stream is giving me is currently PHP 5.2.13, what method did you use to install 5.3?
You have to upgrade PHP 5.3.4 using YUM. You can get as many third party repositories from internet. From the downloaded repository, make sure that you update PHP and Mysql alone, to avoid conflict.
Which repository did you find to work successfully for RHEL4? I see it in the remi repository.
My OS version is CentOS 5.3. In my case, remi repository worked out for me. Give yourself a try, hope it will work. As far as my research, which lasted for 2 weeks, imap_searh() will work from PHP 5.2.2 or above.
============================================================================= Package Arch Version Repository Size ============================================================================= Updating: php i386 5.3.4-1.el4.remi remi 1.3 M php-cli i386 5.3.4-1.el4.remi remi 2.5 M php-common i386 5.3.4-1.el4.remi remi 957 k php-devel i386 5.3.4-1.el4.remi remi 612 k php-gd i386 5.3.4-1.el4.remi remi 194 k php-imap i386 5.3.4-1.el4.remi remi 81 k php-ldap i386 5.3.4-1.el4.remi remi 51 k php-mbstring i386 5.3.4-1.el4.remi remi 2.3 M php-mcrypt i386 5.3.4-1.el4.remi remi 43 k php-mysql i386 5.3.4-1.el4.remi remi 144 k php-odbc i386 5.3.4-1.el4.remi remi 79 k php-pdo i386 5.3.4-1.el4.remi remi 110 k php-pear noarch 1:1.9.1-6.el4.remi remi 432 k php-soap i386 5.3.4-1.el4.remi remi 277 k php-xml i386 5.3.4-1.el4.remi remi 206 k Installing for dependencies: libedit i386 2.11-1.20080712cvs.el4.remi remi 69 k mysqlclient15 i386 5.0.67-1.el4.remi remi 1.3 M Updating for dependencies: mysql i386 5.1.54-1.el4.remi remi 1.0 M mysql-libs i386 5.1.54-1.el4.remi remi 1.7 M mysql-server i386 5.1.54-1.el4.remi remi 9.8 M ... It does indeed update php-imap, but not libc-client. Here's the results: PHP 5.3.4 imap_mailboxmsginfo->Nmsgs int(10) imap_search ALL bool(false) imap_alerts bool(false) imap_errors bool(false) ... There has been no change by upgrading to the latest version of PHP. I propose that the problem may still be in the libc-client library.
Did you restart the httpd service?
Yes. It is displaying the version as 5.3.4 as per above. I did not include the original version as I did not deem it relevant to the issue that I reported. This is because the issue appears to be in the library, not PHP, or at least that would be my conclusion. Any further feedback would be useful.
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. Please See https://access.redhat.com/support/policy/updates/errata/ If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1168922