simonsays Posted September 6, 2018 Share Posted September 6, 2018 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? Link to comment Share on other sites More sharing options...
simonsays Posted September 6, 2018 Author Share Posted September 6, 2018 (edited) wire()->addHookBefore('InputfieldFile::processInputAddFile', function($event) { print 1;exit; }); Tried to add hook to site/ready.php, but it is not working... Edited September 6, 2018 by simonsays wrong file Link to comment Share on other sites More sharing options...
horst Posted September 6, 2018 Share Posted September 6, 2018 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! 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now