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:
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,
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?
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:
<?
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: