Re: Apache 2.0.52, PHP 5.03, FreeBSD 4.10 memory problems

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

 



maillist@xxxxxxxxxx wrote:
>>That's definitely not good.
>>
>>But there is only so much you, and PHP, can do to stop a bad programmer
>>from chewing up resources.
>>
> I'm pretty sure that you can prevent this somehow!
> There is no way any OS with respect for themself, will
> allow any user installed programs (like PHP) to crash the
> server!
>
> You should try check out the freebsd mailling lists. I'm pretty sure
> they can help you out! :) Please also make sure you run the latest
> versions
> of apache and php.
>
> Good luck finding the error!
> Simon
>
>
> Btw I run FreeBSD 5.3-STABLE, Apache 2.0.52_4 and PHP 5.0.3_2
> when i try to run an endless loop, using a lot of memory, I get an
>     Allowed memory size of 8388608 bytes exhausted (tried to allocate
> 256 bytes)
> And absolutely no effect on the system!

Try this:
<?php
  for ($i = 0; $i <= 0; $i--);
?>

I think that compiles down into such a tight loop that PHP interrupts
never get a chance to check on Memory usage or cpu usage...

At least, it USED to...

PHP may very well be much "better" at this, but I'm willing to bet that
somebody can always find a way to break this.

Plus, some things are out of PHP's control -- If you use GD to create an
image that's too large, PHP relies on GD to cope with that, as it must, by
design.

I believe GD and PHP play well together in this regard, but can you
guarantee that EVERY extension always will?  I doubt it.

Unless your PHP install is *really* boring, with none of the fun/powerful
extensions that make PHP so incredibly useful, then, most likely,
somewhere in the realm of all possible PHP code a user can type, there is
at least one (1) script that will somehow bring the server to its knees.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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