Usually on the production server are error messages turned off.
So if your script generates an error and therefore terminates, nothing will be displayed.
For resolving this problem, just turn on error displaying while debugging this error:
Note that this error reporting setting is not recommended, because is not safe to displaying innards of your web application to third parties.
I have once spent 1 hour of my life complaining (and binary searching) my error because of not knowing this information.
Recently, I forgot about this a spend this hour once again 🙂
I hope that this piece of information will save your time and your nerves too 🙂