Fatal error: Call to undefined function: imap_open() in xxxx
I have found many occurances of this problem through Google but no resolution. Basically my script is returning the above fatal error which says to me that IMAP is not installed, which is the same opinion of most other programmers around the Net. However IMAP is installed - I even have SquirrelMail, Horde IMP & NeoMail installed on the server...all working fine.
Anyone have any other ideas as to why this doesn't work?
The code is below, a sample script from the php.net site.
PHP Code:
$mbox = imap_open ("{mail.farstate.com:143}", "farcom", "firestor");
echo "<p><h1>Mailboxes</h1>\n";
$folders = imap_listmailbox ($mbox, "{your.imap.host:143}", "*");
if ($folders == false) {
echo "Call failed<br>\n";
} else {
while (list ($key, $val) = each ($folders)) {
echo $val."<br>\n";
}
}
echo "<p><h1>Headers in INBOX</h1>\n";
$headers = imap_headers ($mbox);
if ($headers == false) {
echo "Call failed<br>\n";
} else {
while (list ($key,$val) = each ($headers)) {
echo $val."<br>\n";
}
}
imap_close($mbox);