From:             tom at linuxsystems dot be
Operating system: Linux 2.4.20
PHP version:      4.3.1
PHP Bug Type:     Sockets related
Bug description:  fsockopen - Segmentation fault

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 ("www.linuxsystems.be", 80, $errno, $errstr, 2);
if ($webport)
        print("<table class=\"text\"><tr><td>Web server:</td><td> [ <font
color=\"#0B9839\">ON</font> ] </td></tr>");
else
        print("<tr><td>Web server:</td><td> [ <font
color=\"#CE0000\">OFF</font> ] </td></tr>");

$dnsport = fsockopen ("ns1.linuxsystems.be", 53, $errno, $errstr, 2);
if ($dnsport)
        print("<tr><td>DNS server:</td><td> [ <font
color=\"#0B9839\">ON</font> ] </td></tr>");
else
        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): http://customer.linuxsystems.be/phpinfo.php

Old phpinfo (where script can run on):
http://www.internetgids.be/phpinfo.php

Help is welcome :-)

Kind Regards,
Tom Myny
-- 
Edit bug report at http://bugs.php.net/?id=22439&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22439&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22439&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22439&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22439&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22439&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22439&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22439&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22439&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22439&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22439&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22439&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22439&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22439&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22439&r=gnused

Reply via email to