Welcome Guest, Not a member yet? Register   Sign In
localhost is currently unable to handle this request. HTTP ERROR 500
#1

[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?
Reply
#2

(This post was last modified: 04-25-2019, 09:39 AM by php_rocs.)

@zubairoliyat,

What is your controller name? The name of your controller file must begin with a capital letter ( https://codeigniter.com/user_guide/gener...ello-world ).
Reply
#3

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




Theme © iAndrew 2016 - Forum software by © MyBB