|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-03-14 01:21 UTC] prezident at terix dot ru
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 11:00:01 2025 UTC |
You think so? So please tell me, why this problem is actual on WinXp under PHP Version 5.0.4? My bag? Array $att gives me xml_parser and this error message handles when i just trying to read last value from this array ($x = $att[count($att)-1];) $att = Array('LOOP'=>'$mods->menu->sublist()', 'ITEM'=>'$menu_item'); Ill try many another ways, but problem is still actual. I don't need support from You, i need good php ;) ssory for my english ))