Page 1 of 1

IMAP script Problems: won't load in browser

Posted: Sat Dec 11, 2004 8:03 pm
by zimick7
I am trying to write a script for basic e-mail functions... reading, writing, etc.

I have found that when I write even an extremely simple script using imap function such as...

Code: Select all

<?php

$mbox = imap_open("{mail.retrospection.net:110}", "myusername", "mypassword");
imap_close($mbox);

?>
the script will not load in my browser. IE for OS X gives an error such as, "The attempt to load 'Accessing URL: http://www.retrospection.net/phpstuff/mail' failed."

I have tried to figure this out, but I am not making in progress. It baffles me that there are no errors such as parse error given by php, the browser just will not load it at all! Any suggestions?

Posted: Sat Dec 11, 2004 8:23 pm
by timvw
use:

Code: Select all

error_reporting(E_ALL);
my guess is that the imap module is not loaded.

Posted: Sat Dec 11, 2004 8:28 pm
by zimick7
tried to add

error_reporting(E_ALL);

to my code and I am still having the same problems...
I have done a phpinfo() check and it says...

imap
IMAP c-Client Version 2001
SSL Support enabled
Kerberos Support enabled


Doesn't that mean that it is installed/loaded?

Posted: Sat Dec 11, 2004 8:38 pm
by timvw
well, you are trying to connect to a pop3 server...

Code: Select all

$mbox = imap_open("{mail.retrospection.net:110/service=pop3}", "myusername", "mypassword");

Posted: Sat Dec 11, 2004 8:53 pm
by zimick7
timvw wrote:well, you are trying to connect to a pop3 server...

Code: Select all

$mbox = imap_open("{mail.retrospection.net:110/service=pop3}", "myusername", "mypassword");
I have tried many varients of the imap_open function including that one, but still I am having no luck. I am still getting the same error in IE for OS X. In FireFox (my default browser), all it does is reload the last page visited. (example... if I was on http://www.google.com and then loaded http://www.retrospection.net/phpstuff/mail , it would just load google. (try it for yourself if you would like)

Any other thoughts or suggestions?

Posted: Sat Dec 11, 2004 9:06 pm
by timvw
all i can say there is something different wrong with your code....

because here the imap_open definitely works....