could'nt open stream
Moderator: General Moderators
could'nt open stream
i'm constantly getting the following :
Warning: Couldn't open stream {localhost/imap : 143} in /usr/local/httpd/htdocs/view.php on line 5
Warning: imap_header(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 6
From:
To:
Date:
Subject:
Warning: imap_body(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 12
when i'm trying the following portions of codes :
<?php
$MAILSERVER="{localhost/imap : 143}";
$link=imap_open($MAILSERVER,$PHP_AUTH_USER,$PHP_AUTH_PW);
$header=imap_header($link,$num);
echo "From: $header[fromaddress]<br>";
echo "To: $header[toaddress]<br>";
echo "Date: $header[Date]<br>";
echo "Subject: $header[Subject]<br><br>";
echo imap_body($link,$num);
?>
could anyone help me ?
Warning: Couldn't open stream {localhost/imap : 143} in /usr/local/httpd/htdocs/view.php on line 5
Warning: imap_header(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 6
From:
To:
Date:
Subject:
Warning: imap_body(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 12
when i'm trying the following portions of codes :
<?php
$MAILSERVER="{localhost/imap : 143}";
$link=imap_open($MAILSERVER,$PHP_AUTH_USER,$PHP_AUTH_PW);
$header=imap_header($link,$num);
echo "From: $header[fromaddress]<br>";
echo "To: $header[toaddress]<br>";
echo "Date: $header[Date]<br>";
echo "Subject: $header[Subject]<br><br>";
echo imap_body($link,$num);
?>
could anyone help me ?
tryor
Code: Select all
$MAILSERVER="{localhost:143/imap}";Code: Select all
$MAILSERVER="{localhost:143}";could'nt open stream
hello, i've made the change
$MAILSERVER="{localhost:143/imap}";
$MAILSERVER="{localhost:143}";
nothing is really changing, i'm getting the same thing :
Warning: Couldn't open stream {localhost:143/imap} in /usr/local/httpd/htdocs/view.php on line 5
Warning: imap_header(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 6
From:
To:
Date:
Subject:
Warning: imap_body(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 12
what to do , i really seem confused
thanx
$MAILSERVER="{localhost:143/imap}";
$MAILSERVER="{localhost:143}";
nothing is really changing, i'm getting the same thing :
Warning: Couldn't open stream {localhost:143/imap} in /usr/local/httpd/htdocs/view.php on line 5
Warning: imap_header(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 6
From:
To:
Date:
Subject:
Warning: imap_body(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 12
what to do , i really seem confused
thanx
couldn't open stream
how can i make sure that there's an imap-server listening on localhost:143 ?
which command do i have to type ?
which command do i have to type ?
so I take it you're on a unix-style maschine. If you have access to the console try netstat -l/usr/local/httpd/htdocs/view.php
It should list all listening socket, something like
Code: Select all
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 *:www *:* LISTEN
tcp 0 0 *:ssh *:* LISTENcouldn't open stream
here is the output of netstat -l :
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:imaps *:* LISTEN
tcp 0 0 *:imap *:* LISTEN
...
tcp 0 0 *:ssh *:* LISTEN
...
[mod_edit: removed most of the ports. It's not "necessary" everyone knows what's running on your box
]
what i have to do know?
thanx extreme guru!!!!!
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:imaps *:* LISTEN
tcp 0 0 *:imap *:* LISTEN
...
tcp 0 0 *:ssh *:* LISTEN
...
[mod_edit: removed most of the ports. It's not "necessary" everyone knows what's running on your box
what i have to do know?
thanx extreme guru!!!!!
ah ok, then there is an imap-server.
the imap extension seems to put two messages if the open() function fails. One error and one warning; sorry my fault
so hopefully this onewill give you a more detailed description of the error.
the imap extension seems to put two messages if the open() function fails. One error and one warning; sorry my fault
so hopefully this one
Code: Select all
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
$MAILSERVER="{localhost:143}INBOX";
$link=imap_open($MAILSERVER,$PHP_AUTH_USER,$PHP_AUTH_PW);
...
?>couln't open stream
hello extreme guru,
i've just been adding the lines you advised me to add , the code is :
<?php
$PHP_AUTH_USER="root";
$PHP_AUTH_PW="";
error_reporting(E_ALL);
ini_set("display_errors",TRUE);
$MAILSERVER="{localhost:143}INBOX";
$link=imap_open($MAILSERVER,$PHP_AUTH_USER,$PHP_AUTH_PW);
$header=imap_header($link,$num);
echo "From: $header[fromaddress]<br>";
echo "To: $header[toaddress]<br>";
echo "Date: $header[Date]<br>";
echo "Subject: $header[Subject]<br><br>";
echo imap_body($link,$num);
?>
and i'm getting the following result :
Warning: Couldn't open stream {localhost:143}INBOX in /usr/local/httpd/htdocs/view.php on line 7
Notice: Undefined variable: num in /usr/local/httpd/htdocs/view.php on line 8
Warning: imap_header(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 8
From:
To:
Date:
Subject:
Notice: Undefined variable: num in /usr/local/httpd/htdocs/view.php on line 14
Warning: imap_body(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 14
Notice: Certificate failure for localhost: self signed certificate: /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=localhost.localdomain/emailAddress=root@localhost.localdomain (errflg=2) in Unknown on line 0
what is really the problem?
thanx for your help
i've just been adding the lines you advised me to add , the code is :
<?php
$PHP_AUTH_USER="root";
$PHP_AUTH_PW="";
error_reporting(E_ALL);
ini_set("display_errors",TRUE);
$MAILSERVER="{localhost:143}INBOX";
$link=imap_open($MAILSERVER,$PHP_AUTH_USER,$PHP_AUTH_PW);
$header=imap_header($link,$num);
echo "From: $header[fromaddress]<br>";
echo "To: $header[toaddress]<br>";
echo "Date: $header[Date]<br>";
echo "Subject: $header[Subject]<br><br>";
echo imap_body($link,$num);
?>
and i'm getting the following result :
Warning: Couldn't open stream {localhost:143}INBOX in /usr/local/httpd/htdocs/view.php on line 7
Notice: Undefined variable: num in /usr/local/httpd/htdocs/view.php on line 8
Warning: imap_header(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 8
From:
To:
Date:
Subject:
Notice: Undefined variable: num in /usr/local/httpd/htdocs/view.php on line 14
Warning: imap_body(): supplied argument is not a valid imap resource in /usr/local/httpd/htdocs/view.php on line 14
Notice: Certificate failure for localhost: self signed certificate: /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=localhost.localdomain/emailAddress=root@localhost.localdomain (errflg=2) in Unknown on line 0
what is really the problem?
thanx for your help
could'nt open stream
i'm going to check $num variable. but why i'm constantly getting
the message : couldn't open stream online 7, while the imap server seems to work.
what does the following mean ?.
Notice: Certificate failure for localhost: self signed certificate: /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=localhost.localdomain/emailAddress=root@localhost.localdomain (errflg=2) in Unknown on line 0
thanx 4 your help
the message : couldn't open stream online 7, while the imap server seems to work.
what does the following mean ?.
Notice: Certificate failure for localhost: self signed certificate: /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=localhost.localdomain/emailAddress=root@localhost.localdomain (errflg=2) in Unknown on line 0
thanx 4 your help
hm, unsure but did you check out the user contributed note from russell at flora dot ca at http://php.net/imap_open?
couldn't open stream
hello,
it seems that imapd is not starting, when i'm doing pgrep imapd i cannot see any process, while i've alreay restarted the xinetd.
what can i do ?
it seems that imapd is not starting, when i'm doing pgrep imapd i cannot see any process, while i've alreay restarted the xinetd.
what can i do ?