studius Posted December 26, 2017 Posted December 26, 2017 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.
Krydos Posted December 26, 2017 Posted December 26, 2017 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?
studius Posted December 26, 2017 Author Posted December 26, 2017 Here is the link: http://valid.studius.gq/verify.php All the permissions seem to be set correctly and I've tried searching for the .htaccess file but it doesn't show up in cPanel's File Manager. Thanks!
Krydos Posted December 27, 2017 Posted December 27, 2017 -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?
studius Posted December 27, 2017 Author Posted December 27, 2017 Oh, thank you so much. With all the 6s and 4s I thought I had them all but missed one.
studius Posted December 30, 2017 Author Posted December 30, 2017 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: <?phpob_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?
studius Posted December 30, 2017 Author Posted December 30, 2017 (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 December 30, 2017 by studius
Krydos Posted December 31, 2017 Posted December 31, 2017 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.
studius Posted August 3, 2018 Author Posted August 3, 2018 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.
wolstech Posted August 3, 2018 Posted August 3, 2018 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. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now