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:
Download the following rpm available from
Charlie Brady's contrib ftp site:
ftp://ftp.e-smith.org/pub/e-smith/contrib/CharlieBrady/RPMS/noarch/e-smith-php-1.5.0-03.noarch.rpm
Install the rpm:
rpm
-Uvh e-smith-php-1.5.0-03.noarch.rpm |
Add these settings into the configuration
database to increase the maximum attachment size to 25MB:
/sbin/e-smith/config setprop php MaxExecutionTime 1800
/sbin/e-smith/config setprop php MemoryLimit 100M
/sbin/e-smith/config setprop php PostMaxSize 25M
/sbin/e-smith/config setprop php UploadMaxFilesize 25M |
Expand the template:
/etc/e-smith/events/actions/conf-php |
Then restart httpd:
/etc/rc.d/init.d/httpd-e-smith
graceful |
|