european_altruist
european_altruist

Reputation: 79

How to set custom value in php.ini (Piwik raw_post_data error)

This is a specific questions regarding fortrabbit in combination with the analyctics platform Piwik.

During the installation I get this error:

[Failed] always_populate_raw_post_data=-1
To prevent some critical issue, you must set the following in your php.ini file: always_populate_raw_post_data=-1
After making this change, restart your web server.

I'm not able to set this value via the dashboard and workarounds don't work either like creating a user.ini with this said value into your Piwik root folder or creating a .htaccess in your Piwik root folder

This might be only an issue with PHP 5.6 see: https://github.com/piwik/piwik/issues/6465

Does anyone has an idea how to solve this issue other than switching back to PHP 5.5?

Upvotes: 0

Views: 1644

Answers (3)

Er Kaustubh Raj
Er Kaustubh Raj

Reputation: 1

First define .htaccess

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/username
<Files php.ini>` 
order allow,deny`
deny from all
</Files>
</IfModule>

----replace username with yours-----

then edit php.ini (first enable post reading)

   ;enable_post_data_reading = on

then,

always_populate_raw_post_data=-1

cheers!

Upvotes: 0

european_altruist
european_altruist

Reputation: 79

I emailed the staff and asked if it is possible that they could set this variable for me.

And yes after only one day the process was done and I could proceed the Piwik installation.

Excellent service!

Upvotes: 0

edi9999
edi9999

Reputation: 20574

It is possible that you can do

ini_set("always_populate_raw_post_data",-1)

Instead in your php file

Upvotes: 0

Related Questions