CodeIgniter Forums
localhost is currently unable to handle this request. HTTP ERROR 500 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: localhost is currently unable to handle this request. HTTP ERROR 500 (/thread-73447.html)



localhost is currently unable to handle this request. HTTP ERROR 500 - zubairoliyat - 04-25-2019

[font=Arial,]I have this error when i am trying to access a website from wamp, it is done in codeigniter.
Error:
[/font]

Code:
localhost is currently unable to handle this request. HTTP ERROR 500

homeindex controller

Code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class HomeIndex extends CI_Controller {

   public function __construct(){
       parent:: __construct();
       $this->load->helper('html');
       $this->load->helper('form','url','file');
       $this->load->library('session','upload');
   }

   public function index()
   {  
       //$this->load->view('coming_soon');
       $this->load->view('homeIndex');
   }
}

route

Code:
$route['default_controller'] = 'HomeIndex';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

I am able to access other website which are not done using any frameworks.
This website is done using codeigniter. I am not able to access the website.
Can anyone tell me what is the problem?



RE: localhost is currently unable to handle this request. HTTP ERROR 500 - php_rocs - 04-25-2019

@zubairoliyat,

What is your controller name? The name of your controller file must begin with a capital letter ( https://codeigniter.com/user_guide/general/controllers.html?highlight=class%20name#let-s-try-it-hello-world ).


RE: localhost is currently unable to handle this request. HTTP ERROR 500 - warrenfelsh - 01-11-2021

The error is too generic and does not tell you exact problem. What you need is to find out what is the real issue. If your site is serving a Internal Server Error, this can be caused by a number of things, such as:
  • Errors in .htaccess files
  • Server permission
  • Server timeout
  • Script timeout
  • Or some other Web Server Issues
Normally, a permissions issue on the file (or files) would be one cause of the 500 Internal Server Error. The simple solution is to run chmod 644 on the problem file(s) or chmod 755 on the directories.

Code:
$ sudo chmod -R 777 /"your files location"


The best way to debug the error depends upon the server and what's actually running at the time. Consider some debugging tips to help diagnose and fix common causes of this problem.