Closed (won't fix)
Project:
Basic webmail
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2011 at 16:26 UTC
Updated:
16 Apr 2013 at 23:55 UTC
After setting up with other username and pass it gave the error message
Wrong parameter count for imap_open() in /home/la02/16349134/web/modules/basic_webmail/basic_webmail.module on line 2547.
I'm new into coding, but I tried to learn a bit about the line 2547. The line states:
$imap_resource = imap_open($mailbox, $username, $password, 0, 1);
For me, removing the parameters 0 (options) and 1 (n_retries) fixed all problems and it started to work. Final line 2547:
$imap_resource = imap_open($mailbox, $username, $password);
As a rookie I just need to ask, could that screw up something?
Comments
Comment #1
mehist commentedComment #2
oadaeh commentedNo, your change will not cause any problems. I wonder, however, if you're getting that error, which version of PHP are you using?
Comment #3
oadaeh commentedComment #4
mehist commentedThe server runs on PHP 5.2.6, but I admit there's something odd about it. For example, Drupal7 says it's not high enough, although the requirement is PHP 5.2.5. Unfortunately, I am stuck with it due to the webhost.
But about the parameters, what do they mean? 0 means no extra options? And 1 for single retry?
Comment #5
oadaeh commentedSorry about not responding sooner. I should have replied when you sent your last post, but I was in the middle of something else (like I am now) and decided to save it until later. I just didn't expect it to be this later.
You are partly correct. The 0 does mean no options, but the 1 means "Number of maximum connect attempts" (according to http://us3.php.net/manual/en/function.imap-open.php). More information on what that really means may be found in this comment: http://us3.php.net/manual/en/function.imap-open.php#78097.
Comment #6
oadaeh commentedClosing out old issues.