In terms of PHP, the strange thing here is you didn't get any errors (at least in logs). The default behaviour in webhosts is having PHP "display_errors" to off (so "blank pages", 500), BUT error_log enabled to some file that is accessible to you.
If nothing is shown at error logs, then you should try setting "error_reporting" to E_ALL and you should see something at logs after executing your PHP code.