always_populate_raw_post_data=-1 error on a shared server


#1

When I do a system check, I get the above error under the REquired PHP configuration. I uncommented the line in my php.ini file which contains “always_populate_raw_post_data=-1” by removing the semi-colon at the beginning of the line.

However, the next step, restarting the web server, is something I am unable to do as my site, as well as my piwik installation, is on a shared server, and according to justhost, it cannot be restarted.

What do I do now?


#2

You could try an earlier PHP version - 5.4 or 5.5, if your host supports it (it looks like they do: PHP Version Selection - PHP Config). That setting is only relevant with PHP 5.6 in Piwik (see Add system check to enforce always_populate_raw_post_data is -1 on PHP 5.6 · Issue #6468 · matomo-org/piwik · GitHub). And PHP 5.4 is supported by what is to be the Piwik LTS (2.x) branch. (Future Piwik 3.0 will require PHP 5.5 or higher: Drop support for PHP 5.4, require PHP 5.5 · Issue #8156 · matomo-org/piwik · GitHub


#3

My site is running on PHP version 5.4.43, and while im at it, my piwik version is 2.15.0, so apparently its not only relevant with php 5.6


#4

That’s strange. It should only appear with PHP 5.6 - see piwik/PhpSettingsCheck.php at 2.15.0 · matomo-org/piwik · GitHub.

For me, it works with PHP 5.5, but not 5.6 for that reason.


#5

Well, strange as it may seem, its still happening, regardless of any code. So what do i do to get this fixed?


#6

Well, I must apologize, as it seems my site is not running on php 5.4.43 despite my cpanel site “versions” box showing 5.4.43. I went into my Php config from my cpanel, and lo and behold im running PHP 5.6 (Single php.ini) [Beta, check site functionality for compatibility after enabling].
Here is where it gets interesting. To refresh, Im using Piwik version 2.15.0. When I change my php version to any of the three available I have through my cpanel, currently PHP 5.4, PHP 5.4 (Single php.ini), and PHP 5.4 (FastCGI), and im at the dashboard page, I get a 500 server error with a blue reload box and a sad faced one eyed page with a corner dog eared, HOWEVER, if im at the Administration page when i change from version PHP 5.6 to 5.4, I dont get the server error, and the page is just blank, except for the red PIWIK in the upper left corner.

Do i need an earlier version of piwik, before 2.15.0? If so, how do i get it?

Thanks in advance jawsmith


(Matthieu Aubry) #7

whenever you have found a bug in Piwik, make sure to create a bug report on our tracker Issues · matomo-org/piwik · GitHub


#8

Hi @fridgedoctor , sorry for the delay.

When I change my php version to any of the three available I have
through my cpanel, currently PHP 5.4, PHP 5.4 (Single php.ini), and PHP
5.4 (FastCGI), and im at the dashboard page, I get a 500 server error
with a blue reload box and a sad faced one eyed page with a corner dog
eared, HOWEVER, if im at the Administration page when i change from
version PHP 5.6 to 5.4, I dont get the server error, and the page is
just blank, except for the red PIWIK in the upper left corner.

I started writing a response, but then found the same points in the official FAQ: After I updated Piwik, it stopped working (blank page, widgets not loading, error message, etc.). How can I fix this? - Analytics Platform - Matomo. Please try those steps.

But beforehand, as on any other Piwik manipulation, please back up your DB content - e.g. download using the default configuration (SQL format, etc.) in phpMyAdmin. So it can be restored if something goes wrong (e.g. if you wish to go back to an earlier Piwik version, which is not possible if the DB content has been auto-updated to a newer version).

If the issue persists, please try re-installing Piwik (see Installation - Analytics Platform - Matomo) - i.e. delete “config.ini.php” (download it beforehand, so it can be used to look up the values to be used on re-installation), navigate to your Piwik installation and follow the installation steps entering the same values as used before (from your downloaded “config.ini.php”), and selecting “take over existing tables” when prompted. But CAUTION: Do not change the Piwik version on a re-installation. In other words: do not delete “config.ini.php” if updating Piwik (by uploading files of a newer version).

If the issue still persists, please see I get 'Oops... there was a problem during the request.' or 'Internal Server Error' or '500 error' or the 'White screen of death'. How do I proceed? - Analytics Platform - Matomo.

Do i need an earlier version of piwik, before 2.15.0? If so, how do i get it?

You don’t. The minimum requirements haven’t changed since the humble beginnings of Piwik, I think. (While the newer versions have a better support of current PHP versions, etc.) And they won’t for the 2.x branch, which is going to become LTS. They will change for the future 3.x branch though.

Since 2.16.0 is very fresh, I would suggest to go with 2.15.0 until you have a stable installation and 2.16.x cools down a bit. You can get it in https://builds.piwik.org/piwik-2.15.0.zip, if needed. You should also always do any changes on an separate test installation of Piwik first, and test them before doing them on your production installation.

I hope this helps.


#9

User created Piwik Critical Issue RE: always_populate_raw_post_data=-1 in PHP.ini · Issue #9741 · matomo-org/piwik · GitHub.