I want to increase upload (time) for uploading files [duplicate]

0

I have a script that works great, which uploads multiple images and still inserts watermarks.

The question is this: On the server, I can put 300s in MAX_EXECUTION_TIME, and 30 files to upload. But considering the images can be great, and the internet on the inside is not cool, I usually can not send all of the images for a burst of time.

What do you recommend?

    
asked by anonymous 29.08.2018 / 18:25

1 answer

-1

You can try to increase the runtime via php.ini:

max_execution_time = 600

or in the php file itself

ini_set ('max_execution_time', '600');

Add more memory per run, this can help:

ini_set ('memory_limit', '512M');

If changing this configuration parameter is not possible, you can change the way it sends the files.

Instead of sending all the images together in single SUBMIT you can through javascript upload files separately.

So the user will find that he is sending everything at once, in fact he is sending file by file, which can reduce or eliminate the PHP script execution timeout

    
29.08.2018 / 19:02