Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: mattfox27 on September 30, 2010, 01:58:53 AM

Title: What is this error?
Post by: mattfox27 on September 30, 2010, 01:58:53 AM
Quote
IMAP Error: rcube::imap_init(true) is deprecated, use rcube::imap_connect() instead in C:\Inetpub\wwwroot\Mail\program\include\rcmail.php on line 0 (GET /mail/?_task=settings&_action=plugin.serverinfo)
It keeps showing up in my error log...Also serverinfo plugin is not showing used storage amount.  Does it have anything to do with the above error?
Title: What is this error?
Post by: rosali on September 30, 2010, 02:15:12 AM
Most likely a plugin is using a deprecated method. Query in the plugins folder for 'imap_init' to narrow the issue.
Title: imap error
Post by: billstif on April 22, 2011, 11:46:46 PM
The error is in the plugin serverinfo:

[22-Apr-2011 21:41:18 -0600]: IMAP Error: rcube::imap_init(true) is deprecated, use rcube::imap_connect() instead in [removed]ublic_html/mail/program/include/rcmail.php on line 525 (GET /mail/?_task=settings&_action=plugin.serverinfo)
[22-Apr-2011 21:41:18 -0600]: IMAP Error: rcube::imap_init(true) is deprecated, use rcube::imap_connect() instead in [removed]public_html/mail/program/include/rcmail.php on line 525 (GET /mail/?_task=settings&_action=plugin.serverinfo)

Has the serverinfo plugin been patched to fix this error?  I tried using the recube::imap_connect() line in place of the existing lines.  I could not get it working.
Title: What is this error?
Post by: billstif on April 22, 2011, 11:51:43 PM
These are the problem lines in the serverinfo plugin:

      if ($this->config['enable_quota']) {
      
         // inialize IMAP to get quota info
         $rcmail->imap_init(true);          
                              $imap = $rcmail->imap;      

         $quota = $imap->get_quota();

   // If we found quota nfo, add table rows
   if (quota) {
   $quotatotal = show_bytes($quota['total'] * 1024);
   $quotaused = show_bytes($quota['used'] * 1024) . ' (' . $quota['percent'] . '%)';

   if ($quota && ($quota['total']==0 && $rcmail->config->get('quota_zero_as_unlimited'))) {
      $quotatotal = 'unlimited';
      }

I lost the original spacing on the above in copying the lines here.
Title: What is this error?
Post by: rosali on April 24, 2011, 10:23:13 AM
Contact developer.

Roundcube plugins (http://axel.sjostedt.no/misc/dev/roundcube/)

The plugin has not been maintained since ages.
Title: Easy fix
Post by: billstif on April 24, 2011, 02:29:00 PM
The fix should have been obvious to me since the error log was explaining if I had the wit to see it.  :o

To fix this error, search the serverinfo plugin.

Replace imap_init with imap_connect

The plugin will then work.