I'm currently trying to find a work around to prevent a PHP script from timing out whilst creating a .zip using the ZipArchive class.

I've managed to do this no problem by overriding the max script execution time inside php.ini using set\_time\_limit(). However its not guaranteed that safe mode will be turned off inside php.ini on the servers that the script will be running on and I don't have access to the php.ini file. Is there any other way to stop the script timing out? Can the ZipArchive be run as a background task?