Jump to content

Recommended Posts

Posted

Hello,

I am using shared VPS and have access to htaccess. I increased filesize limit to

php_value upload_max_filesize 100M
php_value post_max_size 100M

However, I bump into running out of memory error when uploading really large file.

I am really not excited about increasing memory limit in the .htaccess settings, I'd rather make it conditional and increase it (or use -1) runtime, when admin uploads something.

What would be the best way/place to do it?

Posted (edited)
wire()->addHookBefore('InputfieldFile::processInputAddFile', function($event) {
    print 1;exit;
});

Tried to add hook to site/ready.php, but it is not working...

Edited by simonsays
wrong file
Posted

upload_max_filesize & post_max_size have nothing to do with memory_limit!

try: php_value memory_limit 256M  // or 512M

Also, post_max_size has to be 20 or 30 percent greater then upload_max_filesize!

  • Like 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...