saikoscs Posted July 7, 2017 Posted July 7, 2017 I was trying to port a php based CMD on my account in my public_html folder. But, every time I put index.php in the public_html folder, it throws 500 Internal Server Error.index.html works just fine. I checked that my index.php file has 0644 perm. and all the folder it needs access to, has 0755 perm. Even now it's not doing so. I've put this line in my index.php, so it could show errors : ini_set('display_errors', 1);and this in my .htaccess : php_flag display_errors 1My .htaccess looks like : DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|assets|content|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php?$1 [L,QSA] php_flag display_errors 1 Not sure what's causing this weird problem. I have checked the website and it's working on my local system. Here's the github repo of the project : https://github.com/chocolatkey/FoOlSlide2 Could anyone please look into this and help me? Thank You
Krydos Posted July 7, 2017 Posted July 7, 2017 So, you had 2 errorspublic_html was 777. It needs to be 750. All of the folders inside public_html need to be 755, but public_html itself is special and needs to be 750..htaccess seems to have a syntax error of some sort. I didn't actually look at it. I just renamed it to .htaccess-old and the 500 error went away. So there is something in there it doesn't like. You can debug it by commenting out one line at a time or whatever. 1
saikoscs Posted July 7, 2017 Author Posted July 7, 2017 thanks a lot. I just fixed it up and everything's working just fine. THANK YOU SO MUCH!
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