So, I'm getting the following error:
Error Number: 2006
MySQL server has gone away
I can all but guarantee this is because the script takes a bazillion minutes to run, and then more queries are run in the middle of the script. Considering this is an admin-only, huge file-writing script, this is to be expected. (and is perfectly acceptable) I think the MySQL connection is getting closed because PHP / MySQL / something isn't holding it open. However, I can't for the life of me figure out how to stop this timeout from occurring!
I have the following at the top of my PHP script, but it doesn't appear to be helping.
ini_set('default_socket_timeout', -1);
ini_set('max_execution_time', -1);
ini_set('memory_limit', -1);
ini_set('mysql.connect_timeout', -1);
Any idea how I can fix this problem? Thanks!