In WordPress my client is creating large galleries (300+/- images) and using the WordPress uploader to reorder the images. This can be by filename, or numbers can be applied and sorted ascending/descending etc
He has terrible internet connection speed and when he makes edits to file order they won’t execute correctly – the images will be reordered, but not how he has specified. If I do this for him on my internet connection it works more or less fine – 95% of images are reordered, which is not bad considering the quantity (I’ve told him to use smaller galleries!).
I’m a novice on scripting and database interaction, but it seems to me that due to his poor connection not enough data is sent before the server closes the request and executes. If that assumption was correct how would I go about extending the period of time the server allows to execute this request using PHP or MySQL configuration?
Yes. You can change
max_execution_time
on PHP.ini. It is default to30 seconds
, so any request taking longer than 30 seconds will be interrrupted.It mostly happens when you try to upload a file with PHP and uploader’s upload speed is pretty low so it exceeds the execution duration. PHP will stop and image will be corrupt.
There are different ways to change this value. This question has answers covering the alternatives; Increase max execution time for php
Also, keeping 350 images in a single gallery is overkill. Use paginations.