Maxi
September 11, 2017, 6:54pm
#1
Hello, I’m getting this warning in System Check even though I in my php.ini files I have “memory_limit = -1”
On a high traffic website, the archiving process may require more memory than currently allowed. If necessary, change the memory_limit directive in your php.ini file.
After making this change, restart your web server.
Is this an expected bug?
Lukas
(Lukas Winkler)
September 12, 2017, 4:05pm
#2
Hi,
Can you check (with an phpinfo() file) if the config is read? Maybe your webserver is using another php.ini.
Maxi
September 13, 2017, 10:51pm
#3
Thanks @Lukas , I looked in both:
/etc/php5/cli/php.ini
/etc/php5/fpm/php.ini
And both have “memory_limit = -1”
doing “php -i” in terminal shows “memory_limit => -1 => -1”
Lukas
(Lukas Winkler)
September 14, 2017, 2:50pm
#4
Hi,
Can you still try what the php process used by you web server uses?
E.g. By adding a file similar to this one to the public directoy and accessing it via the browser:
<?php
var_dump(ini_get('memory_limit'));
This is what piwik does internally:
/**
* Get php memory_limit (in Megabytes)
*
* Prior to PHP 5.2.1, or on Windows, --enable-memory-limit is not a
* compile-time default, so ini_get('memory_limit') may return false.
*
* @see http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
* @return int|bool memory limit in megabytes, or false if there is no limit
*/
public static function getMemoryLimitValue()
{
if (($memory = ini_get('memory_limit')) > 0) {
// handle shorthand byte options (case-insensitive)
$shorthandByteOption = substr($memory, -1);
switch ($shorthandByteOption) {
case 'G':
case 'g':
return substr($memory, 0, -1) * 1024;
case 'M':
case 'm':