CakePHP 500 Internal Server Error

最后都变了- 提交于 2019-11-30 09:34:27

There can be following reasons for 500 Internal Server Error in CakePHP application:

  1. Your .htaccess files are not correct. See Here for details
  2. Permissions of folders are not correct. If CakePHP app is Group Writable i.e. 777 then webserver gives 500 error for safety.
  3. You are missing Database Connection. Correct database configuration according to Webhost because most of times local and production server databases have different details.
  4. Delete the content of your tmp folder. It is best practice that you must delete cache if you move your application from one place to another.
  5. For testing purpose debug should be on like Configure::write('debug',2);
  6. If not succeeded check your Apache Error Log. If using Linux /var/log/apache2/error.log

Hope It Helps, Thanks!!

Ash

check that when you assign Auth in your $components in AppController, define

public function beforeFilter(){
    //$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
    $this->Auth->allow('index');
}

You must enable the intl extension to use CakePHP.
You are getting error in /var/www/html/config/bootstrap.php on line 38

On CentOS server I usually fix this issue by using chmod -R 755 public_html from current cPanel user directroy.

For example:

 chmod -R 755 /home/{cp_username}/public_html/

There is also alternative method doing this via cPanel GUI:

Just enable 'mbstring' and 'intl' modules in your host panel.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!