# Temporarily overriding memory limit in extension

- Thread: https://externals.io/message/26748
- Original archive: https://news-web.php.net/php.internals/26748
- Started by Bruce Bailey on 2006-12-01T17:07:48+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #26748 — Bruce Bailey — 2006-12-01T17:07:48+00:00

URL: https://externals.io/message/26748#26748

Hi

Some of my PHP scripts use a large volume of memory.  Is there a way I can:

1) Increase the script memory limit, and
2) Force a garbage collect at script end (and reset the limit).

I am currently using PHP 5.1.4

Thanks,

Bruce

_________________________________________________________________
Share your latest news with your friends with the Windows Live Spaces 
friends module. 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk

---

## #26750 — Stanislav Malyshev — 2006-12-01T18:11:48+00:00

URL: https://externals.io/message/26748#26750 · In reply to: #26748

> Hi
> 
> Some of my PHP scripts use a large volume of memory.  Is there a way I can:
> 
> 1) Increase the script memory limit, and
> 2) Force a garbage collect at script end (and reset the limit).

 From PHP, I guess you could do ini_set("memory_limit"), unless you are 
running in safe mode.

-- 
Stanislav Malyshev, Zend Products Engineer
stas@zend.com  http://www.zend.com/
