I recently had to templatize PHP configurations using Ansible and Jinja2. I had to do some research to ensure that the memory directives that were being defined were actually valid. The three directives I was tinkering with were:
These three directives values' are actually tied together. memory_limit is the max amount of memory that a script can consume. upload_max_filesize defines the largest size a file upload can be. post_max_size limits the max size of post data.
It's not until you read the documentation on post_max_size that it is clearly laid out that these three directives are related:
This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should