Error With fsocketopen() Call

From: Date: Wed, 09 May 2007 12:52:05 +0000
Subject: Error With fsocketopen() Call
Groups: php.windows 
Request: Send a blank email to php-windows+get-27856@lists.php.net to get a copy of this message
Hello all, I am having a problem sending an email from PHP 4.1.3/IIS 5.0. I am using a PHP Class called phpmailer. The problem occurs when the mailer tries to open a socket to my SMTP server. I can get the same error with this little bit of code: // Begin test code $fp = fsockopen("smtp.example.com", 25, $errno, $errstr, 30); if($errno == 0 && !$fp){ // error occurred before the socket was opened print "Error occurred before connect() call"; }elseif(!$fp){ // error opening socket print "$errstr ($errno)<br>\n"; }else{ print "socket opened"; } // End test code When I run the code above, this is the output: Bad file descriptor (9) Can anyone tell me what this error means? The server is provided by my ISP so I have no control over it. Thanks, James -- James Crow IT Manager ULTRATAN, Inc. 15 Santuck St. Greenville, SC 29611

« previous php.windows (#27856) next »