Load maximum size in PHP?

Is it possible to upload ~ 100 MB files using PHP?

If so, what changes should happen in the configuration file ( php.ini )?

Sri

+7
php ini uploading
Jul 16 '10 at 9:20
source share
5 answers

The following parameters are relevant:

and, perhaps,

+29
Jul 16 '10 at 9:22
source share

In your php.ini adjust the value:

 file_uploads = On upload_max_filesize = 100M //needs to be in {x}M format 

And allow the size of large posts:

 post_max_size = 100M 
+2
Jul 16 '10 at 9:21
source share

To increase the load using PHP, you have to change several parameters in the php.ini file (upload_max_filesize, max_input_time, memory_limit, max_execution_time, post_max_size). You can find the php.ini file under your PHP installation directory and get more information about the necessary settings here .

+2
Jul 16 '10 at 9:26
source share

You just need to change the server timeout and the maximum file size in the php.ini file.

http://blog.jc21.com/2007-05-03/change-the-maximum-upload-size-with-php/

EDIT: You may not need to change the server timeout, as this will depend on which server you are running on.

0
Jul 16 '10 at 9:22
source share

Just wanted to add that if your project also uses ngnix, you may have to add client_max_body_size 100M; to your nginx.conf, since by default nginx is only 1 MB - in addition to the PHP settings mentioned above. I use the ".user.ini" file at the root level of my projects to change a few parameters that I want to override from the default "php.ini" file.

I use dokku and found it in /etc/nginx/nginx.conf and added an extra line via nano nginx.conf .
I do not use nginx directly, but my buildpack adds it.

Hope this helps someone :)

0
Apr 19 '19 at 19:47
source share



All Articles