[pmwiki-users] Fwd: MarkupExtensions throwing 500 error on DropCaps

Patrick R. Michaud pmichaud at pobox.com
Tue Mar 20 20:30:30 CDT 2007


On Tue, Mar 20, 2007 at 09:20:02PM -0400, the Other michael wrote:
> That did the trick! Thanks!
> 
> PHP is still 4.x -- the diagnose extensions are on, if you need to take a 
> look.

No, I'm pretty sure that's the error.  Now I wonder if John Rankin
is around to be able to "officially" fix the recipe.  :-)

Pm


> On 3/20/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Tue, Mar 20, 2007 at 07:21:50PM -0400, the Other michael wrote:
> >> and if disable the drop-caps, everything is happy again
> >>
> >> $MarkupExtensions['A;'] = false;
> >> @#$*@#*&)*
> >>
> >> I don't have a dedicated server, so I have no access to error
> >> messages. Anybody have any ideas?
> >
> >It looks to me as though the drop-caps pattern has the potential
> >for an infinite recursion in it, or at least a very deep one.
> >
> >By any chance is your server running PHP 5.2.0 or later?
> >PHP 5.2.0 introduced a number of changes to PCRE regular
> >expression handling.  Perhaps your service provider upgraded
> >PHP recently.
> >
> >Anyway, in the recipe, try changing lines 321-322 (or thereabouts) from
> >
> >    Markup('A;','block','/^([[:upper:]]);(([^;&]*(&[^;]+;)*)*);(.*)$/',
> >    '<:block><p class=\'drop\'>$1<span 
> >    class=\'smallcaps\'>$2</span>$5</p>');
> >
> >to
> >
> >    Markup('A;','block','/^([[:upper:]]);((?:&\\w+;|[^;])*);(.*)$/',
> >    '<:block><p class=\'drop\'>$1<span 
> >    class=\'smallcaps\'>$2</span>$3</p>');
> >
> >and see if that fixes the problem.
> >
> >Pm
> 
> -- 
> -the Other michael
> http://www.xradiograph.com/interference
> http://www.xradiograph.com/wrottings
> http://www.xradiograph.com/amazingtext
> http://scp.xradiograph.com
> 
> DISCLAIMER: links contained in mail from this address may or may not
> be contextually related to any encapsulating text.
> 
> STATEMENT OF CONFIDENTIALITY: I send a bcc of every email only to the
> NSA, because I want America to Be Secure.



More information about the pmwiki-users mailing list