Sublime directory Surf the web anonymous Pagerank Monitor


One new page wont allow access

RealEstateAdvertis
Sat 24 February 2007, 06:25 am GMT +0100
Hi,

The script works excellent, but for some strange reason one new page just won't be accessed with the class installed on it.

To get to the page I go through three class protected pages all linked to it -> index.php -> /cat_web_select.php -> /cat_select1.php/8/ and then to the trouble page ->

/directory1.php/39/


THEY ARE ALL IN THE SAME FOLDER - the numbers after the php file extensions are just variables (not folders). That doesn't seem to cause any problems in the previous page (/cat_select1.php/8/) nor in other places such as register.php whenI send a var to it. Without the class installed the page works perfect.

When the page fails to load it gives the following error message -
Forbidden
You don't have permission to access /directory.php/login.php on this server.

Notice that it replaced the /39/ variable with /login.php

Ive checked the code on directory.php for anything that might cause this and I can't see anything. It is a form page that posts to itself. It used a "$Action" that was close a var in the class so I changed it but no change in the problem.

The code for the class has been copied and pasted many times from various working pages. Any one have an idea of what is causing this??

Here is the class code and a little bit of code from beyond the class -

<?include($_SERVER['DOCUMENT_ROOT']."/bungee_jumpers/access_user_class.php");
$page_protect = new Access_user;

// $page_protect->login_page = "login.php"; // change this only if your login is on another page

$page_protect->access_page(); // only set this this method to protect your page

$page_protect->get_user_info();

$hello_name = ($page_protect->user_full_name != "") ? $page_protect->user_full_name : $page_protect->user;



if (isset($_GET['action']) && $_GET['action'] == "log_out") {

$page_protect->log_out(); // the method to log off

}

IF($tion=='SaveList'){
$subcat_limiter=3;
$subcat_limiter=$subcat_limiter+2;
$subcat_counter=2;
//$subcat_limiter is the number of subcats
// 2 is added to get the values into the right array order the first allows room for it to count, the second because the sub cat name begins as 2
// the counter starts at 2 because of main cat is cat1
include ("../includes/connect.php");
$sql = "SELECT * FROM  `cat_2_3` where `cat_1_num` = $cat_1 ";
echo'sql = ', $sql;?><BR><?
$result = @mysql_query($sql, $conn)or die("Couldn't execute 'Edit 3 line 6 Account A' query");
$totalrows = mysql_num_rows(mysql_query($sql));
$totalrows=$totalrows+1;
echo 'totalrows = ', $totalrows;?><BR><?

olaf
Sat 24 February 2007, 07:31 am GMT +0100
i think its the path:

Quote
// $page_protect->login_page = "login.php"; // change this only if your login is on another page

you're telling the script that login.php is in the same folder than the script self, is this true?

RealEstateAdvertis
Sat 24 February 2007, 07:25 pm GMT +0100
With the precision of a diamond cutter, you got me to the solution.

The incoming link to the page was through a direct link. I changed it to a relative link and it is working fine again. Thanks Olaf!

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional