support

Author Topic: Deprecated error for php.ini  (Read 9630 times)

Offline ehon

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Deprecated error for php.ini
« on: June 14, 2016, 07:54:25 AM »
I get this message these days.
"Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
{"success":true}   "

I checked my php.ini file, but I don't know what I should do...
My php.ini file is
;Use this file for specific PHP settings on your server required for AbanteCart.

output_buffering = 4096;
magic_quotes_gpc = Off;
register_globals = Off;
default_charset   = UTF-8;
memory_limit = 128M;
max_execution_time = 18000;
upload_max_filesize = 100M;
safe_mode = Off;
mysql.connect_timeout = 20;
session.use_cookies = On;
session.use_trans_sid = Off;
session.gc_maxlifetime = 12000000;
apc.enabled = 0;

The file type said "UNKNOWN file", so I believe I need to rename it. What file name I should use it?

Thank you for reading my message and I hope I can fix the problem soon!

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Deprecated error for php.ini
« Reply #1 on: June 14, 2016, 09:25:01 AM »
What version of AbanteCart do you have? There is no HTTP_RAW_POST_DATA in AbanteCart 1.2.7

If this is for older versions or other PHP, just add below line to you php.ini file

always_populate_raw_post_data=-1

“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline ehon

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Deprecated error for php.ini
« Reply #2 on: June 14, 2016, 09:50:55 AM »
Thank you for your reply.
I upgraded to 1.2.7 by manually. I'm not sure it is done or still I'm 1.2.6...
I did what I need to do for the upgrade, (I follow the manual step by step) and I don't see any error message except the one I posted.
So if I get this message now,does it mean my upgrade was failed?

Offline ehon

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Deprecated error for php.ini
« Reply #3 on: June 14, 2016, 03:14:55 PM »
I added the line in php.ini, but I still get same message...

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2064
  • Karma: +326/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Deprecated error for php.ini
« Reply #4 on: June 15, 2016, 08:09:39 AM »
$HTTP_RAW_POST_DATA used by some extension.
Should to replace it with this
file_get_contents("php://input");
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline ehon

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Deprecated error for php.ini
« Reply #5 on: June 15, 2016, 11:44:39 AM »
Thank you for your advice.
My host server helped me to fix the problem, and now error is gone.

 

Powered by SMFPacks Social Login Mod