+ Reply to Thread
Results 1 to 6 of 6
Like Tree2Likes
  • 1 Post By kbjradmin
  • 1 Post By LongJohnnyE

Thread: Forbidden page problem after updating..

  1. #1
    chibib0 is offline x10Hosting Member chibib0 is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    46

    Forbidden page problem after updating..

    I got this Forbidden error page while updating a link in a mysql table.
    For example, I would like to update the tracker.css URL link in my profile info, after clicking the update button i got this:

    Forbidden
    You don't have permission to access /update-profileck.php on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache Server at mysite.com Port 80
    But if I input a text/word like "test" = it works
    but if a URL link like "http://domain.com/test/tracker.css" = forbidden error.


    here is the php code of update-profileck.php,
    PHP Code:
    <?
    include "include/session.php";

    include 
    "include/z_db.php";
    //////////////////////////////

    /*
    while (list ($key,$val) = each ($_POST)) {
    $$key = $val;
    }
    */

    ?>
    <!doctype html public "-//w3c//dtd html 3.2//en">

    <html>

    <head>
    <title>(Type a title for your page here)</title>
    <meta name="GENERATOR" content="Arachnophilia 4.0">
    <meta name="FORMATTER" content="Arachnophilia 4.0">
    </head>

    <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
    <?
    $todo
    =$_POST['todo'];
    $name=$_POST['name'];
    $css=$_POST['css'];
    $email=$_POST['email'];
    $sex=$_POST['sex'];
    // check the login details of the user and stop execution if not logged in
    require "check.php";

    if(isset(
    $todo) and $todo=="update-profile"){

    // set the flags for validation and messages
    $status "OK";
    $msg="";

    // if name is less than 5 char then status is not ok
    if (strlen($name) < 5) {
    $msg=$msg."Your name  must be more than 5 char length<BR>";
    $status"NOTOK";}    

    if (
    strlen($css) < 5) {
    $msg=$msg."Your new CSS Link must be more than 5 char length<BR>";
    $status"NOTOK";}

    if(
    $status<>"OK"){ // if validation failed
    echo "<font face='Verdana' size='2' color=red>$msg</font><br><input type='button' value='Retry' onClick='history.go(-1)'>";
    }else{ 
    // if all validations are passed.
    if(mysql_query("update users set email='$email',name='$name',css='$css',sex='$sex' where CONVERT(`users`.`userid` USING utf8)='$_SESSION[userid]'")){
    echo 
    "<font face='Verdana' size='2' color=green>You have successfully updated your profile<br></font>";
    }else{echo 
    "<font face='Verdana' size='2' color=red>There is some problem in updating your profile. Please contact site admin<br></font>";}
    }}

    require 
    "bottom.php";
    ?>

    </body>

    </html>
    I already CHMOD the file to 777 and 755 and i still get this error.
    After and during the upgrades/updates, I and my users encounter this problem sometimes. Any help?
    Last edited by chibib0; 01-18-2009 at 12:22 AM.

  2. #2
    tittat's Avatar
    tittat is offline x10 Spammer tittat is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Kerala,India
    Posts
    2,479

    Re: Forbidden page problem after updating..

    Can you please post here what your cpanel error log says...
    Go to cpanel>>Error logs.
    Have tried CHMODing update-profileck.php to 644 ???
    PLAY ONLINE GAMES
    WWW.TMONDO.COM PlayFar Flash Games
    Former X10 Forum Senior Moderator(Retired)


  3. #3
    LongJohnnyE is offline x10Hosting Member LongJohnnyE is an unknown quantity at this point
    Join Date
    Feb 2009
    Posts
    2

    Re: Forbidden page problem after updating..

    I have this same error. When I try to go to /lib/ajax/handler.php (for example) I get a 403 error. I can access .html files in there, but not .php.
    Last edited by LongJohnnyE; 02-15-2009 at 01:20 AM.

  4. #4
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: Forbidden page problem after updating..

    like tittat said, check the file permissions, and if you don't have permission to access the files in the way you want, use CHMOD.
    karimirt47 likes this.

  5. #5
    LongJohnnyE is offline x10Hosting Member LongJohnnyE is an unknown quantity at this point
    Join Date
    Feb 2009
    Posts
    2

    Re: Forbidden page problem after updating..

    I checked that, all the perms for the files I'm trying to get to are 755. I've checked my error logs in cPanel, and after I created my own 403 Error document handler, I'm not getting any more error messages in that console.

    I've also tried adding "allow from all" in a .htaccess file in the directory I'm looking into.

    However, I still can't load the files. Also, what I am trying to do is load the file inside an iframe. I'm having no problems with the exterior files, but anything inside the iframe returns a 403.

    Here is the url I am attempting to call inside the iframe:

    Code:
    /fbapp/ajax/statistics.php?fb_sig_in_iframe=1&fb_sig_locale=en_US&fb_sig_in_new_facebook=1&fb_sig_time=12347548.3397&fb_sig_added=1&fb_sig_profile_update_time=12317371&fb_sig_expires=0&fb_sig_user=1311519&fb_sig_session_key=23e5b73f8398f92e6dbc8-1311519&fb_sig_ss=18e51f3427b563e45557373f25a1ddaa&fb_sig_ext_perms=offline_access%2Cemail&fb_sig_api_key=ccc6231d773b5121726deee94cee&fb_sig_app_id=403236&fb_sig=7f0e95632dfcb4120c26c75655fb
    I'd really appreciate any guidance with this.

    When I try linking directly to the link, I get the same 403 error and the server adds an auth_token to the end of the link.

    Code:
    ?auth_token=6cf72bed07760844c9cc77029a0dee
    Edit:
    I believe mod_security to be the culprit behind my problems. I've submitted a ticket asking for it to be disabled or facebook.com whitelisted for my account (the problem is that facebook acts as a proxy and pulls the page from my account to display to users).

    Any tips?
    Last edited by LongJohnnyE; 02-15-2009 at 06:19 PM. Reason: Automerged Doublepost
    dinomirt96 likes this.

  6. #6
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: Forbidden page problem after updating..

    first, unless you absolutely have to (which you generally don't), you shouldn't use iframes, they are a horrible invention and should be removed from HTML all together.

    second, i don't know how easy that will be. if you're trying to take a page from your account, you would need to authenticate yourself as being yourself, and i don't know if that can be done through an iframe (it probably can, but i have no idea how, and its probably more trouble than its worth).

+ Reply to Thread

Similar Threads

  1. Problem with my page
    By broadfriends in forum Free Hosting
    Replies: 1
    Last Post: 04-06-2008, 02:31 AM
  2. Front Page Problem
    By Cforsyth in forum Free Hosting
    Replies: 2
    Last Post: 11-07-2007, 08:15 PM
  3. Problem Loading Page
    By soyokaze in forum Free Hosting
    Replies: 1
    Last Post: 11-06-2007, 08:12 PM
  4. Do we need to put ads on the cutenews updating news page
    By amy1993882002 in forum Free Hosting
    Replies: 0
    Last Post: 10-03-2006, 09:17 PM
  5. Do frames cause a problem?
    By Shoelace in forum Free Hosting
    Replies: 6
    Last Post: 02-14-2006, 09:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers