Question

I have written an application. But there is an issue of memory overflowing. Is there a way to clear all garbage values in PHP 4?

Était-ce utile?

La solution

I think more information about your specific case and environment (I am just guessing that you are running PHP from a web server and not CLI) is needed. And you should look through your entire code yourself for places that can be optimized.

As you probably know, garbage collection is not a part of PHP 4. Check out unset and http://www.obdev.at/developers/articles/00002.html for some pointers.

Autres conseils

If the problem is memory overflow. You can use:

ini_set('memory_limit', '128M'); //or the quantity of memory you need

This will expand the default memory used on the httpd.conf for that script.

Note: I'm not sure if it works on php 4 but, give it a try.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top