title: time consuming PHP script and the ways to solve the issue?
body: <p>I have a PHP registration form that is very time consuming  from when the user clicks on the submit button to the point that it will force the server to throw out the following error:</p>
  
  <pre><code>Request Timeout
  This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.
  </code></pre>
  
  <p>I have been searching on google for ways to solve this issue and there seems to be a few ways of resolving this. however, I would like to know what is the best way of doing this.</p>
  
  <p>I will explain the steps in the registration form from the when the user clicks the submit button:</p>
  
  <pre><code>step 1- it will checks the mysql database for duplicated data.
  step 2- it will create 2 mysql tables with their columns
  step 3- it will enter the data passed on by the user into the mysql table.
  step 4- it will create a subdomain on my server.
  step 5- it will move some files from one folder on my server into the newly created subdomain. there are alot of files but i don't think this should take that long? I need some advise on this please and what is the best way of doing this?
  step 6- it will send a confirmation email to the user.
  </code></pre>
  
  <p>I can post my code but it is very big so I thought it might bore anyone's reading this question.</p>
  
  <p>at the top of my PHP registration page, I have this line of code but this has no affect:</p>
  
  <pre><code>set_time_limit(0);
  </code></pre>
  
  <p>do you think it is best to use the following code instead? </p>
  
  <pre><code>ini_set('max_execution_time', 300);
  </code></pre>
  
  <p>any advise to solve this issue would be appreciated.</p>
  
  <p>Thanks</p>