Hello everyone! I'm struggling with this configuration issue because I'm trying to increase the file upload size capacity in the Apache configuration but don't know how to do it exactly. I found this article discussing this but would like to know the correct way to change .htaccess.
https://brightwhiz.com/increase-file-upload-size-apache/
I'm trying to solve the problem of not being able to upload files larger than 5MB in php (laravel), so I found this solution in this article. What is the correct way to configure my .htaccess to do this?
I have tried these configurations
Options -MultiViews -Indexes RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]LimitRequestBody 67108864
Options -MultiViews -Indexes RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]LimitRequestBody 67108864
Theupload_max_filesizeandpost_max_sizesettings inphp.inineed to be changed to support files larger than php's default allowed size.
Setupload_max_filesizeto the maximum size of the file that needs to be uploaded.
Setmemory_limitto the amount of memory required to run the php script, and setmax_execution_timeto the time in seconds required to run the script.