Date: 06/27/01
- Next message: postmaster <email protected>: "[PHP-DEV] Bug #11766: Unable to save result set in"
- Previous message: root <email protected>: "[PHP-DEV] Bug #11765 Updated: Warning: MySQL: Unable to save result set in"
- In reply to: Swift: "[PHP-DEV] Memory limit is used for all scripts instead of one?"
- Next in thread: derick <email protected>: "Re: [PHP-DEV] Memory limit is used for all scripts instead of one?"
- Reply: derick <email protected>: "Re: [PHP-DEV] Memory limit is used for all scripts instead of one?"
- Reply: Wez Furlong: "Re: [PHP-DEV] Memory limit is used for all scripts instead of one?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
What version of PHP are you using? There were some changes in 4.0.6 that
may change your results.
Brian Moon
----------------------------------------------------------------------
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/
----- Original Message -----
From: "Swift" <swift <email protected>>
To: <php-dev <email protected>>
Sent: Wednesday, June 27, 2001 9:52 AM
Subject: [PHP-DEV] Memory limit is used for all scripts instead of one?
> Warning: Could not execute mail delivery program in
> /local/Web/sites/phpweb/bugs.php on line 419
> Mail not sent!
> Please send this page in a mail to php-dev <email protected> manually.
>
> --------------------------------------------------------------------------
----------------
>
> Hi there!
>
> As far as I understand, the option "memory_limit" sets the mem-limit for
>
> ONE script.
> I installed PHP as a Apache module and I set the memory_limit to 16M
> (via php.ini).
>
> When I allocate 8M of memory, all works fine. But when two different
> scripts each allocate 8M, I will get sometimes the following message:
> Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
> allocate 4194304 bytes) in /usr/local/httpd/htdocs/testxx.php on line 6
>
> Both scripts (testx.php and testxx.php) contain the following code:
> <?php
>
> $str = "x";
> for($i=0; $i<23; $i++)
> {
> $str .= $str;
> echo strlen($str) . "<br>";
> }
> ?>
>
> First, 1 byte will be allocated, then 2, then 4 and so on. The last
> allocated string has a size of 8M.
> It's a little difficult to reproduce the problem because I have to call
> both scripts exactly at the same time from my browser. But, as I said,
> sometimes I get the described error-message.
>
> My question is: Is this normal and memory_limit sets the limit for ALL
> scripts that are currently running or is this a bug?
>
> Thanks in advance!
>
> ... tobias wiersch from germany
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
> For additional commands, e-mail: php-dev-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: postmaster <email protected>: "[PHP-DEV] Bug #11766: Unable to save result set in"
- Previous message: root <email protected>: "[PHP-DEV] Bug #11765 Updated: Warning: MySQL: Unable to save result set in"
- In reply to: Swift: "[PHP-DEV] Memory limit is used for all scripts instead of one?"
- Next in thread: derick <email protected>: "Re: [PHP-DEV] Memory limit is used for all scripts instead of one?"
- Reply: derick <email protected>: "Re: [PHP-DEV] Memory limit is used for all scripts instead of one?"
- Reply: Wez Furlong: "Re: [PHP-DEV] Memory limit is used for all scripts instead of one?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

