#22439 [Fbk->Csd]: fsockopen - Segmentation fault
| From: | tom at linuxsystems dot be | Date: | Wed, 26 Feb 2003 16:02:59 +0000 |
| Subject: | #22439 [Fbk->Csd]: fsockopen - Segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34330@lists.php.net to get a copy of this message | ||
ID: 22439
User updated by: tom at linuxsystems dot be
Reported By: tom at linuxsystems dot be
-Status: Feedback
+Status: Closed
Bug Type: Sockets related
Operating System: Linux 2.4.20
PHP Version: 4.3.1
New Comment:
New code works perfect!
Thx Sniper, i will see this code in 4.3.2 then ;-)
Kind Regards,
Tom Myny
Previous Comments:
------------------------------------------------------------------------
[2003-02-26 09:47:42] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-02-26 09:46:56] 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 ("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 this bug report at http://bugs.php.net/?id=22439&edit=1