public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: km2z7kca0oge@opayq.com
To: cygwin@cygwin.com
Subject: Cygwin PHP (all available versions) has a hard 4MB memory limit
Date: Fri, 17 Jul 2020 21:39:49 +0000	[thread overview]
Message-ID: <1869633229.76476.1595021996652@smtp4.opayq.com> (raw)

Hi there,

Recently I've noticed that PHP seems have to hard 4MB memory limit, even when overridden in the settings. For whatever reason the bundled PHP versions with Cygwin have this problem.

The failing message is `Out of memory` which indicates PHP thinks the system has exhausted all RAM (the usual out of memory message is "Fatal error: Allowed memory size of XXX bytes exhausted" when you hit the cap).

If I compile a fresh PHP from source (for example 7.4.8) https://github.com/php/php-src/tree/php-7.4.8 it works absolutely fine.

I've reproduced this on another PC with a fresh install of Cygwin only installing the base PHP as the only extra package.

Example script:
```
<?php

echo ini_get('memory_limit'), "\n";

file_get_contents('http://mirror.cwcs.co.uk/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-dvd1.iso'); // A large file such as an ISO.
```

Output:
$ php test.php
128M
PHP Fatal error:  Out of memory (allocated 4194304) (tried to allocate 2097184 bytes) in /c/Users/JackBlower/tmp-safe/test.php on line 5

Any help would be great thanks.

Many Thanks,

Jack

             reply	other threads:[~2020-07-17 21:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 21:39 km2z7kca0oge [this message]
2020-07-17 22:39 ` Brian Inglis
2020-07-18  7:29 ` Andrey Repin
2020-07-19  2:11 ` Ken Brown
2020-07-21 20:45   ` Ken Brown
2020-08-04  1:57     ` Cary Lewis
2020-08-04 10:45       ` Ken Brown
2020-08-04 13:35         ` Cary Lewis
2020-08-04 13:58           ` Ken Brown
2020-07-18 15:33 km2z7kca0oge
2020-07-18 17:32 ` Brian Inglis
2020-07-18 15:54 km2z7kca0oge
2020-07-21 20:58 km2z7kca0oge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1869633229.76476.1595021996652@smtp4.opayq.com \
    --to=km2z7kca0oge@opayq.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).