Forbidden access to index

Status
Not open for further replies.

jornald2

New Member
Messages
9
Reaction score
0
Points
1
Forbidden
You don't have permission to access /index.php on this server.

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

This appends when i do a submission to the database, when i get from database this does not append, everything was working fine until 2 weeks ago.
Using PDO in php.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Please provide instructions how to reproduce the error, I can't tell exactly what is causing it from the logs. It looks like you're POSTing URLs to a script?
 

jornald2

New Member
Messages
9
Reaction score
0
Points
1
It's kinda that, I'm posting to the database (it doesnt submit to the database), and then I do a redirect with a post to a function that redirects with a jquery function to the currect page and sub url.

Example: after I submit, it's called this function:
PHP:
function redirect($page,$last){
    if($page != null){
        $page = "index.php?pagina=$page";
    }else{
        $page = $_SERVER['REQUEST_URI'];
    }
    if($_SERVER["QUERY_STRING"] == null || $_SERVER["QUERY_STRING"] == ""){
        $char = "?";
    }else{
        $char = "&";
    }
    echo "<script type='text/javascript'>location.href='$page$char$last'</script>";
}

and then it gives the error, it was fine until the server update last month...
I have the website stoped for 1 month...

PS: php redirect function does not work with my site code, so i cannot update the whole website again...
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
What does your URL look like when $page exists and there is a query string?
 

jornald2

New Member
Messages
9
Reaction score
0
Points
1
The query string looks fine, it shows what it supost to show, I do $_POST to the database not using $_GET (this is a fail in security)

URL:
7299462765416313ef310f22fc3cd7c6.png


The screen shows me this:
31bc17af02e6ebba427d0e92228687e9.png
 

jornald2

New Member
Messages
9
Reaction score
0
Points
1
Forgot to mention that I did the website core in a single page (Front End), using only index and including everything to it.
 
Status
Not open for further replies.
Top