# Setting memory_limit fails

- Thread: https://externals.io/message/10941
- Original archive: https://news-web.php.net/php.internals/10941
- Started by Peter Rendl on 2004-07-07T10:24:55+00:00
- Messages: 6
- 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

---

## #10941 — Peter Rendl — 2004-07-07T10:24:55+00:00

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

Hello all,

I just fetched the latest php5 package for win32 from snaps.php.net 
(Built On: Jul 07, 2004 06:30 GMT).

It seems like the ini-setting for memory_limit is ignored and the 
default of 8MB is used instead. This also causes installation of PEAR to 
fail and probably affects bug #29023.

To reproduce:
php -n -d memory_limit=32M -r "$foo = ini_get('memory_limit'); 
var_dump($foo);"
string(2) "8M"

I just wanted to clarify that this is not my mistake, before posting a 
bug report.


Best regards,
Peter

---

## #10942 — Edin Kadribasic — 2004-07-07T11:45:09+00:00

URL: https://externals.io/message/10941#10942 · In reply to: #10941

Memory limit checking is not compiled in on Windows. So bugs must be caused by 
something else.

Edin



> Hello all,
>
> I just fetched the latest php5 package for win32 from snaps.php.net
> (Built On: Jul 07, 2004 06:30 GMT).
>
> It seems like the ini-setting for memory_limit is ignored and the
> default of 8MB is used instead. This also causes installation of PEAR to
> fail and probably affects bug #29023.
>
> To reproduce:
> php -n -d memory_limit=32M -r "$foo = ini_get('memory_limit');
> var_dump($foo);"
> string(2) "8M"
>
> I just wanted to clarify that this is not my mistake, before posting a
> bug report.
>
>
> Best regards,
> Peter

---

## #10943 — Peter Rendl — 2004-07-07T12:21:23+00:00

URL: https://externals.io/message/10941#10943 · In reply to: #10942

Edin Kadribasic wrote:
 > Memory limit checking is not compiled in on Windows. So bugs must be 
caused by
 > something else.

Unfortunately `phpinfo()` does not show compile options for this build.
But http://snaps.php.net/win32/snapshot.log contains this line
"snapshot: forcing memory-limit on". Is it a misinterpretation that this
turns memory limit checking on?

I have an older php version from february available. It returns an empty
string for ini_get('memory_limit') while the current snap gives 8MB.

When installing PEAR I get some errors like this:
Notice: `unserialize()`: Error at offset 8194 of 8192 bytes in...

-Peter

---

## #10945 — Edin Kadribasic — 2004-07-07T12:26:59+00:00

URL: https://externals.io/message/10941#10945 · In reply to: #10943

> Edin Kadribasic wrote:
> > […]
>
> caused by
>
> > […]
>
> Unfortunately `phpinfo()` does not show compile options for this build.
> But http://snaps.php.net/win32/snapshot.log contains this line
> "snapshot: forcing memory-limit on". Is it a misinterpretation that this
> turns memory limit checking on?
>
> I have an older php version from february available. It returns an empty
> string for ini_get('memory_limit') while the current snap gives 8MB.

You have uncovered an error in win32 configure script which is fixed now. The 
next snap should again have memory limit disabled.

Edin

---

## #10946 — Peter Rendl — 2004-07-07T12:44:44+00:00

URL: https://externals.io/message/10941#10946 · In reply to: #10945

Edin Kadribasic wrote:

> You have uncovered an error in win32 configure script which is fixed now. The 
> next snap should again have memory limit disabled.

This is good, thank you.

One more question for my understanding:
Checking the memory limit and setting it, are 2 different things to me. 
Why did "php -n -d memory_limit=32M" not set the limit to 32MB?

-Peter

---

## #10944 — Andrey Hristov — 2004-07-07T14:22:34+00:00

URL: https://externals.io/message/10941#10944 · In reply to: #10943

Peter Rendl wrote:
> Edin Kadribasic wrote:
> > […]
> caused by
> > […]
> 
> Unfortunately `phpinfo()` does not show compile options for this build.
> But http://snaps.php.net/win32/snapshot.log contains this line
> "snapshot: forcing memory-limit on". Is it a misinterpretation that this
> turns memory limit checking on?
> 
> I have an older php version from february available. It returns an empty
> string for ini_get('memory_limit') while the current snap gives 8MB.
> 
> When installing PEAR I get some errors like this:
> Notice: `unserialize()`: Error at offset 8194 of 8192 bytes in...

Oops, is that a new build?

> -Peter
> 

andrey
