# Windows and Memory Limit of -1

- Thread: https://externals.io/message/30152
- Original archive: https://news-web.php.net/php.internals/30152
- Started by Richard Quadling on 2007-06-13T12:09:02+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #30152 — Richard Quadling — 2007-06-13T12:09:02+00:00

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

Hi.

Are there any special concerns for setting memory_limit to -1 in
PHP.INI on Windows (using Sambar Server, not IIS/Apache).

I'm getting "Out of memory" errors recently. Memory is good.
Admittedly the code is trying to add a 12MG file as an attachment
(using htmlmimemail5 from phpguru.org).

5MG attachments are OK, but the 12MG isn't.

The server is internal so the limit is not required.

Confused.




-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

---

## #30156 — Richard Lynch — 2007-06-13T16:14:25+00:00

URL: https://externals.io/message/30152#30156 · In reply to: #30152

> Hi.
>
> Are there any special concerns for setting memory_limit to -1 in
> PHP.INI on Windows (using Sambar Server, not IIS/Apache).
>
> I'm getting "Out of memory" errors recently. Memory is good.
> Admittedly the code is trying to add a 12MG file as an attachment
> (using htmlmimemail5 from phpguru.org).
>
> 5MG attachments are OK, but the 12MG isn't.
>
> The server is internal so the limit is not required.
>
> Confused.

Is this a production server which might literally be running out of
RAM?...  If so, not much can be done to fix that... :-v

Does the error actually say "out of memory" or "memory limit reached"?
 I *think* you get different error if you are triggering the
memory_limit than, say, really running out of RAM.

Also double-check `phpinfo()` to be sure your memory_limit setting is
what you think it is.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

---

## #30158 — Richard Quadling — 2007-06-13T16:20:48+00:00

URL: https://externals.io/message/30152#30158 · In reply to: #30156

It's an intranet server. I rebooted and it is working. It IS saying
"out of memory"

[13-Jun-2007 11:38:51] PHP Fatal error:  Out of memory (allocated
1572864) (tried to allocate 12729537 bytes) in
C:\PHP\PHP5\Includes\htmlMimeMail5\htmlMimeMail5.php on line 940

[13-Jun-2007 11:40:02] PHP Fatal error:  Out of memory (allocated
1572864) (tried to allocate 12728784 bytes) in
C:\PHP\PHP5\Includes\htmlMimeMail5\htmlMimeMail5.php on line 940

[13-Jun-2007 11:42:04] PHP Fatal error:  Out of memory (allocated
1572864) (tried to allocate 12735907 bytes) in
C:\PHP\PHP5\Includes\htmlMimeMail5\htmlMimeMail5.php on line 940

and `phpinfo()` does show -1 for memory limit.

I must admit it hadn't been rebooted for nearly 2 months.

Wait and see time I think.


>
>
> 
> > […]
>
> Is this a production server which might literally be running out of
> RAM?...  If so, not much can be done to fix that... :-v
>
> Does the error actually say "out of memory" or "memory limit reached"?
>  I *think* you get different error if you are triggering the
> memory_limit than, say, really running out of RAM.
>
> Also double-check `phpinfo()` to be sure your memory_limit setting is
> what you think it is.
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
>
>


-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
