2019年1月26日 星期六

500 Internal Server Error

Fixing scriptcase permission on your host
Some users have problems regarding permissions. When they are uploading files you can a message likes this "500 Internal Server Error" or when trying to creating the connection on scriptcase deploy environment you get an error like this "failed to open stream: Permission denied" or when you to try register in your scriptcase.
The first thing that some people say its to give 777 permission. The first "7" is the total permission for the owner, the second one is for the group and the third "7" is for everyone. Here is the trick, for hosts company, a permission 777 is a security issue for php files. "Everyone" can't have total permission. So you cant an internal server error.
The correct permissions are:
    Folders: 755
    Files: 644
So, how to fix?

Step-by-step:
1. Open a shell (or putty on windows) and log in into your SSH account;
2. Execute this command at the prompt for folders:
find /home/YOURUSER/public_html/ -type d -exec chmod 755 {} \;
3. Execute this command at the prompt for files:
find /home/YOURUSER/public_html/ -type f -exec chmod 644 {} \;

Execute this command at the prompt for fix owner (only if the files aren't if your username):
chown YOURUSER.YOURUSER /home/YOURUSER/public_html/ -R

沒有留言:

張貼留言

如何判斷現在FORM是在 insert mode? 還是 update mode?

只要用  if (empty({primary_key})) 就可以知道是否為新增模式了。 如果 {promary_key} 是空白的,那麼就是在新增模式;反之,就是更新模式。 以上。