Jump to content

Recommended Posts

Posted

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 1

My .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

Posted

So, you had 2 errors

  • public_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.
  • 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...