Thanks, that seemed to do the trick, although I had to change session_commit(); to:
session_write_close(); in a couple more places too.
Now, unfortunately I have a new problem, I used the eCart wizard for SagePay VSP Server and it always goes to the checkout_failure.php page, I can't seem to get it to work. I noticed one other thread on your forum (SagePay / Protx Problems) and they suggested deleting the entries for Billing State and Delivery State as they seemed to cause an error when they were changed to UK counties. I have tried this but it didn't work. I also tried to follow the article "Debugging eCart Transaction Failure issues" but nothing appeared to happen.
Is there anything else I could do?