Closed (fixed)
Project:
Spam
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 May 2007 at 15:05 UTC
Updated:
14 Jul 2012 at 19:31 UTC
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
Comment #1
jeremy commentedWhen are you getting this error? It seems you have defined an invalid filter, can you tell which filter is failing?
Comment #2
nancydruNo, 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.
Comment #3
nancydruIf you want to try an anonymous comment first, it's http://nanwich.info
Comment #4
nancydruPlease 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.
Comment #5
jeremy commentedFirst, 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:
Comment #6
nancydruIt 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
Comment #7
jeremy commentedYou 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".)
Comment #8
nancydruDoes 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
Comment #9
jeremy commentedYes, 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.
Comment #10
jeremy commentedI mean "Expire spam after:", not "Discard spam logs older than:".
Comment #11
nancydruThe 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...
Comment #12
jeremy commentedSure, but it's the same (even worse) with DELETE -- if you instantly delete the spam, then there is NO blacklisting possible.
Comment #13
nancydruComment #14
(not verified) commentedComment #15
davidwhthomas commentedfor 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.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.