Downgraded PHP version and fixed the problems arising from it