Just an update in case this might help anybody in the future. This problem was being caused by a PHP memory issue on the server. It was set at -1 (no memory limit). Once I changed it to 1024Mb the problem was resolved. Over a whole day wasted trying to resolve this!
The following users have thanked you: Sam Mahoney, Kittike