title: CodeIgniter 500 Internal Server Error
body: <p><strong>ANSWERED! IT WAS A TYPO OMG. Always check EVERY CHARACTER</strong></p>
  
  <p>I have three controllers, <code>Site</code>, <code>Login</code> and <code>Admin</code>. Site and Login work perfectly. I know I am logging in correctly, because I set the "incorrect username" blah blah error message, which shows up if I have incorrect login details. When I log in successfully however, I get a 500 Internal Server Error:</p>
  
  <p><code>HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.</code></p>
  
  <p>Here's the admin controller:</p>
  
  <pre><code>function __construct()
      {
          parent::Controller();
          $this-&gt;isLogged();
      }
  
      function isLogged()
      {
          $isLogged = $this-&gt;session-&gt;userdata('isLogged');
  
          if (!isset($isLogged) || $isLogged != true)
          {
              redirect('login/index');
          }
      }
  
      function index()
      {
          $data['metaDescription'] = 'Admin area of danaemc.com';
          $data['keywords'] = '';
          $data['title'] = 'danaemc :: admin :: home';
  
          $data['main_content'] = 'admin_view';
          $this-&gt;load_view('includes/admin_template', $data);
      }
  </code></pre>
  
  <p>In which where it tries to access <code>index()</code>, the 500 error happens.</p>
  
  <p>If you need more code, let me know in a comment. I hope it is something obvious.</p>