2016-10-21 5 views
0

간단한 테스트를 사용하여 UI 테스트를 실행 중입니다. 아래는 코드입니다.간단한 테스트에서 HTTPS URL을 열 수 없음

E_WARNING: fclose() expects parameter 1 to be resource, boolean given in /home/okhatav/PHP/simpletest/socket.php on line 255 Exception 1! Unexpected PHP error [fclose() expects parameter 1 to be resource, boolean given] severity [2] in [/home/okhatav/PHP/simpletest/socket.php line 255] in testWeAreTopOfGoogle in TestOfRankings 1) Error reading socket [Cannot open [ua-useast1a01-01-internalip.qa.host.net:443] with [] within [15] seconds] in testWeAreTopOfGoogle in TestOfRankings FAILURES!!!

+1

브라우저 창에 해당 URL을 넣으면 서버를 찾을 수 없다고 표시됩니다. – RST

+0

try catch 블록을 사용하면 서버가 존재하지 않습니다. – KDOT

+0

이 URL은 유효한 URL이며 작동합니다. – Omkar

답변

1

내가 simpletest 다운로드 한과 동일한 코드를 실행하고 비슷하지만 약간 더 많은 정보를 메시지받은 :

<?php 
require_once('simpletest/autorun.php'); 
require_once('simpletest/web_tester.php'); 

class TestOfRankings extends WebTestCase { 
    function testWeAreTopOfGoogle() { 
     $this->get('https://ua-useast1a01-01-internalip.qa.host.net/ultraadmin/'); 
     } 
    } 
?> 

나는 오류가 아래 얻고있다

Exception: TestOfRankings -> testWeAreTopOfGoogle -> Unexpected PHP error [fclose() expects parameter 1 to be resource, boolean given] severity [2] in [/var/www/html/simpletest/socket.php line 255]

Fail: TestOfRankings -> testWeAreTopOfGoogle -> Error reading socket [Cannot open [ua-useast1a01-01-internalip.qa.host.net:443] with [php_network_getaddresses: getaddrinfo failed: Name or service not known] within [15] seconds]

이를 지정된 URL이 유효하지 않거나 해결하는 데 문제가 있음을 나타냅니다. URL에 액세스하려고하면 바로 다음과 같은 결과 : 유효한 URL로 변경

enter image description here

가 오류없이 작동합니다.

해당 호스트의 network map을 최근 Dyn attacks의 호스트와 비교하면 거의 완벽하게 정렬됩니다. 호스트에 연락하여 문제를인지하고 있는지 확인할 수 있습니다.