PHP always_populate_raw_post_data failure

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    PHP always_populate_raw_post_data failure

    I had a previous installation of Zabbix on my server that worked fine, but I've had to reinstall pretty much everything since I updated Ubuntu to 15.04. After installing the frontend and running the installation through the web GUI, this one particular prerequisite keeps failing. Zabbix insists that always_populate_raw_post_data be set to -1 (off). I've looked in /etc/php5/apache2/php.ini, and it's already set to -1. I've tried adjusting this every way I can think of to get a different result (and restarted Apache2 each time), and nothing I do seems to allow it to pass. To be completely fair, I'm pretty new to Linux and PHP, so it's entirely possible the problem isn't anything more than me being an idiot. Has anybody ever run into this problem before, or know how to remedy it?

    #2
    ...and, yeah, I am an idiot. Forgot to take the quotes off. Problem solved!

    Comment


      #3
      Originally posted by floydmulder View Post
      ...and, yeah, I am an idiot. Forgot to take the quotes off. Problem solved!
      I have same problem. How did you fix it? Thanks.

      Comment


        #4
        Please try modify that php.ini. (take the quotes off)

        from:
        Code:
        ;always_populate_raw_post_data = -1
        to:
        Code:
        always_populate_raw_post_data = -1

        Comment


          #5
          php 7.

          In php 7 this line has been remove

          always_populate_raw_post_data "0" PHP_INI_PERDIR PHP_INI_ALL in PHP <= 4.2.3. Available since PHP 4.1.0. Removed in PHP 7.0.

          Does anyone has found a workaround?

          Thank you.

          Comment


            #6
            Found the solution.

            I will leave here this, it's the workaround I found.

            In the file CFrontendSetup.php. This file is in /usr/share/zabbix/include/classes/setup/

            In this file we have to change the value of the version of PHP

            Original code
            Code:
            // check for deprecated PHP 5.6.0 option 'always_populate_raw_post_data'
            if (version_compare(PHP_VERSION, '5.6', '>=')) {
                     $result[] = $this->checkPhpAlwaysPopulateRawPostData();
            After making the change
            Code:
            // check for deprecated PHP 5.6.0 option 'always_populate_raw_post_data'
            if (version_compare(PHP_VERSION, '7.1', '>=')) {
                     $result[] = $this->checkPhpAlwaysPopulateRawPostData();
            And thats all. I have to restart my browser and launch again the setup wizzard.

            Comment


              #7
              Just found this thread helpful, a year after it was posted. Thanks apeyrot!

              Originally posted by apeyrot View Post
              I will leave here this, it's the workaround I found.

              In the file CFrontendSetup.php. This file is in /usr/share/zabbix/include/classes/setup/

              In this file we have to change the value of the version of PHP

              Original code
              Code:
              // check for deprecated PHP 5.6.0 option 'always_populate_raw_post_data'
              if (version_compare(PHP_VERSION, '5.6', '>=')) {
                       $result[] = $this->checkPhpAlwaysPopulateRawPostData();
              After making the change
              Code:
              // check for deprecated PHP 5.6.0 option 'always_populate_raw_post_data'
              if (version_compare(PHP_VERSION, '7.1', '>=')) {
                       $result[] = $this->checkPhpAlwaysPopulateRawPostData();
              And thats all. I have to restart my browser and launch again the setup wizzard.

              Comment


                #8
                thanks

                thanks for this solution

                Comment

                Announcement

                Collapse
                No announcement yet.
                Working...
                X