Anyway I can turn off the 500 error? I have a recursive function that is being set to be called a few hundred times if possible, but before that can happen and proceed with the rest of the code it calls a 500 error. (For those interested its a dynamic XML to MySQL script that is set to go how ever many levels deep it needs to.)

Anyway I can force the script to run and not get the 500 error?

Set the display_errors value to off in php.ini config file

display_errors = Off
<?php

error_reporting(0);

?>

I know why it's doing that, too much memory/CPU being used.

Like the above link said, why dont you try with the log files to identify the reason for the error?

I know why, it's using too much memory, same file, same circumstances will run 1/10 times, but 500 9/10 times. Can I change this in Apache or PHP.ini somewhere?

Why you not change your recursive function to utlize the low memory?

Keep some interval for every 50 times