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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
16 + 50 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 26 04:01:30 2024 UTC