delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/07/18/03:36:00

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C90643857C5F
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=yandex.ru
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=anrdaemon AT yandex DOT ru
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
t=1595057702; bh=YOsozb2wuRmxK0NllTmtyFjaYbkg3Bo6/lUelDAv6tM=;
h=In-Reply-To:Subject:To:From:Message-ID:References:Date:Reply-To;
b=lfhbWm6XoYHM+A4wjIY+bcdMiVhRn9kxikk3ut+TIR3zXgnaXUkyqdYPgTFvUUrGW
3/gaya9PoeijyhC9XdPnmcLcCcTd0U0DEc/2hzqtdaUTk4q1EqQyLgC15Y1/nZbw9j
yQmcs4LyvXZ5ix/z5TCP9/8wU/aDwgWjICOncSBw=
Authentication-Results: mxback10j.mail.yandex.net;
dkim=pass header.i=@yandex.ru
Date: Sat, 18 Jul 2020 10:29:25 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
X-Mailer: The Bat! (v6.8.8) Home
X-Priority: 3 (Normal)
Message-ID: <84839383.20200718102925@yandex.ru>
To: km2z7kca0oge--- via Cygwin <km2z7kca0oge AT opayq DOT com>, cygwin AT cygwin DOT com
Subject: Re: Cygwin PHP (all available versions) has a hard 4MB memory limit
In-Reply-To: <1869633229.76476.1595021996652@smtp4.opayq.com>
References: <1869633229 DOT 76476 DOT 1595021996652 AT smtp4 DOT opayq DOT com>
MIME-Version: 1.0
X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
Note-from-DJ: This may be spam

Greetings, km2z7kca0oge--- via Cygwin!

> 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.
> ```

#!/usr/bin/env php
<?= file_get_contents(__FILE__);
phpinfo(1);
echo ini_get('memory_limit'), "\n";
print number_format(strlen(file_get_contents('/c/var/backup/backup-2020-07-18.rar')));
phpinfo()
PHP Version => 7.3.7

System => CYGWIN_NT-6.1-7601 daemon2 3.1.5-340.x86_64 2020-06-01 08:59 UTC x86_64
Build Date => Jul 21 2019 16:57:32
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php-cli.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/00-core.ini,
/etc/php.d/00-date.ini,
/etc/php.d/00-mail.ini,
/etc/php.d/10-Cygwin.ini,
/etc/php.d/10-mbstring.ini,
/etc/php.d/20-intl.ini,
/etc/php.d/20-openssl.ini,
/etc/php.d/20-phar.ini,
/etc/php.d/20-session.ini,
/etc/php.d/20-tidy.ini,
/etc/php.d/20-timezonedb.ini,
/etc/php.d/bcmath.ini,
/etc/php.d/bz2.ini,
/etc/php.d/calendar.ini,
/etc/php.d/ctype.ini,
/etc/php.d/curl.ini,
/etc/php.d/exif.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/ftp.ini,
/etc/php.d/gd.ini,
/etc/php.d/gettext.ini,
/etc/php.d/gmp.ini,
/etc/php.d/iconv.ini,
/etc/php.d/imap.ini,
/etc/php.d/intl.ini,
/etc/php.d/json.ini,
/etc/php.d/ldap.ini,
/etc/php.d/opcache.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_odbc.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/posix.ini,
/etc/php.d/shmop.ini,
/etc/php.d/simplexml.ini,
/etc/php.d/soap.ini,
/etc/php.d/sockets.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/sysvmsg.ini,
/etc/php.d/sysvsem.ini,
/etc/php.d/sysvshm.ini,
/etc/php.d/tidy.ini,
/etc/php.d/tokenizer.ini,
/etc/php.d/wddx.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlrpc.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zip.ini,
/etc/php.d/zlib.ini

PHP API => 20180731
PHP Extension => 20180731
Zend Extension => 320180731
Zend Extension Build => API320180731,NTS
PHP Extension Build => API20180731,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => https, ftps, php, file, glob, data, http, ftp, compress.bzip2, compress.zlib, zip, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.7, Copyright (c) 1999-2018, by Zend Technologies
-1
642,477,327

> 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.

More info is needed.


-- 
With best regards,
Andrey Repin
Saturday, July 18, 2020 10:28:03

Sorry for my terrible english...

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019