Message: preg_match_all() [function.preg-match-all]: Unknown modifier 'p' in /home/newich/public_html/sites/default/modules/spam/spam.module on line 1100.

Comments

jeremy’s picture

When are you getting this error? It seems you have defined an invalid filter, can you tell which filter is failing?

nancydru’s picture

No, I can't tell which is failing. I have only two custom filters.

/peoples/i - plain text, header only, usually spam
/ambien/i - plain text, everything, usually spam

I have seen it live when I respond to a comment as an anonymous poster.

If you need to get into the site, I'll set you up a user id.

nancydru’s picture

If you want to try an anonymous comment first, it's http://nanwich.info

nancydru’s picture

Please contact me. I want to set up an account for you so you can look at my logs. I am now getting three of these errors for almost every comment. Plus this "people" spammer is now approaching DOS levels. I need help.

jeremy’s picture

First, you may want to go to "Administer >> Settings >> Error reporting" and change error reporting to only go to a file, not to the screen -- useful if it's a live site.

Next, can you post the output of the following SQL query:

    sql> SELECT * FROM spam_custom;
nancydru’s picture

It is already set that way. My reported error is from Watchdog.

SQL result
Host: localhost
Database: newich_drpl1
Generation Time: Jul 12, 2007 at 12:56 PM
Generated by: phpMyAdmin 2.10.0.2 / MySQL 4.1.22-standard
SQL query: SELECT * FROM `spam_custom` LIMIT 0, 30 ;
Rows: 3

scid filter style effect action matches last
1 /ambien/i 0 1 0 0 0
2 /peoples/i 0 0 5 0 0
3 /people/i 0 0 5 0 0

jeremy’s picture

Category: bug » support

You have built "regex" custom filters, but then set them as "plain text". This is what is causing your error. Go in and reconfigure these custom filters, setting them to be regex, and that should resolve the error.

(Note filter's 2 and 3 are redundant -- the way the filters work, searching for "people" will also find "peoples".)

nancydru’s picture

Does this look better:
filtersort icon style scan effect action matches last match operations
/ambien/i regex everything always spam DELETE none none scan edit delete
/people/i regex header only always spam DELETE none none scan edit delete

jeremy’s picture

Yes, that looks correct now. Before, the third column was '0' when it should have been '1' to signify 'regex'. It's confusing that you've reformatted, but I'm assuming you're saying you've updated the custom filters -- did the error go away?

BTW: I recommend you do not use the DELETE action -- not only will it cause content to be deleted before you can review it, but worse it is very expensive on the CPU and makes it easier for a spammer to DoS you. Instead, if you want to get rid of spam quickly I recommend you instead go to "admin >> settings >> spam" and in the advanced section set a low "Discard spam logs older than:" value.

jeremy’s picture

I mean "Expire spam after:", not "Discard spam logs older than:".

nancydru’s picture

The reformatting is just that I copied the information from the spam filters page rather than a sql query.

Okay I turned off DELETE. The problem with expiring spam quickly is the blacklisting feature is limited...

jeremy’s picture

Sure, but it's the same (even worse) with DELETE -- if you instantly delete the spam, then there is NO blacklisting possible.

nancydru’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
davidwhthomas’s picture

Status: Closed (fixed) » Fixed

for anyone else looking, I had the same error in pathauto and found a solution.

It turns out the WYSIWYG editor was enabled for one of the settings form textareas.

This caused HTML <p></p> tags to be wrapped around the value.

The tags weren't escaped properly for a regular expression and hence caused the error.

Disabling the rich text editor for the pathauto settings page fixed the issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.