|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22439 fsockopen - Segmentation fault
Submitted: 2003-02-26 09:46 UTC Modified: 2003-02-26 10:02 UTC
From: tom at linuxsystems dot be Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.3.1 OS: Linux 2.4.20
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tom at linuxsystems dot be
New email:
PHP Version: OS:


 [2003-02-26 09:46 UTC] tom at linuxsystems dot be
Hi all,

I compiled a new webserver (Apache/1.3.27 (Unix) PHP/4.3.1 mod_perl/1.27) and moved my scripts (from a Apache/1.3.27 (Unix) PHP/4.3.0 mod_perl/1.27) to the new server.

One of my scripts contains following code:

$webport = fsockopen ("", 80, $errno, $errstr, 2);
if ($webport)
        print("<table class=\"text\"><tr><td>Web server:</td><td> [ <font color=\"#0B9839\">ON</font> ] </td></tr>");
        print("<tr><td>Web server:</td><td> [ <font color=\"#CE0000\">OFF</font> ] </td></tr>");

$dnsport = fsockopen ("", 53, $errno, $errstr, 2);
if ($dnsport)
        print("<tr><td>DNS server:</td><td> [ <font color=\"#0B9839\">ON</font> ] </td></tr>");
        print("<tr><td>DNS server:</td><td> [ <font color=\"#CE0000\">OFF</font> ] </td></tr>");

What happens:

When a service is not on (and fsockopen can not connect) I get a Segmentation fault in Apache:

[Wed Feb 26 16:25:08 2003] [notice] child pid 32070 exit 
signal Segmentation fault (11)

I copied to my other webserver (with 4.3.0) and there everythings run fine.

My phpinfo (new machine):

Old phpinfo (where script can run on):

Help is welcome :-)

Kind Regards,
Tom Myny


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-26 10:02 UTC] tom at linuxsystems dot be
New code works perfect!

Thx Sniper, i will see this code in 4.3.2 then ;-)

Kind Regards,
Tom Myny
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 21:01:29 2024 UTC