se il codice è tutto qui manca la connessione al database, cmq prova a mettere erro_reporting a E_ALL ciao