PHP Fatal error 3: Allowed memory size of 41943040 bytes exhausted