Fixed PHP, MySQL and permission errors.