regular expression too large? How large?
Posted: 17 February 2005 07:04 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  134
Joined  11-03-2002

Warning: Compilation failed: regular expression too large at offset 0 in /var/www/html/terrapin/core/core.template.php on line 531

is the message I get when trying to access *particularly long* posts.

Is this a limit of php and/or RegExp generally? or a configuration issue? has anyone a clue?

TIA
ward

Profile
 
 
Posted: 17 February 2005 10:06 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

Just contributing some information I found.

It appears there is some kind of upper limit on the size of regular expressions in PHP.  Some sources discussing or confirming this.  Most of the sources were discussing things like ban lists, so it might be something like an IP Ban list or Blacklist causing this.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 17 February 2005 11:22 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  134
Joined  11-03-2002

thanks—this is interesting, I’ve run into the

“Cannot modify header information - headers already sent by “

message too, before.

But I don’t have any IP addresses banned, yet. So it must be some regular expression(s) used to manage those particular blacklists, and they are very large, rather than just the fact that it was an IP banning issue.

Interesting that it would crop up mainly in the context of managing banned IPs—spam is really overwhelming in so many ways! but probably it is some 256k limit or something?

Profile
 
 
Posted: 18 February 2005 10:10 AM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

The “cannot modify header” warning is simply caused by the other error.  When the first error is taken care of, the second will go away on its own.

I don’t think the issue is really particular to IP banning or anything; rather banning routines simply tend to run very large regular expressions and thus would be more likely than other operations to hit this limit (whatever it is).

Hopefully the developers will have some more concrete ideas than I do! [grin]

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 18 February 2005 10:19 AM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Based on the line number that regex is the one that is replacing the contents of an EE tag with a special marker.  How big is this template of yours?  It would seem to be quite a large template or tag to cause memory to run out.

 Signature 
Profile
 
 
Posted: 01 April 2005 04:20 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Avatar
Total Posts:  10
Joined  01-15-2004

Same error :(

Not blacklists, nor banned IP

The template is short (no more than 20 lines, but embedding other templates), and uses the {exp:weblog:category_heading} and {exp:weblog:entries} tags.

It started crashing calling one specific category for which a long article was recently inserted.

Finally I discovered that removing the {exp:filter_html} solved the problem.

Maybe it helps.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64978 Total Logged-in Users: 21
Total Topics: 82016 Total Anonymous Users: 19
Total Replies: 440814 Total Guests: 192
Total Posts: 522830    
Members ( View Memberlist )