It seems that there is some output occurring on the checkout success page on line 194. I think this might be the main cause of the problem you are experiencing. You can't have session start and regenerate id after headers have been sent or output has occurred. It might be a white space character new line 194. If possible please post back with the page in question so that we can look at all these lines of code to see what the problem may be.