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

Comments

Projects
None yet
4 participants
@jonnybarnes

jonnybarnes commented Sep 17, 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

This comment has been minimized.

Show comment
Hide comment
@jonnybarnes

jonnybarnes Sep 18, 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 Sep 18, 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

This comment has been minimized.

Show comment
Hide comment
@jonnybarnes

jonnybarnes Sep 18, 2015

Made a PR #8823 to hopefully fix this

jonnybarnes commented Sep 18, 2015

Made a PR #8823 to hopefully fix this

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Sep 20, 2015

Member

Thanks for the report. will be fixed in #8706

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

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Sep 22, 2015

Member

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

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 Sep 22, 2015

@mattab mattab referenced this issue Sep 22, 2015

Closed

Full PHP7 compatibility #8689

10 of 11 tasks complete

@mattab mattab added the Bug label Oct 13, 2015

@extrablind

This comment has been minimized.

Show comment
Hide comment
@extrablind

extrablind Sep 4, 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 !

extrablind commented Sep 4, 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

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 4, 2017

Member

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

Member

tsteur commented Sep 4, 2017

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

@extrablind

This comment has been minimized.

Show comment
Hide comment
@extrablind

extrablind Sep 4, 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 !

extrablind commented Sep 4, 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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment