ID: 14356
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Reproducible crash
Operating System: Debian
PHP Version: 4.0.6
New Comment:

Yeah, you can do this with this code too:

test.php:

<?php include('test.php'); ?>

It's not a bug. 

--Jani


Previous Comments:
------------------------------------------------------------------------

[2001-12-05 19:46:05] [EMAIL PROTECTED]

Using fsockopen() on a page to call itself causes the apache server to stop taking 
request.  Wehn you look at ps there are as many httpd processes running as the server 
is allowed to run. (based on http.conf)

Here is the code I created that takes down Apache.

<code>

<?php

$fp = fsockopen ($HTTP_HOST, $SERVER_PORT, $errno, $errstr, 30);
if (!$fp)
{
  echo "$errstr ($errno)<br>\n";
}
else
{
  fputs ($fp, "GET $REQUEST_URI HTTP/1.0\r\nHost: $HTTP_HOST\r\n\r\n");

  while (!feof($fp))
  {
    echo fgets ($fp,128);
  }

  fclose ($fp);
}

?>

</code>

The only way to bring Apache back is to kill the server and restart it. This can be a 
major problem with service providers that offer PHP since all of their sites will go 
down once this script is run.  It seems like there is a problem with PHPs connect() 
call.  The time out NEVER works and I have tried this on Debian and FreeBSD using the 
PHP module in Apache.

pHil

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14356&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to