<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
It looks like preg_replace() is broken for long strings in PHP 5.2.1.<br>
<br>
Consistent with what I've seen, and I see mention of it in the
"chatter".<br>
<br>
I'll have to create a demo, and make sure the PHP folks have it on
their active bug list. (later this week -- going out of town for a few
days).<br>
<br>
Arghh.<br>
<br>
- Henrik<br>
<br>
Henrik wrote:
<blockquote cite="mid45FDED37.1060104@sympatico.ca" type="cite">
  <pre wrap="">On the page that renders: Max memory used 2598056

On the page that doesn't render: Max memory used 2962672

(my local environment)

Way under the max...

Patrick R. Michaud wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">On Sun, Mar 18, 2007 at 05:58:47PM -0500, Patrick R. Michaud wrote:
  
    </pre>
    <blockquote type="cite">
      <pre wrap="">Weird.  I notice that your PHP environment is running with memory limits enabled
(of 64MB) -- so perhaps PmWiki is hitting the memory limit.  This doesn't seem
likely, though, as 64MB is a huge amount of memory.

FWIW, the most I've ever seen a page require on pmwiki.org is 24MB.
    
      </pre>
    </blockquote>
    <pre wrap="">Here's an interesting experiment...

Add the following to your local/config.php:

    function PeakUsage($pagename) { 
      return 'Max memory used ' . memory_get_peak_usage();
    }
    $HTMLFooterFmt['memlimit'] = 'function:PeakUsage';

Then, run one of the pages that is large but actually renders correctly,
and tell me what value appears at the bottom of the page.  That will give
us an idea of whether your site is getting close to PHP's memory limits,
and if this is somehow the problem.

(I think you'll also need to add a &lt;!--HTMLFooter--&gt; directive
to your skin's template -- add it just before the closing &lt;/body&gt; tag.)

Pm
                                                  

  
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 

Henrik Bechmann
<a class="moz-txt-link-abbreviated" href="http://www.bechmann.ca">www.bechmann.ca</a>
Webmaster, <a class="moz-txt-link-abbreviated" href="http://www.dufferinpark.ca">www.dufferinpark.ca</a></pre>
</body>
</html>