PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
impulse()
Forum Regular
Posts: 748 Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:
Post
by impulse() » Fri Nov 24, 2006 9:54 am
Hello.
I have the following code:
Code: Select all
$mbox = imap_open("{x:110/pop3}INBOX", "x", "x");
$body = imap_body($mbox, 1);
print $body;
imap_close($mbox);
If I run this script from a shell I can view the contents of the body for the e-mail but if I run this through a browser I get no HTML returned. If I echo a step number for each line of code it seems to stop printing output on the line
Code: Select all
$mbox = imap_open("{x:110/pop3}INBOX", "x", "x");
Can anyone shed some light on to what's going wrong here?
Regards,
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Fri Nov 24, 2006 10:19 am
The CLI binary has been compiled with IMAP support whereas the CGI or .so version has not?
EDIT | Trun on full error reporting if it's not already on.
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Fri Nov 24, 2006 11:33 am
d11wtq wrote: EDIT | Trun on full error reporting if it's not already on.
And add a test wether the imap extension is available or not
Code: Select all
error_reporting(E_ALL);
ini_set('display_errors', true);
if ( !extension_loaded('imap') ) {
die('imap extension not present');
}
$mbox = imap_open("{x:110/pop3}INBOX", "x", "x") or die('imap_open failed');
$body = imap_body($mbox, 1);
print $body;
imap_close($mbox);
impulse()
Forum Regular
Posts: 748 Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:
Post
by impulse() » Fri Nov 24, 2006 11:40 am
imap extension not present
Is this server or client side?
** Edit
^ Stupid question I know. I'll have a look into installing the imap extensions.
Regards,