Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top