header('Content-type: text/plain') instead of header('Content-type', 'text/plain')
The property jid does not exist.