Click to See Complete Forum and Search --> : imap_open !!


goon12
04-08-2002, 10:47 PM
Ok I have PHP 4 installed and everything has been working great so far. Now I am sending mail fine from the website, just trying to get mail is a problem. I haven't got very far because I am getting this error:
Fatal error: Call to undefined function: imap_open() in /netshare/website/check_mail.php on line 15


Why wouldnt that function be installed? Is there someway I can get it with out re-installing php4?? Here is the actual code for the page...

$username = "xxxxx";
$password = "xxxxx";

$mailserver = "{www.xxxxx.com/imap}";
$link = imap_open($mailserver, $username, $password);
$headers = imap_headers($link);

for ($x=1; x <= count($headers); $x++)
{
$idx = $x-1;
echo("Header: " . $headers[$idx] . "<br>");
}



Thanks,
goon12

[ 08 April 2002: Message edited by: goon12 ]

goon12
04-09-2002, 11:05 AM
Here are the loaded modules. I got these from the phpinfo() function:
mod_php4, mod_setenvif, mod_so, mod_auth, mod_access, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core

[ 09 April 2002: Message edited by: goon12 ]

[ 09 April 2002: Message edited by: goon12 ]

freebsd
04-10-2002, 03:56 AM
>> Is there someway I can get it with out re-installing php4?

No way and you MUST recompile php4 and enable imap.

>> mod_imap

That's for server-side imagemap (http://httpd.apache.org/docs/mod/mod_imap.html).

goon12
04-10-2002, 09:32 AM
Yeah, sorry about that. I got it working, I used my same config as before line with "--with-imap=/path/to/imap" and it worked like a charm.

Thanks,
goon12