I have a form with about 25 inputs and the code to process it. The last time the code was edited in any way was 3 weeks ago. I randomly started getting reset connection issues. To investigate, I began cutting out sections of the code to find the guilty sections (cut section, refresh, repeat). Once I narrowed it down to a particular section (one which when I cut it out, the error did not occur), I started to repeat the process with smaller sections of the culprit section. Finally, I had the entire section commented out. Still got the error. Then I deleted the commented out sections and no error!
This leads me to conclude that the error isn't in my code, but some recent change to the configuration of the server (I host with GoDaddy) or something like that. Any suggestions as to what could cause this error? I've never removed comments from code and fixed an error before.
Further information: The form loads correctly initially. Clicking any of the buttons gives me the error, however the code does completely precess before the error (I do some file in/output so I can see that it's working). This even happens with the "Clear All" button which skips the section I mentioned above, and simply reloads the form.
I am using no database interaction whatsoever. The script does utilize both Facebook and twitter APIs.
I really don't know how to proceed from this point. I'm willing to post the code from the entire file if necessary, but my investigation reveals that to be pointless. I can also provide a link to the offending page.
Update: I commented out all the code except the output of the HTML form itself. No processing code at all. Just one function to output the form. Clicking any button causes the connection reset. However if I delete this commented out code, I do NOT get the connection reset, the form just reloads.
Update #2. I uploaded the site to another host. The code runs fine with no issues.
Update #3. After an exhaustive examination, I've determined that the cause of the problem is the following function call:
preg_replace('/\b(\w)/e', 'strtoupper("$1")', $_POST['dessert_name'])
If I comment out this line, I get the connection reset error... If I delete it, the script runs perfectly.