fsockopen question
soc at visca.com
soc at visca.com
Fri Jun 20 08:47:19 PDT 2008
Greetings:
Using OpenBSD 4.2, PHP 5.23.
Yesterday I got a complaint from a user that she couldn't send email
using the php mail program. I traced the problem down to a problem
with PHP's fsockopen function. Here's the script I used to test it:
http://visca.com/php/fsockopen.php
<?php
$fp = fsockopen("localhost", 25, $errno, $errstr);
if (!$fp) {
echo "ERROR: $errno - $errstr<br />\n";
} else {
$response = fgets($fp);
echo "Response is \"$response\"";
}
?>
As you'll see if you follow the link, the script hangs for 60 seconds
then prints «Response is ""». Port 25 is open and working.
Can anyone suggest where I might go from here to debug this?
--
All the best (Adéu-siau),
Lou Hevly
soc at visca.com
http://visca.com
More information about the Openbsd-newbies
mailing list