28, May 2012

One new page wont allow access - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: One new page wont allow access
« previous next »
Pages: [1] Print

Author Topic: One new page wont allow access  (Read 1260 times)
Raped By Google
*
Gender: Male
Posts: 27
206 credits
Members referred : 0

PPC 4 Real Estate


« on: Feb 24, 2007, 06:25:23 am »

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><?
« Last Edit: Feb 24, 2007, 06:29:02 am by RealEstateAdvertis »
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Feb 24, 2007, 07:31:45 am »

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?

Raped By Google
*
Gender: Male
Posts: 27
206 credits
Members referred : 0

PPC 4 Real Estate


« Reply #2 on: Feb 24, 2007, 07:25:52 pm »

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!
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6100
Tags : access user class Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: One new page wont allow access
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 05:12:26 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.