PHP Fatal error: Allowed memory size of 41943042 bytes exhausted