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

1.6k Views Asked by At

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?

3

There are 3 best solutions below

1
On BEST ANSWER

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!

2
On

It is possible that you can do

ini_set("always_populate_raw_post_data",-1)

Instead in your php file

0
On

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!