I have a project in which a user uploads an image through a form and the server does some thumbnails. The thumbnail making process is very slow so I thought that doing the i
Suggestions:
Close your connection before script terminates as outlined here: http://www.php.net/manual/en/features.connection-handling.php#71172
Generate output in "real time" as explained here: How to echo output in real time, (before script finishes)? (won't work in all environments and the user will still get a loading bar until thumbnails finished to generate)
Start another process that creates the thumbnails for you. If you have the according privileges on the server use system() for that. If you don't have them, create another php script on your server which you call using URL and sockets. Then you can terminate the connection early and keep the script running to generate the thumbnails. Use ignore_user_abort() to stop the thumbnail generation to abort once you abort the tcp connection opened with your socket.