Fixing global variables; adding php configuration in .htaccess; removing warnings and notice