Fix cookie error by not writing PHP that crashes