From:             [EMAIL PROTECTED]
Operating system: RedHat 7.2
PHP version:      4.2.3
PHP Bug Type:     Sockets related
Bug description:  fsockopen() causes apache restart

<?php
$fp = fsockopen ("localhost", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\n\r\n");
while (!feof($fp)) {
echo fgets ($fp,128);
}
fclose ($fp);
}
?>

'./configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic'
'--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3'
'--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd'
'--enable-gd-native-ttf' '--with-ttf' '--with-gdbm'
'--with-gettext=shared' '--with-ncurses' '--with-gmp' '--with-iconv'
'--with-jpeg-dir=/usr' '--with-mm' '--with-openssl' '--with-png'
'--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger'
'--enable-exif' '--with-pear=/usr/share/pear' '--enable-magic-quotes'
'--enable-safe-mode' '--enable-sockets' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--without-oci8' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-ftp=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr'
'--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mbstring' '--with-apxs=/usr/sbin/apxs'

We tried to upgrade to php4.3 and after that we couldn't use fsockopen().
The downgrade to 4.2.3 didn't solve the problem. In the apache eror log
comes:
[Mon Jan 13 06:57:56 2003] [notice] child pid 31227 exit signal
Segmentation fault (11)

(gdb) run -X
Starting program: /usr/sbin/httpd -X
[New Thread 1024 (LWP 29955)]
Processing config directory: /etc/appliance/apacheconf
...... Folowed from apache restart ....
Program exited with code 01.

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

Reply via email to