Jump to content

Recommended Posts

Posted

Hello,

 

I had a similar issue with 500 Internal Server Error. All my permissions are correct (755 for directories and 644 for PHP files).

 

The error also mentions the following:

"Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request." as well as something about an using an ErrorDocument to handle the request.

 

What does this mean and how do I proceed? Thanks.

Posted

Can you post a link to your php script that is giving a 500 error?

 

Permissions is a common reason for 500 errors. .htaccess files are probably the second biggest reason for 500 errors. Have you tried deleting or renaming the .htaccess files?

Posted

-rw-rw-r--. 1 studius studius 1300 Dec 26 11:45 verify.php
^
|
Does it work if you make that file 644 instead of 664?
Posted

Hello,

 

I came across another 500 Internal Server Error when I tried to access a page using PHP from a PHP page in another directory path. Here is the code below:

 

<?php
ob_start();
require("../valid/db.php");
if (!$_SESSION['logged_in']) {
header("Location:../valid/login.php");
die();
}
?>
Where am I going wrong and why is the redirect not occurring?
Posted (edited)

The path to the script I'm currently on is https://hier.studius.gq/clubs.php and when users attempt to access this page I want to redirect them to https://valid.studius.gq/index.php if they are not logged in. The second page will execute https://valid.studius.gq/login.php that returns a session variable "logged_in" that I then use as a variable in the first script to check log in status using boolean logic.

 

However, on the loading the page clubs.php itself I receive a 500 Internal Server Error possibly because of something going on between the two.

Edited by studius
Posted

Php files have to be 644 otherwise they result in a 500 error.

-rw-rw-r--.  1 studius studius 21392 Dec 29 20:26 clubs.php
clubs.php is 664.
  • 7 months later...
Posted

Hello again,

 

I'm getting the same 500 Internal Server Error again but this time I've checked and double checked all the permissions for directories with php files (755) and php files (644).

 

This time, all pages on the domain are giving the same error, regardless of whether they are html or php files. The last thing I did before this happened was modify the .htaccess file on the root folder of my domain (studius.gq). Please help, thank you.

Posted

Rename the htaccess so its ignored and see if it goes away. An htaccess with invalid statements/syntax errors/etc. will cause a 500 error.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...