protected function verifyInternalKey()
    {
        // if we are running in stateless mode, there's no need for an IPC key.
        if ($this->isStateless()) {
            $this->setInternalKey('');
              return;
        }

        if (trim($this->getInternalKey()) == '') {
            if (session_id() != '') { /*if programmer already started session, use it*/
                $this->setInternalKey("/tmp/" . session_id());
            } else {
                $this->setInternalKey("/tmp/". $this->generate_name());
            }
        }
    }