No announcement yet.

lsapi:notice -- PHP deprecated

  • Filter
  • Time
  • Show
Clear All
new posts

  • lsapi:notice -- PHP deprecated

    mod_lsapi delivering PHP deprecation notices

  • #2
    Since the latest mod_lsapi upd ate on my cPanel servers (from last night), Im seeing a lot of these lsapi notices in my Apache error logs:

    [Tue Oct 18 11:34:36.945203 2016] [lsapi:notice] [pid 213887:tid 139843547895552] [client] [host] Backend log: PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning se t always_populate_raw_post_data to -1 in php.ini and use the php://input stream instead. in Unknown on line 0
    , referer:
    Whats up with this? Im seeing this on many Wordpress sites [Wordpress sites that really shouldnt / arent likely to have outdated plugins].



    • #3
      We are sure the issue is not related to lsapi update, most probably some php packages has been updated also.

      What alt-PHP version is used for the domain?


      • #4
        Are you really really sure?

        One machines yum update:
        Oct 13 01:30:14 Updated: kernelcare-2.8-3.x86_64

        Oct 18 01:30:21 Updated: liblsapi-1.0-16.el6.cloudlinux.x86_64
        Oct 18 01:30:21 Updated: liblsapi-devel-1.0-16.el6.cloudlinux.x86_64
        Oct 18 01:30:21 Updated: mod_lsapi-1.0-16.el6.cloudlinux.x86_64
        Oct 18 01:30:23 Updated: kernelcare-2.8-4.x86_64
        - I started getting those notices at 01:31

        Another machines yum update:
        Oct 13 04:55:06 Updated: ipa-python-3.0.0-50.el6_8.3.x86_64

        Oct 18 04:55:01 Updated: liblsapi-1.0-16.el6.cloudlinux.x86_64
        Oct 18 04:55:02 Updated: liblsapi-devel-1.0-16.el6.cloudlinux.x86_64
        Oct 18 04:55:02 Updated: mod_lsapi-1.0-16.el6.cloudlinux.x86_64

        - I started getting those notices at 04:55

        So this directly relates to the nightly upcp being run and the above versions of liblsapi/mod_lsapi being installed.



        • #5
          I apologize. I didnt answer your actual question. Alt-PHP 5.6. 97% of the accounts on my servers run Alt-PHP 5.6



          • #6
            Quite strange. I have tested it on our servers and with 5.6 alternate version I see it is set to always_populate_raw_post_data=-1 with phpinfo() page.

            Even more, every version is set to -1:

            # grep raw_post /opt/alt/php*/etc/php.ini -Rs
            /opt/alt/php44/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php51/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php52/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php53/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php54/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php55/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php56/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php70/etc/php.ini:always_populate_raw_post_data = -1
            /opt/alt/php71/etc/php.ini:always_populate_raw_post_data = -1
            Can you confirm the same?


            • #7
              Hi Bogdan,

              On all four of my machines (and seven of my buddys machines) , /opt/alt/php*/etc/php.ini:always_populate_raw_post_data = On BUT is commented out.

              (all commented out)
              /opt/alt/php44/etc/php.ini:;always_populate_raw_post_data = On
              /opt/alt/php51/etc/php.ini:;always_populate_raw_post_data = On
              /opt/alt/php52/etc/php.ini:;always_populate_raw_post_data = On
              /opt/alt/php53/etc/php.ini:;always_populate_raw_post_data = On
              /opt/alt/php54/etc/php.ini:;always_populate_raw_post_data = On
              /opt/alt/php55/etc/php.ini:;always_populate_raw_post_data = On
              /opt/alt/php56/etc/php.ini:;always_populate_raw_post_data = On
              /opt/alt/php70/etc/php.ini:;always_populate_raw_post_data = On

              And if I check PHP info for any site, it shows:

              always_populate_raw_post_data 0

              I guess I can go through and manually change it to -1 and uncomment in each PHP.INI. Id hope that doing this doesnt break some script of my customers though.

              Im running alt-php56-5.6.27-1.el6.x86_64 for PHP 5.6



              • #8
                Yes, changing it to -1 should do the trick. By the way, much faster is to use /etc/cl.selector/global_php.ini that will force directive to all this alt-phpXX php.ini files.

                I tried reproducing the issue downgrading lsapi but was not able to do it. The lsphp binary itself do not depends on lsapi, however I see it is 0 built in:

                # /opt/alt/php56/usr/bin/lsphp -n -i | grep raw
                always_populate_raw_post_data => 0 => 0
                So, going to create a bugreport to change it to -1 hardcoded, if not set via php.ini files.


                • #9
                  I edited /etc/cl.selector/global_php.ini and added:

                  always_populate_raw_post_data = -1

                  I then ran:

                  /usr/sbin/cagefsctl --setup-cl-selector
                  cagefsctl --rebuild-alt-php-ini
                  service httpd restart

                  Some accounts show -1 in phpinfo and some accounts show 0. All accounts are caged and running alt-php-5.6. Strange.

                  Anyway, this did take care of all of the warnings being generated in the error_log