How long it takes when the 500-error comes up? If pictures are uploaded but the script doesn’t get run fully, I would think that the max_execution_time and/or max_input_time has been reached. Have you tried to increase those values? And when you put the customized php.ini on your webspace, have you tried to look into phpinfo() in modx manager to see if the values are what you set them to be?
"He can have a lollipop any time he wants to. That's what it means to be a programmer."