title: MAMP: HTTP Error 500 from PHP file
body: <p>Getting HTTP Error 500 on a local MAMP server when trying to execute a php file.</p>
  
  <p>All my other pages will run however this one will not so I'm thinking that it maybe something to do with the php settings?</p>
  
  <pre><code>&lt;?php 
  
  // User.class.php
  
  require_once 'DB.class.php';
  
  class User {
  
      public $id;
      public $username;
      public $hashedPassword;
      public $email;
      public $joinDate;
  
      // Takes an associative array with the DB row as an argument.
  
      function __construct($data) {
  
          $this-&gt;id = (isset($data['id'])) ? $data['id'] : "";
          $this-&gt;username = (isset($data['username'])) ? $data['username'] : "";
          $this-&gt;hashedPassword = (isset($data['password'])) ? $data['password'] : "";
          $this-&gt;email = (isset($data['email'])) ? $data['email'] : "";
          $this-&gt;joinDate = (isset($data['join_date'])) ? $data['join_date'] : "";
  
      }
  
      public function save($isNewUser = false) {
  
          $db = new DB();
  
          // Update already registered user.
          if (!$isNewUser) {
  
              $data = array(
                  "username" =&gt; "'$this-&gt;username'";
                  "password" =&gt; "'$this-&gt;hashedPassword'";
                  "email" =&gt; "'$this-&gt;email'";
              );
  
              $db-&gt;update($data, 'users', 'id = '.$this-&gt;id);
  
          }
  
          // Register new user.
          else {
  
              $data = array(
                  "username" =&gt; "'$this-&gt;username'";
                  "password" =&gt; "'$this-&gt;hashedPassword'";
                  "email" =&gt; "'$this-&gt;email'";
                  "join_date" =&gt; "'".date("Y-m-d H:i:s", time())."'"
              );
  
              $this-&gt;id = $db-&gt;insert($data, 'users');
              $this-&gt;joinDate = time();
  
          }
  
          return true;    
  
      }
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>PHP Error Log:</p>
  
  <pre><code>[13-May-2011 23:58:28] PHP Parse error:  syntax error, unexpected ';', expecting ')' in /Applications/MAMP/htdocs/Project/classes/User.class.php on line 35
  </code></pre>