MyBB Community Forums

Full Version: You can upload Max File Size 2.1 MB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I have added mp4 MIME aswell and when I add 8MB video its saying this error.

Error: You can upload Max File Size 2.1 MB

[Image: 0065f501c3.png]

[Image: cd703a2679.png]

Edit: Its now allowing to upload big size attachment but now saying file extension is not valid. Even its added in attachment file extensions.

Extension: mp4

How to fix it ?

Regards.
Your upload_max_filesize is limited to 2MB in php.ini
Please contact your hoster if you don't have access to the php.ini
Alternativly you can overwrite the values from the php.ini with entries in the .htaccess. But not every hoster allows this.
(2023-07-05, 01:43 PM)Schnapsnase Wrote: [ -> ]Your upload_max_filesize is limited to 2MB in php.ini
Please contact your hoster if you don't have access to the php.ini
Alternativly you can overwrite the values from the php.ini with entries in the .htaccess. But not every hoster allows this.

<IfModule php7_module>
  php_flag display_errors Off
  php_value max_execution_time 200
  php_value max_input_time 60
  php_value max_input_vars 1000
  php_value memory_limit 128M
  php_value post_max_size 100M
  php_value session.gc_maxlifetime 1440
  php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
  php_value upload_max_filesize 100M
  php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
  php_flag display_errors Off
  php_value max_execution_time 200
  php_value max_input_time 60
  php_value max_input_vars 1000
  php_value memory_limit 128M
  php_value post_max_size 100M
  php_value session.gc_maxlifetime 1440
  php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
  php_value upload_max_filesize 100M
  php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit


Its all set to 100MB but still same error on front end.
(2023-07-05, 03:13 PM)jkcool Wrote: [ -> ]Its all set to 100MB but still same error on front end.

These are .htaccess directives.
Not every hoster allows overwriting php.ini using .htaccess directives.
Contact your hosting provider about this.
*snip*
Bad reading Smile
Fixed.
(2023-07-06, 08:42 AM)jkcool Wrote: [ -> ]Fixed.

For the benefit of others with a similar problem reading this thread much later, what was the fix?
(2023-07-06, 10:00 AM)HLFadmin Wrote: [ -> ]
(2023-07-06, 08:42 AM)jkcool Wrote: [ -> ]Fixed.

For the benefit of others with a similar problem reading this thread much later, what was the fix?

Override the php settings on htaccess.