title: Why am I getting a 403 Forbidden error using codeigniter locally?
body: <p>I'm new to Database work and I'm wondering if anyone can help me understand why I keep getting a 403 Forbidden error when I'm simply developing locally. I'm using codeigniter to try to create a simple login program. The other day I had the program working on a different computer but now all I get on this machine is 403 errors when I try to open the "view" or "controller" files in the browser. It must be some setting somewhere but I simply don't know where to look. Any ideas?</p>
  
  <p>Here is my database.php file: </p>
  
  <pre><code>$active_group = 'default';
  $active_record = TRUE;
  
  $db['default']['hostname'] = 'localhost';
  $db['default']['username'] = 'tester';
  $db['default']['password'] = 'tester';
  $db['default']['database'] = 'intranet';
  $db['default']['dbdriver'] = 'mysql';
  $db['default']['dbprefix'] = '';
  $db['default']['pconnect'] = TRUE;
  $db['default']['db_debug'] = TRUE;
  $db['default']['cache_on'] = FALSE;
  $db['default']['cachedir'] = '';
  $db['default']['char_set'] = 'utf8';
  $db['default']['dbcollat'] = 'utf8_general_ci';
  $db['default']['swap_pre'] = '';
  $db['default']['autoinit'] = TRUE;
  $db['default']['stricton'] = FALSE;
  </code></pre>
  
  <p>Here is the controller file welcome.php:</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Welcome extends CI_Controller {
  
      /**
       * Index Page for this controller.
       *
       * Maps to the following URL
       *      http://example.com/index.php/welcome
       *  - or -
       *      http://example.com/index.php/welcome/index
       *  - or -
       * Since this controller is set as the default controller in
       * config/routes.php, it's displayed at http://example.com/
       *
       * So any other public methods not prefixed with an underscore will
       * map to /index.php/welcome/&lt;method_name&gt;
       * @see http://codeigniter.com/user_guide/general/urls.html
       */
      public function index()
      {
          $this-&gt;load-&gt;view('welcome_message');
      }
  
      public function login_form()
      {
          $this-&gt;load-&gt;view('login_form');
      }
  
      public function login_submit()
      {
          print_r( $_POST );
          $this-&gt;load-&gt;model('Usermodel', 'users');
          $match = $this-&gt;users-&gt;authenticate_user( $_POST['email'], $_POST['password'] );
          if( $match )
          {
              echo "User exists in database!";
          }
          else
          {
              echo "Email or password is wrong, bretheren!";
          }
      }
  }
  </code></pre>
  
  <p>And I added the line $autoload['libraries'] = array('database');</p>
  
  <p>I created a database in phpMyAdmin on MAMP to have the database and table as specified by the code so I'm confused why when I run the welcome.php file in the browser, I get a 403 error. It's local so there shouldn't even be a problem with that right? I must be missing a setting somewhere. Any ideas?</p>