每次fsockopen都会返回fsockopen

时间:2017-07-31 11:42:36

标签: php fwrite fsockopen

我的问题是我想通过fsockopen进行连接,如果服务器在线或不在线,我总是得到返回“资源ID#129”,它没有什么不同。这就是我需要你帮助的原因。这一切都与Wamplab上的SampQueryAPI有关。以下是我的代码的一些片段:

SampQueryApi代码的片段:

$this->rSocket = fsockopen('udp://'.$this->aServer[0], $this->aServer[1], $iError, $sError, 2);

echo $this->rSocket;

我的PHP代码片段

$query = new SampQueryAPI('151.80.79.171', '7778');

Woltlab的错误代码

Mon, 31 Jul 2017 10:58:01 +0000
Message: PHP notice in file /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/data/dashboard/custom/scripts/DashboardCustomBox-23.class.php (46): fwrite(): send of 15 bytes failed with errno=1 Operation not permitted
File: /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/system/WCF.class.php (309)
PHP version: 5.6.31
WCF version: 2.1.12 (Typhoon)
Request URI: /anderes/
Referrer: 
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 OPR/46.0.2597.57
Information: ""
Stacktrace: 
  #0 [internal function]: wcf\system\WCF::handleError(8, 'fwrite(): send ...', '/home/webpages/...', 46, Array)
  #1 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/data/dashboard/custom/scripts/DashboardCustomBox-23.class.php(46): fwrite(Resource id #129, 'SAMP\x97PO\xABb\x1Ep4150')
  #2 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/data/dashboard/custom/scripts/DashboardCustomBox-23.class.php(331): SampQueryAPI->__construct('151.80.79.171', '7778')
  #3 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/data/dashboard/custom/DashboardCustomBox.class.php(59): include('/home/webpages/...')
  #4 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/system/dashboard/box/CustomContentBox.class.php(27): wcf\data\dashboard\custom\DashboardCustomBox->getContent()
  #5 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/system/dashboard/box/AbstractContentDashboardBox.class.php(52): wcf\system\dashboard\box\CustomContentBox->render()
  #6 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/system/dashboard/DashboardHandler.class.php(74): wcf\system\dashboard\box\AbstractContentDashboardBox->getTemplate()
  #7 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/page/DashboardPage.class.php(52): wcf\system\dashboard\DashboardHandler->loadBoxes('com.woltlab.wcf...', Object(wcf\page\DashboardPage))
  #8 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/page/AbstractPage.class.php(276): wcf\page\DashboardPage->assignVariables()
  #9 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/page/AbstractPage.class.php(100): wcf\page\AbstractPage->show()
  #10 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/system/request/Request.class.php(58): wcf\page\AbstractPage->__run()
  #11 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/wcf/lib/system/request/RequestHandler.class.php(139): wcf\system\request\Request->execute()
  #12 /home/webpages/lima-city/artisshop/artisshop.lima-city.de/anderes/index.php(10): wcf\system\request\RequestHandler->handle('wbb')
  #13 {main}

网站上的错误图片:
Picture of the Error on the Website

0 个答案:

没有答案