i using freeBSD 4.9..
and qpoper is used pop3 protocol..

<?
$DSM_pop3="xxx.com";
$fp = fsockopen($DSM_pop3, 21, $errno, $errstr);

echo $fp;
?>
this source no error..
but

<?
$DSM_pop3="xxx.com";
$fp = fsockopen($DSM_pop3, 110, $errno, $errstr);

echo $fp;
?>

disconnect xxx.com:110 .....
this source error..

other pop3 protocol package not error..
what problem??
fsockopen not apply qpoper??

Any help will be appreciated.
Thanks

    Can't reproduce this problem, so it must be a difference in our configs, or else 4.X > 5.X FBSD....

    % uname -a
    FreeBSD archangel.daleco.biz 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #0:  Sat Mar 20 15:32:23 CST 2004     \
    [email]root@builder.daleco.biz[/email]:/usr/obj/usr/src/sys/GENERIC  i386
    <kdk@archangel> [/home/kdk] [19:49]                                                             
    % pkg_info | grep qpop qpopper-2.53_4 Berkeley POP 3 server (now maintained by Qualcomm) <kdk@archangel> [/home/kdk] [19:49]
    % cat qpop.php <? $DSM_pop3="localhost"; $fp = fsockopen($DSM_pop3, 110, $errno, $errstr); echo $fp; ?> <kdk@archangel> [/home/kdk] [19:49]
    % php qpop.php Resource id #4

    Can you explain the problem/situation more completely? Can you connect to this server/port with telnet?

      Thanks in advance..
      I have poor english.. sorry..

      bsd# uname -a
      FreeBSD bsd.xxx.com 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003 root@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC i386
      bsd# pkg_info|grep qpop
      qpopper-4.0.5_1 Berkeley POP 3 server (now maintained by Qualcomm)

      bsd# telnet localhost 110
      Trying 127.0.0.1...
      Connected to localhost.
      Escape character is ']'.
      +OK Qpopper (version 4.0.5) at bsd.xxx.com starting. <13802.1081562947@bsd.xxx.com>
      quit
      +OK Pop server at bsd.xxx.com signing off.
      Connection closed by foreign host.

      bsd# telnet yyy.com 110
      Trying 192.168.123.107...
      Connected to yyy.com.
      Escape character is ']'.
      +OK Qpopper (version 4.0.5) at bsd.xxx.com starting. <13815.1081563126@bsd.xxx.com>
      quit
      +OK Pop server at bsd.xxx.com signing off.
      Connection closed by foreign host.

      test.php.............................
      <?
      $DSM_pop3="yyy.com";
      $fp = fsockopen($DSM_pop3, 110, $errno, $errstr);

      echo "result : ".$fp;
      ?>

      browser result...
      Warning: fsockopen(): unable to connect to yyy.com:110 in /usr/home/mail/html/test.php on line 3
      result :

      i don't know what problem..

        Your english is better than my farsi/japanese/sumatran/german/swahili, etc., etc.... 🙂

        What about php settings? For example, "allow_url_fopen" in php.ini ... mine is ON on this box...

          hum... php setting..
          php.ini is default setting..
          only changed register_globals value(off->on)

          attach php.ini..
          you should check php.ini setting?? 🙂

            OK, I spot nothing there that is unusual, at least with a brief glance.

            Can you have the script echo the $errstr and $errno variables so we can get a read on them?

            If you check the manpage for [man]fsockopen[/man], you can see where I'm leading with this.

            Also, are you sure the script has sufficient permissions to open a socket on an outside interface?

              Write a Reply...