Encountering LimitRequestBody and memory_limit for Gallery

When you are uploading file, you may encounter this error:
"You may need to set LimitRequestBody 16777216 and memory_limit = 64M in /etc/php.ini and /etc/httpd/conf.d/php.conf on your Gallery server"

To solve the issue, change the /etc/php.ini file to
vim /etc/php.ini
upload_max_filesize = 128M

Edit the following as well for /etc/httpd/conf.d/php.conf
vim /etc/httpd/conf.d/php.conf
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 33554432
</Files>