Search

Apologies if this has already been discussed - I have searched through the forum but can only find posts on increasing the Upload Max Filesize.

I have a section containing a unique upload field. I want the maximum file size to be 1MB.

In .htaccess I have set:

phpvalue uploadmaxfilesize 1M phpvalue postmaxsize 1M

In config.php I have set:

‘maxuploadsize’ => ‘1048576’

I created a page with an upload form, and an event. So far so good - I can upload files less than 1 MB successfully.

If a user attempts to upload a file greater than 1 MB, I need to return to the same page and display an error message to the user.

The problem is that if the file is too big, I get NOTHING in the event XML (/data/event/ is empty), so I can’t show an error. The event itself doesn’t run either, so I can’t check the $_FILES array for errors.

Any ideas?

Thanks, James

Just in case this helps anyone - I resolved the problem by removing

phpvalue postmaxsize 1M

Obvious really - the postmaxsize must exceed the value of ALL POST data..

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