Author Topic: What is this error?  (Read 3621 times)

Offline mattfox27

  • Jr. Member
  • **
  • Posts: 53
What is this error?
« 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?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
What is this error?
« Reply #1 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.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
imap error
« Reply #2 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.

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
What is this error?
« Reply #3 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.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
What is this error?
« Reply #4 on: April 24, 2011, 10:23:13 AM »
Contact developer.

Roundcube plugins

The plugin has not been maintained since ages.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Easy fix
« Reply #5 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.