I hadn't updated the PHP version from 5.2 so I updated to PHP 5.6 and It has solved part the issue.
Now it enters the the Sandbox test environment OK. Unfortunately it isn't processing correctly.
So I make the payment using a 'buyers sandbox test account' and once submitted it directs to 'pp_confirm.php' ( which is the page in the return URL in the 'confirm.php' file.
But I get this error message displayed in the browser:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Wilshire,Spitalfields Arts Market, 112 Brick Lane,,NULL,London,London,E1 6RL,GB,' at line 1"
I refresh the browser and then get the checkout-failure page with strange results in the dump session ( see attached file ).
But what is strange is that if I swipe back it brings up the 'Payment has complete page'. I check the Sandbox accounts and the payment has gone through.
I wondered if I should be directing to the pp_confirm page and not the success page so I tried this and changed the return URL in the confirm.php file to the checkout_success.php page. It redirected fine and displayed the cart receipt. but the payment did not process in the sandbox accounts.
I'm now very confused.