Re: PHP Denial of service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/14/06, Ryan Barclay <ryan@xxxxxxxxxxxxxxxxx> wrote:
It hasn't actually been attempted.  However, if a couple of a users were
to hold the refresh, the page generation times would go up ridiculously
and clients would be waiting over 20sec for pages.  As mentioned, it's a
very heavy php-mysql script with lots of queries.

A few questions:
#1: are those queries optimized (using indexes where needed)?
#2: is the code optimized.. no stupid loops.
#3: in order for php to know a user aborted it has to try to output
something (at least with apache on unix)

to deal with #3, i used to do a little trick:
<?php
// some standard things like <html><head>....
?><?php

// do intensive stuff
?>

I dont know if that ?><?php trick still works but it used to force php
to talk to apache and if apache said: oh you know what.. there isn't a
connection so a user aborted request will exist, or if it is set to
ignore user aborts, connection_aborted() will report true.


Curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux