Trying to get PDO to work

Not 100% sure these fixes work I know some dont, will update when we
have a solution