Skip to main content

PHP file is displaying generic 403 Forbidden

Comments

2 comments

  • Benjamin D.
    I found the solution in another forum. ModSecurity has 2 rules that were interfering with my script, hope this helps somebody coming here in the future: If your PHP script has ANY passed variable named "session_id" (POST, GET, COOKIE, etc...?) even if it has nothing to do with PHP's sessions at all (e.g.: $_POST['session_id"> = "This is arbitrary content or my own session ID that has nothing to do with PHP sessions.") then ModSecurity will cut the execution and display a generic 403 Forbidden when your script is called. The 2 rules to disable (or duplicate and modify) in WHM > ModSecurity" Tools > Rules list (top right) were: # 943110 # 943120 (or just search your variable's name in the search bar and check for other rules containing them in their RegEx) Problem solved :)
    0
  • cPWilliamL
    Glad to see you found the issue @Benjamin D. and thanks for sharing the solution!
    0

Please sign in to leave a comment.