#36731 [NEW]: memory 10MB limit exceed

From: Date: Tue, 14 Mar 2006 00:21:32 +0000
Subject: #36731 [NEW]: memory 10MB limit exceed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94316@lists.php.net to get a copy of this message
From: prezident at terix dot ru Operating system: ??? PHP version: 5.1.2 PHP Bug Type: Performance problem Bug description: memory 10MB limit exceed Description: ------------ When i make str_replace on foreach server gives me error #500 Reproduce code: --------------- function bhldr($parser, $name, $att) { $this->depth++; if ($this->snipplets[$name]) { $this->mode[$this->depth] = $name; return ''; } if ($this->inlines[$name]) { $inl = $this->inlines[$name]; foreach ($att as $key=>$val) { $inl = str_replace('#'.$key.'#', $val, $inl); } $this->result .= $inl; return ''; } $this->result .= str_repeat("\t", $this->depth)."<$name"; foreach ($att as $key=>$val) $this->result .= " $key='$val'"; $this->result .= ">\r\n"; } Expected result: ---------------- parsed xml with tags, listed on array $this->inlines as keys, replaced with values of $this->inlines. Additionally, in the values constructions like "#WIDTH#" must be replaced with $att[] values (i.e., #WIDTH# to $att["WIDTH"]). Function bhldr is xml_begin_element_handler. Actual result: -------------- Memory issue. My hoster gives max 10MB of RAM for PHP5 (started as CGI). here error message from Apache error log: Mar 14 02:59:17 2006] [error] [client #.#.#.#] Premature end of script headers: /usr/local/php5-cgi/domain/php -- Edit bug report at http://bugs.php.net/?id=36731&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36731&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36731&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36731&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36731&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36731&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36731&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36731&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36731&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36731&r=support Expected behavior: http://bugs.php.net/fix.php?id=36731&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36731&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36731&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36731&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36731&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36731&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36731&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36731&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36731&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36731&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36731&r=mysqlcfg

« previous php.bugs (#94316) next »