[pmwiki-users] php 5.2.1 problem (serious)

Henrik henrik.bechmann at sympatico.ca
Mon Mar 19 09:43:57 CDT 2007


More info:

If I turn off the group header of the large page (the group header 
contains (:if:) directives to be parsed), then the page renders.

So I'm thinking there's something about (:if:) directive processing 
(possibly internal preg_replace match subsets) that causes preg_replace 
to fail.

Here's the page that doesn't render:

http://www.dufferinpark.ca/cityrinks/wiki/wiki.php?n=DufferinParkRink.WinterDiary2006-2007-original

Here's the same page with (:nogroupheader:) added at the beginning of 
the wiktext (this renders):

http://www.dufferinpark.ca/cityrinks/wiki/wiki.php?n=DufferinParkRink.WinterDiary2006-2007-originalwithoutheader

Here's the group header text:

(:if equal {$Name} {$DefaultName} :)%block rfloat%<<|[[List Of Rinks 
|'''List of Rinks''']]|>>

See '''[[WinterDiary 2006-2007 | Rink Diary]]'''
(:ifend:)

(:if ! equal {$Name} {$DefaultName} :)<<|[[(ArticleList)]]|>>

(:if:)

Henrik wrote:
> It looks like preg_replace() is broken for long strings in PHP 5.2.1.
>
> Consistent with what I've seen, and I see mention of it in the "chatter".
>
> 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).
>
> Arghh.
>
> - Henrik
>
> Henrik wrote:
>> 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:
>>   
>>> On Sun, Mar 18, 2007 at 05:58:47PM -0500, Patrick R. Michaud wrote:
>>>   
>>>     
>>>> 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.
>>>>     
>>>>       
>>> 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 <!--HTMLFooter--> directive
>>> to your skin's template -- add it just before the closing </body> tag.)
>>>
>>> Pm
>>>                                                   
>>>
>>>   
>>>     
>>
>>   
>
> -- 
>
> Henrik Bechmann
> www.bechmann.ca
> Webmaster, www.dufferinpark.ca
> ------------------------------------------------------------------------
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>   

-- 

Henrik Bechmann
www.bechmann.ca
Webmaster, www.dufferinpark.ca




More information about the pmwiki-users mailing list