0

I have read other answers here on stackoverflow, however this is a really weird issue.

My phpinfo() shows that I have set 512M for the post_max_size (I have also increased other properties to at least 512M)

However when I am trying to send post request from Angular HTTP to Laravel 5.2 api, I get 422 Unprocessed Entitym and php_error says:

PHP Warning: Unknown: POST Content-Length of 7323588 bytes exceeds the limit of 3145728 bytes in Unknown on line 0

I have changed both php.ini files,despite only one being loaded.

shabany
  • 799
  • 8
  • 13

2 Answers2

0

Step 1: Go to the folder destination where you have installed WAMP. (Usually it is C:)

Step 2: Now locate and open php.ini files from both these locations. (C:\wamp\bin\apache\Apache2.4.4\bin and C:\wamp\bin\php\php5.4.16)

Step 3: Now in both the documents press CTRL+F and find out the following settings.

  • post_max_size

  • upload_max_filesize

  • memory_limit

For example you will see upload_max_filesize = 2m where m is MB. Change 2m to 500m or more as you like.

Change post_max_size = 8m to post_max_size = 700m or more. Change memory_limit = 8m to memory_limit = 1000m.

Other than that to avoid fatal errors like maximum time of something exceeded in line something, find and change the following values.

max_execution_time = 30 to to max_execution_time = 3000 and max_input_time = 60 to 3000.

enter image description here

Heemanshu Bhalla
  • 3,603
  • 1
  • 27
  • 53
0

This was an interesting problem.

The issue was following:

Yes, I needed to change the post_max_size, however at one point in my php.ini I had it set to 1000M.

My Apache 2.4.9 , and PHP 5.5.12 decided to ignore the suffix M and I ended up with a limit of 1000 Bytes.

My solution was to set post_max_size = 1000000 to have the limit set to 1MB

shabany
  • 799
  • 8
  • 13