Hmm, that's a bit odd that it's not giving any errors whatsoever. If you are familiar with php at all you could debug it a bit. Just start towards the top and add these 2 lines:
echo "We made it here";
exit;
Keep moving those 2 lines down until you get the we cannot proceed error. Then if you look at the code the problem would be the call to not_right before your debugging code. That should isolate exactly where the error condition is being met.