Request Entity Too Large PHP

Viewed 98967

In one of my CakePHP site, I got this error.

Request Entity Too Large

I don't know what is the problem. I think the data that I am posting through form is too large. I searched this in search engine and got that I will have to increase post_max_size. Be default I think it is set to 8M.

But don't know how to increase post_max_size in CakePHP and what to do for it?

Thanks.

6 Answers

Definitely not CakePHP problem but here are the two settings you need to set in order to upload files properly:

vim /etc/php5/php.ini (or wherever the .ini is located)

And set:

post_max_size="200M"
upload_max_filesize="200M"

Now the tricky part in case you are using HTTPS! you also need to configure one SSL.

vim /etc/apache2/sites-available/<whatever>-443.conf

And set the SSLRenegBufferSize

<Directory /appdata/www/<whatever>/web>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    allow from all
    SSLRenegBufferSize 201048600
</Directory>
Related