HowTO increase the attachment file size limit in webmail and other PHP apps

Problem: When I upload a file attachment I keep getting the following error:

Max file size of 2097152 bytes exceeded...

Solution: By default PHP limits the file size a user can post via a php form and upload via a php form.  To increase the file size limit you need to login as root and edit your /etc/php.ini file to increase the default values of the following lines and restart httpd.  Here are my recommended changes to increase the limit to 10M and then increase the servers ability to handle the larger attachment size without timeouts or memory errors:

[root@e-smith /root]# pico /etc/php.ini

# Settings to increase PHP webmail attachment size
post_max_size = 10M
upload_max_filesize = 10M
max_execution_time = 1800
memory_limit = 100M

Then restart httpd:

/etc/rc.d/init.d/httpd-e-smith restart