I dont know what the problem was but after I reinstalled LAMP its working fine. I noticed that mysql stopped responding after a few days (even doing sudo service mysql restart was returning errors).
thanks but i still have this problem is it just not serving the theme?