Bug #4115: fsockopen causes script to exit
| From: | nemanjas at fon dot fon dot bg dot ac dot yu | Date: | Wed, 12 Apr 2000 11:04:42 +0000 |
| Subject: | Bug #4115: fsockopen causes script to exit | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17836@lists.php.net to get a copy of this message | ||
From: nemanjas@fon.fon.bg.ac.yu
Operating system: NT4 SP5
PHP version: 3.0.16
PHP Bug Type: Other
Bug description: fsockopen causes script to exit
It seem if you pass invalid host name to fsockopen, and you are online, script crashes. If offline
all is ok.
Example:
$sock = fsockopen($ns, 53, $error, $errstr, 60);
if(!$sock) {
printf("Nije uspela konekcija!<br>\n");
return -1;
}
else {
}
if ns is invalid like yuo have 2 dots in name script do a printf and exit's form script (this
was a function).
It seems if lookup fails, there are problems.