Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik can’t be installed on PHP7 due to the removal of $HTTP_RAW_POST_DATA #8812

Closed
jonnybarnes opened this issue Sep 17, 2015 · 7 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@jonnybarnes
Copy link

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
Copy link
Author

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
Copy link
Author

Made a PR #8823 to hopefully fix this

@mattab
Copy link
Member

mattab commented Sep 20, 2015

Thanks for the report. will be fixed in #8706

@mattab mattab added this to the 2.15.0 milestone Sep 20, 2015
@mattab
Copy link
Member

mattab commented Sep 22, 2015

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

@mattab mattab closed this as completed Sep 22, 2015
@mattab mattab mentioned this issue Sep 22, 2015
11 tasks
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Oct 13, 2015
@extrablind
Copy link

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
Copy link
Member

tsteur commented Sep 4, 2017

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

@extrablind
Copy link

@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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

4 participants