LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-17-2003, 11:29 AM   #1
costasm
Member
 
Registered: Dec 2002
Posts: 71

Rep: Reputation: 15
PHP/IMAP open error heartache.


When I execute the following to open a POP server I get an error.

$IP=gethostbyname("pop.mailserver.com");
$MAILSERVER="{" . "$IP:110/pop3" . "}INBOX";
$user="john@mydomain.com";
$pass="secret";
$mbox = @imap_open($MAILSERVER,$user,$pass);

---- Error message
Debug session started.
Debug Warning: /root/parsembox.php line 6 - Couldn't open stream {nnn.nnn.nnn.nnn:110/pop3}INBOX
----------------------------------

I am using RH9 and PHP 4.3. I tried different options like /nolst.

This server works using "telnet pop.mailserver.com 110" and entering user and pass.

Any ideas?

Thanks
 
Old 01-05-2004, 01:17 AM   #2
sashhoney
Member
 
Registered: Jul 2003
Distribution: Red Hat, Fedora, Debian
Posts: 85

Rep: Reputation: 15
try to connect using hostname only
dont use ipaddress for that
so just omit gethostbyname() function call and use ,
$MAILSERVER="{" . "$YOUR_HOST_NAME:110/pop3" . "}INBOX";
 
Old 04-08-2004, 04:06 PM   #3
LWillmann
Member
 
Registered: Oct 2003
Location: Middle Tennessee
Distribution: CentOS
Posts: 31

Rep: Reputation: 15
I am having this same problem, and trying by hostname or private IP address does not work. I am also running Red Hat 9.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php error failed to open stream mhatre kedar Linux - Newbie 2 03-20-2005 03:47 PM
php+imap linuxtesting2 Linux - General 0 06-16-2004 08:06 PM
IMAP works but IMAP TLS doesn't under PHP (Horde IMP) theparadigm Linux - Software 0 11-17-2003 12:35 AM
Couldn't open stream {localhost/imap : 143} in /usr/local/httpd/htdocs/view.php nshoboul Linux - Newbie 12 10-24-2003 02:23 PM
External ISDN T/A on Slackware 8.1 heartache Lemon[H]ead Linux - Networking 1 08-22-2002 04:18 PM


All times are GMT -5. The time now is 09:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration