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
Donovan
Client



Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Sat Mar 04, 2006 9:55 am Reply with quote

I have been getting this page sporatically when accessing some of the admin scripts in my module.

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

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


Every script in my admin folder pretty much has the same block of code in the begining:

Code:
if ( !defined('ADMIN_FILE')) {

   die("Illegal File Access");
}

define('INDEX_FILE', false);
$index = 0;
get_lang($module_name);
include_once("header.php");
$module_name = basename(dirname(__FILE__));
global $module_name, $db, $prefix;


And they all make use of $admin_file such as:

Code:
echo "<form name=\"addmedal\" action=\"".$admin_file.".php\" method=\"post\">";


Should I also declare $admin_file as global? Would this help, or is this hit or miss?
 
View user's profile Send private message Visit poster's website ICQ Number
montego
Site Admin



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

PostPosted: Sat Mar 04, 2006 12:01 pm Reply with quote

If you are using it within a function, most definitely define it at the top of the function definition as global. I have forgotten this many a time and with the same affect. Embarassed

Now, this also assumes that you have already included mainfile.php, which is where the config.php script gets included.

_________________
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
Donovan







PostPosted: Sat Mar 04, 2006 3:50 pm Reply with quote

Would I include mainfile.php only in my admin/index.php, or include mainfile.php in all my pages as well?
 
montego







PostPosted: Sat Mar 04, 2006 5:16 pm Reply with quote

In my opinion, you really should have your admin/index.php script "drive" everything. I even set my own define at the top of my index.php and test for that define through all my included pages so that I am only using the ADMIN_FILE test once through my index.php.

If ALL your functions go through your case.php/index.php, then mainfile.php can be called once there.

However, this may or may not be the case with header.php and footer.php. Depending on what you need to do, you may wish to control these through each individual script. Really depends on what you are needing to control in the output. To be honest, I would bet that including header.php somewhere before your case statement in your index.php and then the footer.php before the closing of your index.php would be what you want. But, again, it depends on your design and what your admin module needs to do.
 
craeyon
Hangin' Around



Joined: Jun 04, 2006
Posts: 40

PostPosted: Wed Jul 19, 2006 11:01 pm Reply with quote

I am having pretty much the same problem but its not limited to the modules. Well if Newsletter is a module then ok i am having the same problem. (When i hit preview it shows me that exact error) plus this is on other parts of the admin system too. Everything was working perfectly but this started to happen recently.

I tried to understand the php lingo up there but i m helpless. i am having trouble accessing alot of my superadmin tools. Any suggestions as to how i can fix this?

Thank you.
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Thu Jul 20, 2006 12:14 am Reply with quote

I would start by looking at what you have changed on the site recently - new blocks, new modules, updates etc.
These errors usually occur for a reason and do not normally 'just start happening' without some sort of 'help'.
 
View user's profile Send private message Send e-mail
craeyon







PostPosted: Thu Jul 20, 2006 10:11 am Reply with quote

nothing i didn't change anything. the last thing i changed was that userinfo block as in installed it. But..that was a long time ago.

plus now my users are starting to get this:

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.
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Thu Jul 20, 2006 11:59 am Reply with quote

A server can put a restriction on the amount of times a single script is called on, Check to see if your server has done any security upgrades.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Guardian2003







PostPosted: Thu Jul 20, 2006 2:01 pm Reply with quote

Link to your site?
 
craeyon







PostPosted: Thu Jul 20, 2006 2:19 pm Reply with quote

Its www.digitaldistrict.net

ok i am not gettin errors now that i perma-delted the User info block. But it was exactly like the one Raven uses on his site

the one that tell whose online and stuff. I don't know what went wrong. But thanks guys.

I really wish there was thing such as a diagnostic test for phpnuke Sad
 
Guardian2003







PostPosted: Thu Jul 20, 2006 3:25 pm Reply with quote

I think Raven has his own who-is-where block for download here that you could try but thaks for confirming that you have found the cause of your problem, I appreciate that.
 
craeyon







PostPosted: Thu Jul 20, 2006 5:27 pm Reply with quote

YUP Very Happy

ok yeah umm i see Raven has a much different "Site Info" block. And for some reason i cannot find it under his downloads. Any suggestions? Should i email raven?

Thanks.
 
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 ©