Ok, I figured it out.
Basically if you’re having similar problems to what I described above, with hostgator server, the solution is to change the version of your PHP to 5.3!
In case of hostgator, all you have to do is put this two lines of code in your .htaccess file:
# Use PHP 5.3
AddType application/x-httpd-php53 .php
Refresh the page, it should be working now!