#49750 [Fbk->Bgs]: feof return true even this should not happen
| From: | pajoye@php.net | Date: | Sat, 03 Oct 2009 09:58:52 +0000 |
| Subject: | #49750 [Fbk->Bgs]: feof return true even this should not happen | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-143211@lists.php.net to get a copy of this message | ||
ID: 49750
Updated by: pajoye@php.net
Reported By: donauinsel at hotmail dot com
-Status: Feedback
+Status: Bogus
Bug Type: Sockets related
Operating System: Windows 2003
PHP Version: 5.2.11
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
See #49706
Previous Comments:
------------------------------------------------------------------------
[2009-10-03 08:58:41] donauinsel at hotmail dot com
It's possibly a duplicate of http://bugs.php.net/bug.php?id=49706 on
same platform (W2K3)
------------------------------------------------------------------------
[2009-10-02 21:44:05] fa@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
I don't really get what you mean.
The only reference to "end of data" I could find in the RFC 821 is:
>end of mail data indication
> A special sequence of characters that indicates the end of the
> mail data. In particular, the five characters carriage return,
> line feed, period, carriage return, line feed, in that order.
But I can't make the connection to feof.
Could you please elaborate and also give example output of your
mailserver (and version, etc.)
Your code snippet gives me this:
string(52) "220 XXXXXXXXX.XXXXX.XXXX ESMTP Postfix (Debian/GNU)
"
------------------------------------------------------------------------
[2009-10-02 15:30:43] donauinsel at hotmail dot com
Description:
------------
Any SMTP Class may return "end-of-data"
Reproduce code:
---------------
<?php
$fp = fsockopen('localhost', 25, $errno, $errstr, 10);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
if(!feof($fp)) {
echo fgets($fp, 100);
}
}
fclose($fp);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49750&edit=1