Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 12-17-2003, 11:29 AM   #1
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.

$MAILSERVER="{" . "$IP:110/pop3" . "}INBOX";
$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 110" and entering user and pass.

Any ideas?

Old 01-05-2004, 01:17 AM   #2
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
Registered: Oct 2003
Location: Middle Tennessee
Distribution: CentOS
Posts: 33

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.


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 11:56 AM.

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