I know this question has been asked numerous times but I\'ve tried everything.
I have a PHP script that iterates through thousands of images, performs resizing if ne
you can use mysql_ping()
to see if the connection still connected, if not you can try to reconnnect, or make an error message telling you how far the script had gone before the connection was lost.
This happens because the PHP script took too long to process whatever it was processing, and the connection to the server timed out. You have a few solutions:
mysql_connect
has built-in functionality to do that for you)mysql_pconnect
(but remember to close the connection at the end because it won't close for you)Check the value of "max_allowed_packet
" in your my.cnf
MySQL config file.