Re: fsockopen to own server

From: Date: Thu, 16 Dec 2004 17:37:36 +0000
Subject: Re: fsockopen to own server
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-204503@lists.php.net to get a copy of this message
Doc wrote:
Hello. I'm having a problem with fsockopen and was wondering has anyone ever noticed a case where it will work from machine1 (dev machine) to machine2. happens all the time :-)
But when the was placed onto machine2 it wouldn't work connecting to it's own ip address; when connecting via telnet it returns: Escape character is '^]'. * OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS AUTH=LOGIN] serverip IMAP4rev1 2003.339-cpanel at Wed, 15 Dec 2004 19:33:27 +0000 (GMT) so I don't think it's the firewall. usually a good idea to disable firewalls when having trouble with socket code.
the error it returns is "No such file or directory". So it seems that when it connects (which it does without failing), the file seems to be deleted, as the file the variable refers to doesn't exist on the fs either. if(($s = fsockopen($id["sockname"], 0, $errno, $errstr)) === FALSE) $id["sockname"] is in the format /tmp/filename with the filename changing based on a random value and there are no files with that format in /tmp it always returns false for some reason on this server. not sure what you are trying to do but it sounds like you are using unix domain sockets where you should be using tcp. That's why it might work on one machine (where web and imap are both installed) and not on the other where you only have the web server but the imap server is remote.
-- Raditha Dissanayake. ------------------------------------------------------------------ http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload

« previous php.general (#204503) next »