DebugQ - De:Bug:Q

Go Back   DebugQ - De:Bug:Q > DebugQ > Linux
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
Thread Tools Display Modes
  #1  
Unread 09-14-2015, 12:43 PM
Debugger Debugger is offline
Administrator
 
Join Date: Oct 2007
Posts: 895
Default 500 Internal Server Error

Q: 為什麼 PHP 程式出現 "500 Internal Server Error" 的錯誤?


   

Reply With Quote
  #2  
Unread 09-14-2015, 12:44 PM
Debugger Debugger is offline
Administrator
 
Join Date: Oct 2007
Posts: 895
Default

PHP 程式出現 500 錯誤大多是因為 PHP 檔案或目錄的權限被設定為 777 或 666

這是非常不安全、所有人都可以寫入的權限
所以主機拒絕執行該 PHP 檔案
請將 PHP 檔案的權限設定為 644 或 640
PHP 所在的目錄權限設定為 755
即可解決此問題



另外 upload、cache 之類 PHP 用來上傳的目錄也請勿設定為 777
因為我們使用 suPHP 的機制
所以 PHP 程式可以直接讀寫您帳號下的目錄


   

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT. The time now is 03:25 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
DebugQ - Debug Quote - De:Bug:Q