ID: 41932 Updated by: [EMAIL PROTECTED] Reported By: yaboll at interia dot pl -Status: Open +Status: Feedback Bug Type: Sockets related Operating System: linux PHP Version: 4.4.7 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: ------------------------------------------------------------------------ [2007-07-09 07:43:44] yaboll at interia dot pl Description: ------------ I found problem in fsockopen() when I use php as module mod_php in apache2. When I create many vhost fsckopen() doesn't work good and generate child sigterm error. I made some experimets with vhost number: vhosts number - error less than 1005 - work fine 1006-1007 - white page (no error) 1008 - around 1164 - "Operation now in progress (115)" around 1150 - around 1164 - "Bad file descriptor (9)" around 1164 - around 1200 - "Operation now in progress (115)" 1200 and more - apache child sigterm core in sigterm: (gdb) bt #0 php_hostconnect (host=Cannot access memory at address 0xc ) at /srv/dev-dev/php4-debug/php4/php4-4.4.7/main/network.c:490 Cannot access memory at address 0x4 (gdb) When I use php in cgi/cli mode all works fine. Reproduce code: --------------- <?php $fp = fsockopen("www.onet.pl", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: www.onet.pl\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41932&edit=1