Search

Using the regular upload field I'm trying to upload an image of 10.2 MB and I get this error in php error log:

[04-Jul-2012 08:11:31 UTC] PHP Warning:  POST Content-Length of 10752579 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

Any ideas why this happens? PHP limit is set to 20MB, limit from Symphony is set to 20MB as well.

PHP limit is set to 20MB

Which limit did you set? There is upload_max_filesize which is the maximum file size, but the error POST Content-Length suggests you're exceeding post_max_size. Try also setting this:

php_value upload_max_filesize 20M
php_value post_max_size 20M

Hmm, I tried:

<IfModule mod_php5.c>
    php_value post_max_size 20M
</IfModule>

But it didn't work. Perhaps this module is disabled on the server?

Does php_value post_max_size 20M without the <IfModule ...> give you an error?

Yes it gives me an error.

Thanks guys for putting me on the right track.

I just learned how to set php directives from .htaccess. It's clear now that mod_php5 is disabled on production server.

I tested locally, with settings mentioned by @nick, and it's working fine.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details