i'm having a strange problem in simple dom parser. I tried to figure it out but couldn't find the reason .. it occurs when setting an attribute with a bigger HTML file:
$ctl->setAttribute("dtype", "varchar" );
It seems like that the attribute value "varchar" is a reserved word, it also doesn't work when using "double", the name of the attribute is irrelevant. Unfortunately i can't report on how to reproduce the problem, but i attached the html. when using this code:
$doc = str_get_html($html);
echo strlen($doc);
you will get 0 as doc length.
PS: the memory leak problem still exists .. i ran a cronjob which does html parsing for several days and the script was terminated as it was using too much memory, although it shouldn't.
ok found out by myself .. i had to increase MAX_FILE_SIZE
varchar is indeed a reserved word in php, and typically, in php " (double quotes) allow for some substitution inside of them, and ' (single quotes) are more literal with no substitution. I don't THINK this is your problem, but try changing to single quotes.