Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
codsniper
Regular
Regular


Joined: Feb 19, 2007
Posts: 61
Location: Almost at the north-pole

PostPosted: Thu Jan 31, 2008 5:54 am Reply with quote

I have a nuke site with version 7.8 and when I try to access Groups
Code:
modules.php?name=Forums&file=groupcp

in forums i get this message:

Quote:
Forbidden
You don't have permission to access /modules.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


What could cause this? Thats the only module that gives me this. I have tried to use a Forums module from ravens and also tried to change theme. No luck so far..
 
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Sun Feb 03, 2008 1:57 am Reply with quote

This looks like possibly a bad rewrite rule. If you directly type the url, as in Only registered users can see links on this board! Get registered or login! , does that let you in?
 
View user's profile Send private message
codsniper
PostPosted: Sun Feb 03, 2008 4:04 am Reply with quote

No, cause it looks the same, just gets altered when I type it in this forum
 
Raven
PostPosted: Sun Feb 03, 2008 12:06 pm Reply with quote

Then you definitely have a rewrite rule issue. You need to trace where the rewrite rule is making the error.
 
codsniper
PostPosted: Sun Feb 03, 2008 12:31 pm Reply with quote

Nono, the link looks like the one you posted above, and its like that when I click it. Its just that i get that error page..
 
Raven
PostPosted: Sun Feb 03, 2008 12:39 pm Reply with quote

Right. What's happening is that it tries to redirect to an invalid link.
 
codsniper
PostPosted: Tue Feb 05, 2008 1:32 am Reply with quote

Site has been down for a while but now its back and here you can see what i mean: Only registered users can see links on this board! Get registered or login!

Press groups there. I cant find any redirects from that, is there is how and where should i look for it..?
 
Trubador
Regular
Regular


Joined: Dec 28, 2004
Posts: 94

PostPosted: Tue Feb 05, 2008 4:16 am Reply with quote

I've seen this before somewhere.......

Do you get the same when you try to moderate any of your forums?

If so it may well be something to do with Mod_Security on your server.

You'll have to ask your server host to disable it.

TTFN

Trub
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9456
Location: Arizona

PostPosted: Tue Feb 05, 2008 6:06 am Reply with quote

Trubador wrote:
You'll have to ask your server host to disable it.


Or better yet, if they can adjust the offending rule.

I agree, though, it does sound like it could be Mod_Security.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Trubador
PostPosted: Tue Feb 05, 2008 6:41 am Reply with quote

Yeah I just went back through my past emails.

I had problems with any links containing "groupcp" and "modcp" with 404 errors.

montego is right. Ask them to remove the rules containing these two phrases for mod_security.

I dont think I had any trouble with any other phrases apart from the above two.

TTFN

Trub
 
codsniper
PostPosted: Tue Feb 05, 2008 9:16 am Reply with quote

Its only the group link that dont work, moderate and all others are just fine
 
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1159
Location: Sanbornton, NH USA

PostPosted: Tue Feb 05, 2008 10:46 am Reply with quote

Quite frankly, this looks like a simple mod_rewrite issue.

Please open your .htaccess file and do a search by "groupcp" (without the quotes).

There should be 3 lines of code that create the correct format for the three different possible command types for this function.

I am using GT-NexGen in this example so I will show you all three parts of the code that should be in two files. (Consult your particular GoogleTap documentation for the exact location of your corresponding gt commands beyond the .htaccess file)

Please note that this is right out of the custom code that I wrote for my particular domain and there is little or no chance that my code will match yours because most of the mod rewrites for Nuke that I have seen are very much incomplete and I believe this is one of the codes I had to fix several years back.

GT NextGen example:
.htaccess file
Code:
RewriteRule ^forums-group([0-9]*)([a-z]*).html forums.html?file=groupcp&g=$1&validate=$2 [L]

RewriteRule ^forums-group([0-9]*).html forums.html?file=groupcp&g=$1 [L]
RewriteRule ^forums-group.html forums.html?file=groupcp [L]


IN Code for groupcp function found in: /GoogleTap/GT-forums.php
Code:
"'(?<!/)modules.php\?name=Forums&amp;file=groupcp&amp;g=([0-9]*)&amp;validate=([a-z]*)'",

"'(?<!/)modules.php\?name=Forums&amp;file=groupcp&amp;g=([0-9]*)'",
"'(?<!/)modules.php\?name=Forums&amp;file=groupcp'",


Corresponding OUT Code for groupcp function. Please note how this matches up with my .htaccess file so you can rename these but they must match the .htaccess file.
Code:
"forums-group\\1\\2.html",

"forums-group\\1.html",
"forums-group.html",


This will resolve your issue because at present, your link to this function is malformed. This will correct the problem by having the link end in .html accommodating the mod.

Steph

_________________
Steph Benoit Only registered users can see links on this board! Get registered or login!
1CMS, 100% Section 508 and W3C XHTML/CSS Compliant (Truly) 
View user's profile Send private message Visit poster's website
codsniper
PostPosted: Tue Feb 05, 2008 11:02 am Reply with quote

Hmm.. Dont use google tap, dont have those entries in .htaccess so dont know what to do..
 
64bitguy
PostPosted: Tue Feb 05, 2008 11:06 am Reply with quote

Well, if your links are ending in .html with nuke, you are using SOMEONE'S GoogleTap.

Where did you get your version of 7.8?
What is in the .htaccess file in the root of your Nuke Installation?
Meaning, do you have anything in there that starts with:
Code:
RewriteRule


Last edited by 64bitguy on Tue Feb 05, 2008 11:11 am; edited 1 time in total 
codsniper
PostPosted: Tue Feb 05, 2008 11:09 am Reply with quote

There is no html in the links, I got the 7.8 from evaders and its a standard .htaccess..
Only registered users can see links on this board! Get registered or login!
 
64bitguy
PostPosted: Tue Feb 05, 2008 11:14 am Reply with quote

I See. the "forums.html?file=groupcp" threw me off.

Please post the first 10 lines of code in the file modules/Forums/groupcp.php

(After the comments).

Thanks
 
codsniper
PostPosted: Tue Feb 05, 2008 11:25 am Reply with quote

Code:


<?php
/***************************************************************************
 *                               groupcp.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : Only registered users can see links on this board! Get registered or login!
 *
 *   $Id: groupcp.php,v 1.58.2.27 2006/12/16 13:11:24 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");

define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

 
64bitguy
PostPosted: Tue Feb 05, 2008 11:52 am Reply with quote

It's almost like there is an issue with permissions between the db and modules.php.

I am kind of weirded out that your first lines of code differ from the standard of:

Code:
if ( !defined('MODULE_FILE') )

{
   die("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");

define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

but that shouldn't be the cause of the problem.

I'm assuming you have already created groups via your forums/admin panel and now you are trying to look them up and use this function. Keep in mind, no groups, no function.

If this is evaders code, I'd have him look at it. If it's out of the box junk nuke code, I'd say make sure it is all patched. If you want, you can give me your modules.php and your complete groupcp.php and I can compare them to the 50 versions of them that I have.
 
codsniper
PostPosted: Tue Feb 05, 2008 12:01 pm Reply with quote

Its standard nuke 7.8 patched to 3.3...
I worked before, but not anymore and yes there are two groups and I have used those before. Thats why I dont get it..
 
64bitguy
PostPosted: Tue Feb 05, 2008 12:06 pm Reply with quote

When you say it worked "before".. before what?
 
codsniper
PostPosted: Tue Feb 05, 2008 12:13 pm Reply with quote

Last time I used it, no changes done on the site.. Thats why im boggled about this...
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Feb 05, 2008 3:45 pm Reply with quote

It is the standard Patched code. I've checked with the 7.8 I'm running. It is not a problem with the code.

Pretty sure its a mod_security problem... any link that includes 'groupcp' is rejected

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©