Разсинхронизация PHP и Хумулятора достигает 1/3 команд в случайном порядке. (то есть до 1/3 команд не выполняется)
Код: Выделить всё
Connect from PHP to XHE not found. Check XHE and PHP port and connection to xhe.
Код: Выделить всё
Connect from PHP to XHE not found. Check XHE and PHP port and connection to xhe.
Поскольку ошибка пишется (кидает в отладку сообщение) не на каждую команду, а на случайную - то сеть и антивирус тут не при чём.
Тут как раз такой механизм следующий - то, что кидается в панель отладки берется из консоли пхп.Поскольку ошибка пишется (кидает в отладку сообщение) не на каждую команду,
// call a command on the server function call($command,$timeout=-1) { // время обработки комманд if ($timeout==-1) $timeout=XHEBaseObject::$COMMAND_TIME; // call server and return its answer $url = "http://".$this->server."/".$command; if(strlen($this->password)) { if(strstr($url,"&")!=false || strstr($url,"?")!=false) $url .= "&password=".urlencode($this->password); else $url .= "?password=".urlencode($this->password); } $postvars=""; if(strstr($url,"?")) { $indexPost=strpos($url,"?",0); $postvars=substr($url,$indexPost+1,strlen($url)-$indexPost); $url=substr($url,0,$indexPost); } $postvars=$postvars." "; for ($i=0;$i<XHEBaseObject::$COMMAND_TRY_COUNT;$i++) { $headers = array("Content-Type:application/x-www-form-urlencoded"); $cUrl = curl_init(); curl_setopt($cUrl, CURLOPT_URL, $url); curl_setopt($cUrl, CURLOPT_POST, 1); curl_setopt($cUrl, CURLOPT_POSTFIELDS, $postvars); curl_setopt($cUrl, CURLOPT_HTTPHEADER, $headers); curl_setopt($cUrl, CURLINFO_HEADER_OUT, TRUE); curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($cUrl, CURLOPT_TIMEOUT, $timeout); $html=curl_exec($cUrl); curl_close($cUrl); if ($html===false) continue; else break; } // close php if not connect to XHE global $bClosePHPIfNotConnected; global $bWarningPHPIfNotConnected; if ($bClosePHPIfNotConnected===true && $html===false) { echo("\nКомманда $url?$postvars не выполнена.Нет соединения с хуман эмулятором, проверьте совпадение портов и их доступность а также что програма запущена и не зависла.\n"); die("XWeb@exit"); } if ($bWarningPHPIfNotConnected===true && $html===false) echo("Connect from PHP to XHE not found. Check XHE and PHP port and connection to xhe.\nCommand $url?$postvars not runned.\n"); $html = trim($html); return $html; }+ предусмотрено несколько раз отправка - через установку XHEBaseObject::$COMMAND_TRY_COUNT