Does anyone knows how in php I could upload a large file (8 mb)? Besides setting the php.ini in the server. I can upload an image or file in my server as long as it is not greater than 2 mb. Any ideas?
The maximum filesize you can upload is limited by three PHP settings: max_execution_time (for slow connections mostly), post_max_size, and upload_max_filesize.
max_execution_time can only be set in php.ini.
However, the other two can be set on a per-directory basis. If you are running PHP as an Apache module, then you can override the php.ini settings in a .htaccess file. Take a look here:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.