|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21613 fsockopen() causes apache restart
Submitted: 2003-01-13 05:58 UTC Modified: 2003-01-27 22:41 UTC
From: boris at fourthcolor dot com Assigned:
Status: No Feedback Package: Sockets related
PHP Version: 4.2.3 OS: RedHat 7.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-01-13 05:58 UTC] boris at fourthcolor dot com
$fp = fsockopen ("localhost", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "GET / HTTP/1.0\r\nHost:\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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-13 06:19 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Please follow the instructions for generating a backtrace and post the details here.
There will be no more 4.2.x releases and we are only interested in fixing problems in the 4.3.x series, so please try 4.3.0 again.
 [2003-01-27 22:41 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 08:01:28 2024 UTC