php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4115 fsockopen causes script to exit
Submitted: 2000-04-12 07:04 UTC Modified: 2002-10-01 13:27 UTC
From: nemanjas at fon dot fon dot bg dot ac dot yu Assigned:
Status: Wont fix Package: Other
PHP Version: 3.0.16 OS: NT4 SP5
Private report: No CVE-ID: None
 [2000-04-12 07:04 UTC] nemanjas at fon dot fon dot bg dot ac dot yu
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-01 13:27 UTC] hholzgra@php.net
We are sorry, but can not support PHP 3 related problems anymore.
Momentum is gathering for PHP 5, and we think supporting PHP 3 will
lead to a waste of resources which we want to put into getting PHP 5
ready. Ofcourse PHP 4 will will continue to be supported for the
forseeable future.

... might as well have been winsock problem
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC