a 500 server error message is a vague error, sometimes, you can get the real erro by adding the following code at line 1 of the page where the error is occuring, in this case pp_confirm.php:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
once we know the real error, we can have a better idea of the cause.