phpbb board error: 412 Precondition Failed on PM messaging

 
Post new topic   Reply to topic    34SP.com Forum Index // Database Support
View previous topic :: View next topic  
Author Message
caffrey75
34SP Newbie
34SP Newbie


Joined: 07 Sep 2001
Posts: 35

PostPosted: Tue Oct 20, 2009 10:50 am    Post subject: phpbb board error: 412 Precondition Failed on PM messaging Reply with quote
Hi,

Some of my members have reported this error when they try to PM each other directly from a message thread on a PHPBB 3.5 board. I'm able to replicate this problem myself when I click Add[BCC] in the Send To panel on the PM screen.

Other members seem to be getting random occurences of this problem when they attempt other actions too.

Error: White screen with

Quote:
Precondition Failed

The precondition on the request for the URL /newforum/ucp.php evaluated to false.
Apache/2.0.63 (FreeBSD) DAV/2 mod_fastcgi/2.4.2 mod_python/3.3.1 Python/2.5.1 PHP/5.2.6 with Suhosin-Patch mod_ssl/2.0.63 OpenSSL/0.9.7e-p1 mod_perl/2.0.3 Perl/v5.8.8 Server at www.silverblades.ismysite.co.uk Port 80


I've been looking on these forums for this problem and have found other users getting a similar error for other things, but I'm not sure I understand the solution being offered or even if that solution (involving sticking a line in the htaccess file) is relevant to me.

Any advice or forwarding would be appreciated. Thanks in advance
Back to top
View user's profile Send private message
imknight
Administrator
Administrator


Joined: 16 Mar 2001
Posts: 3627
Location: Stroud,Gloucestershire

PostPosted: Tue Oct 20, 2009 4:41 pm    Post subject: Reply with quote
Take a look in your error_log you should see a mod_security message, let us know what this and we can show you how to get around this.
_________________
Ian
34SP.com
Easy script installers for a small number of popular scripts are now available at http://scripts.34sp.com
Used our script installers? Please post your site here

| Wordpress Hosting |
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
caffrey75
34SP Newbie
34SP Newbie


Joined: 07 Sep 2001
Posts: 35

PostPosted: Tue Oct 20, 2009 6:33 pm    Post subject: Reply with quote
imknight wrote:
Take a look in your error_log you should see a mod_security message, let us know what this and we can show you how to get around this.


Do you mean the error-_log on my Phpbb forum? I've checked this in the Administration Panel and there are no entries at all
Back to top
View user's profile Send private message
imknight
Administrator
Administrator


Joined: 16 Mar 2001
Posts: 3627
Location: Stroud,Gloucestershire

PostPosted: Wed Oct 21, 2009 3:59 pm    Post subject: Reply with quote
No the actual apache error_log

If you login to siteadmin and goto your domain and the log manager - you will see the error_log in this section.

Look for an entry around the time of the issue that you had then post whats in there that mentions mod_security.
_________________
Ian
34SP.com
Easy script installers for a small number of popular scripts are now available at http://scripts.34sp.com
Used our script installers? Please post your site here

| Wordpress Hosting |
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
caffrey75
34SP Newbie
34SP Newbie


Joined: 07 Sep 2001
Posts: 35

PostPosted: Wed Oct 21, 2009 10:12 pm    Post subject: Reply with quote
Ah, right - thanks

OK, I generated an error that which showed up as:

Quote:
[Wed Oct 21 23:06:49 2009] [error] [client 86.160.81.74] mod_security: Access denied with code 412. Pattern match "\\"" at POST_PAYLOAD [id "34sp07171202"] [rev "2"] [msg "PBLang Local File Inclusion"] [severity "ALERT"] [hostname "www.silverblades.ismysite.co.uk"] [uri "/newforum/ucp.php?i=pm&mode=compose&action=quotepost&sid=424c17ab5ed33192f6d4523430f5e966&p=11341"] [unique_id "MgzvHFBSc1sAAHreMysAAAAY"]
[Wed Oct 21 23:06:49 2009] [error] (9)Bad file descriptor: mod_security: apr_global_mutex_lock(modsec_auditlog_lock) failed
[Wed Oct 21 23:06:49 2009] [error] (9)Bad file descriptor: mod_security: apr_global_mutex_unlock(modsec_auditlog_lock) failed


One other rather worrying thing I noticed were lots and lots of other errors that I assumed must have been generated by other users, because I've had no problem. An example of one of these is -


Quote:
[Wed Oct 21 13:12:28 2009] [error] [client 82.71.38.134] File does not exist: /usr/local/psa/home/vhosts/silverblades.ismysite.co.uk/httpdocs/favicon.ico


- on the offchance that you might know what this refers to. Thanks for your help thus far
Back to top
View user's profile Send private message
imknight
Administrator
Administrator


Joined: 16 Mar 2001
Posts: 3627
Location: Stroud,Gloucestershire

PostPosted: Thu Oct 22, 2009 7:57 am    Post subject: Reply with quote
For the first issue add the following to a file named .htaccess in httpdocs.

<IfModule mod_security.c>
SecFilterRemove 34sp07171202
</IfModule>


Re the favicon.ico this is the litle graphic you see to the left of the url in the addressbar in your browser, more information on this can be found at : http://www.favicon.co.uk/whatisfavicon.php
_________________
Ian
34SP.com
Easy script installers for a small number of popular scripts are now available at http://scripts.34sp.com
Used our script installers? Please post your site here

| Wordpress Hosting |
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
caffrey75
34SP Newbie
34SP Newbie


Joined: 07 Sep 2001
Posts: 35

PostPosted: Thu Oct 22, 2009 9:29 am    Post subject: Reply with quote
Thanks very much for your help
Back to top
View user's profile Send private message
garethb
34SP Newbie
34SP Newbie


Joined: 07 Jun 2008
Posts: 8

PostPosted: Thu Dec 10, 2009 9:44 am    Post subject: Reply with quote
Hi there - I seem to be having the same problem at www.diecastnewsandchat.com - am running phpbb 3.0.6 and have narrowed down the error 'apparently'? to people using a " in a private message.

Users get this...
Quote:
Precondition Failed

The precondition on the request for the URL /forum/ucp.php evaluated to false.

Apache/2.0.59 (FreeBSD) DAV/2 mod_fastcgi/2.4.2 PHP/5.2.3 with Suhosin-Patch mod_python/3.3.1 Python/2.4.4 mod_ssl/2.0.59 OpenSSL/0.9.7e-p1 mod_perl/2.0.3 Perl/v5.8.8 Server at www.diecastnewsandchat.com Port 80


I tried including the code snippet above in the .htaccess file for the domain but it doesn't seem to have made any difference.
Any suggestions?
_________________
www.batifans.com
www.alvarobautista.co.uk
Back to top
View user's profile Send private message
imknight
Administrator
Administrator


Joined: 16 Mar 2001
Posts: 3627
Location: Stroud,Gloucestershire

PostPosted: Fri Dec 11, 2009 8:43 am    Post subject: Reply with quote
Check you error_log in the statistics/logs folder and see what lines you are getting in there for mod_security and then post the full line.
_________________
Ian
34SP.com
Easy script installers for a small number of popular scripts are now available at http://scripts.34sp.com
Used our script installers? Please post your site here

| Wordpress Hosting |
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
garethb
34SP Newbie
34SP Newbie


Joined: 07 Jun 2008
Posts: 8

PostPosted: Thu Jan 21, 2010 7:20 pm    Post subject: Reply with quote
Sorry for the delay...

This looks like it might be to do with it....



[Tue Jan 19 20:20:31 2010] [error] [client 86.157.209.163] mod_security: Access denied with code 412. Pattern match "\\"" at POST_PAYLOAD [id "34sp0806011"] [rev "2"] [msg "UCP POSSIBLE QUOTE ISSUE"] [severity "ALERT"] [hostname "www.diecastnewsandchat.com"] [uri "/forum/ucp.php?i=pm&mode=compose&action=reply&sid=ca0afdf516ab52cb71095535b0262361&p=889"] [unique_id "M563dlBSc0IAALgtbucAAAAs"]
[Tue Jan 19 20:20:31 2010] [error] (9)Bad file descriptor: mod_security: apr_global_mutex_lock(modsec_auditlog_lock) failed
[Tue Jan 19 20:20:31 2010] [error] (9)Bad file descriptor: mod_security: apr_global_mutex_unlock(modsec_auditlog_lock) failed


Does that help?
_________________
www.batifans.com
www.alvarobautista.co.uk
Back to top
View user's profile Send private message
Rick Jones
34SP Newbie
34SP Newbie


Joined: 30 Mar 2001
Posts: 52
Location: Chale Green, sunny Isle of Wight

PostPosted: Mon Jan 25, 2010 1:44 pm    Post subject: Reply with quote
I've also just hit a Precondition Failed error when trying to post to a forum. After looking at the log I discovered the cause, and it's bizarre (and wrong!).

The log entry says:
[Mon Jan 25 13:31:15 2010] [error] [client 82.153.174.82] ModSecurity: [file "/etc/httpd/modsecurity.d/30_asl_antispam.conf"] [line "38"] [id "300001"] [rev "8"] [msg "Atomicorp.com WAF Rules: Blacklist Spam Domain"] [data ""] [severity "CRITICAL"] Access denied with code 412 (phase 2). Matched phrase "utt.org" at ARGS:message. [hostname "new.macgregorowners.org.uk"] [uri "/forum/posting.php"] [unique_id "LwCsFlBSee8AAH-q4AwAAAAX"]

Notice ' Matched phrase "utt.org" ', well it turns out my post contained an email address someone@strutt.org. Removing this allowed the post.

Seems to me the anti-spam parser is a bit dumb, because strutt.org is NOT utt.org. Any chance this can be fixed?

Cheers, Rick Jones
Back to top
View user's profile Send private message Send e-mail Visit poster's website
garethb
34SP Newbie
34SP Newbie


Joined: 07 Jun 2008
Posts: 8

PostPosted: Sat Feb 20, 2010 1:14 pm    Post subject: Reply with quote
Just bumping this...
A reminder - my users get an error when sending PMs which include a double-quote-mark (")

garethb wrote:

This looks like it might be to do with it....



[Tue Jan 19 20:20:31 2010] [error] [client 86.157.209.163] mod_security: Access denied with code 412. Pattern match "\\"" at POST_PAYLOAD [id "34sp0806011"] [rev "2"] [msg "UCP POSSIBLE QUOTE ISSUE"] [severity "ALERT"] [hostname "www.diecastnewsandchat.com"] [uri "/forum/ucp.php?i=pm&mode=compose&action=reply&sid=ca0afdf516ab52cb71095535b0262361&p=889"] [unique_id "M563dlBSc0IAALgtbucAAAAs"]
[Tue Jan 19 20:20:31 2010] [error] (9)Bad file descriptor: mod_security: apr_global_mutex_lock(modsec_auditlog_lock) failed
[Tue Jan 19 20:20:31 2010] [error] (9)Bad file descriptor: mod_security: apr_global_mutex_unlock(modsec_auditlog_lock) failed


Does that help?

_________________
www.batifans.com
www.alvarobautista.co.uk
Back to top
View user's profile Send private message
Post new topic   Reply to topic    34SP.com Forum Index // Database Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2002 phpBB Group