2

I'm using php 7.0.17 and I was wondering if anyone would let me know what the recommended configuration for the php.ini file was. I would like to see the complete recommended php.ini file with all settings. I'm using magento 2.1.6 and I have been given various information from different people but here is my current configuration:

max_execution_time = 18000
max_input_time = 300
memory_limit = 50000M
precision = 14
output_buffering = 4096
zlib.output_compression = On
zlib.output_compression_level = -1
3

Also following setting is necessary too.

always_populate_raw_post_data = -1

The PHP always_populate_raw_post_data setting will let PHP always populate the $HTTP_RAW_POST_DATA containing the raw POST data, if set to true (1). Otherwise, the variable is populated only when the MIME type of the data is unrecognised.

  • Why is this necessary and what does it? This info is missing. – Black Oct 30 at 11:27
  • The PHP always_populate_raw_post_data setting will let PHP always populate the $HTTP_RAW_POST_DATA containing the raw POST data, if set to true (1). Otherwise, the variable is populated only when the MIME type of the data is unrecognised. (Can you please upvote answer if you have downvote recently ?) – Kishan Patadia Oct 30 at 11:42
  • You have to put your comment in your post, otherwise I can't upvote. – Black Oct 30 at 11:50
  • I have already replied to your comment. Check previous comments here. – Kishan Patadia Oct 30 at 12:13
  • You have to put your answer to your post. – Black Oct 30 at 12:16
0

Also make sure both your CLI and Web php config files match.

0

A sample php.ini file is provided in the Magento 2 source. This file is a good guide however these setting should be adjusted for your particular codebase and environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.