1

I want to process a large XML-File, but when I start my Script I get a

Fatal Error: Allowed Memory Size of *** Bytes Exhausted

Does PHP not clear/override the memory when I start my script again?

AdmiralCrunch
  • 143
  • 11

3 Answers3

0

Just add this code before reading the file:

ini_set('memory_limit', '256M');

Change size according to your need.

akhilp2255
  • 320
  • 3
  • 13
0

You can increase Allowed Memory Size from php.ini file on your server.

Santosh Patel
  • 499
  • 2
  • 13
0

The memory is limited either by your hosting environment or by you php.ini file you may want to try upping this limit, otherwise check with your web host and see how much ram you have been allotted.

ini_set('memory_limit', '32M');