@jonnybarnes opened this Issue on September 17th 2015

In particular I think what that means is ini_get('always_populate_raw_post_data') returns a bool value of false even if the php.ini contains the line always_populate_raw_post_data = -1.

So now the installer won’t let me get past the system check screen and is telling me to add the aforementioned line to my .ini file. In fact it already is!

@jonnybarnes commented on September 18th 2015

So it must be this file: https://github.com/piwik/piwik/blob/b95837534c6fc4c9dd63eef2c2e9d8bb343ca23e/plugins/Diagnostics/Diagnostic/PhpSettingsCheck.php

On my local machine I have the following setup:

➜  ~  php --version
PHP 7.0.0RC3 (cli) (built: Sep 17 2015 15:28:52) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
➜  ~  php -i | grep "Loaded Configuration"
Loaded Configuration File => /usr/local/lib/php.ini
➜  ~  cat /usr/local/lib/php.ini | grep always_populate_raw_post_data
always_populate_raw_post_data = -1
➜  ~  cat ini_get.php 
<?php

var_dump((int) ini_get('always_populate_raw_post_data'));
➜  ~  php ini_get.php 
int(0)

So with PHP7, even with the value set to -1 in the .ini file, the check will never match.

Indeed I’ve just tested the same code on a machine running PHP 5.6.13 and get:

$ php ini_get.php                      
int(-1)
@jonnybarnes commented on September 18th 2015

Made a PR #8823 to hopefully fix this

@mattab commented on September 20th 2015 Owner

Thanks for the report. will be fixed in #8706

@mattab commented on September 22nd 2015 Owner

fixed in latest Piwik beta - can you try again? http://piwik.org/faq/how-to-update/faq_159/

please post post your feedback re: PHP7 in: #8689

@extrablind commented on September 4th 2017

Hello,
Is this merged in the current version (3.0.4) ? Because same problem here
Both cli and apache php.ini set right. Can't setup Piwik.

Thanks !

@tsteur commented on September 4th 2017 Owner

Yes this is merged and Piwik is supposed to be fully working on PHP 7.

@extrablind commented on September 4th 2017

@tsteur : Thanks for your answer.
My mistake here, sorry, two versions of php on my server, so I was editing the wrong file.
Always look at the human error before checking breakdown... ;)
Thanks !

This Issue was closed on September 22nd 2015
Powered by GitHub Issue Mirror