IMAP script Problems: won't load in browser

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

Post Reply
zimick7
Forum Newbie
Posts: 17
Joined: Mon Dec 06, 2004 2:11 pm

IMAP script Problems: won't load in browser

Post 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?
Last edited by zimick7 on Sat Dec 11, 2004 8:54 pm, edited 1 time in total.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

use:

Code: Select all

error_reporting(E_ALL);
my guess is that the imap module is not loaded.
zimick7
Forum Newbie
Posts: 17
Joined: Mon Dec 06, 2004 2:11 pm

Post 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?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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");
zimick7
Forum Newbie
Posts: 17
Joined: Mon Dec 06, 2004 2:11 pm

Post 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?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

all i can say there is something different wrong with your code....

because here the imap_open definitely works....
Post Reply