undefined var $protocol