mod_lsapi delivering PHP deprecation notices
Announcement
Collapse
No announcement yet.
lsapi:notice -- PHP deprecated
Collapse
X
-
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:
Code:[Tue Oct 18 11:34:36.945203 2016] [lsapi:notice] [pid 213887:tid 139843547895552] [client 71.12.133.86:64318] [host www.blahblahblah.com] 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: http://www.blahblahblah.com/product/discovering-cats-together/
Mike
-
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.
Mike
Comment
-
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:
Code:# 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
Comment
-
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
Mike
Comment
-
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:
Code:# /opt/alt/php56/usr/bin/lsphp -n -i | grep raw always_populate_raw_post_data => 0 => 0
Comment
-
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
Mike
Comment
Comment