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

mehist’s picture

Title: Toruble with imap_open command » Trouble with imap_open command
oadaeh’s picture

No, your change will not cause any problems. I wonder, however, if you're getting that error, which version of PHP are you using?

oadaeh’s picture

Status: Needs review » Active
mehist’s picture

The 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?

oadaeh’s picture

Sorry 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.

oadaeh’s picture

Status: Active » Closed (won't fix)

Closing out old issues.