尝试配置客户端,但登录不上,提示服务器操作失败,请问怎么排查?

回贴
回帖数 1
阅读数 1677
发表时间 2022-06-15 10:54:18
🍿
华山蝶 楼主

诊断网络日志如下:


2022-06-15 10:42:15.47 [INFO] 开始诊断网络问题,服务器地址:http://xxxx.com:11443/,用户名:admin,客户端版本:5.6.0。

log time: 2022-06-15 10:42:15.46
build time: 2022-05-26 08:11
platform: electron
os: win
arch: x64

2022-06-15 10:42:12.46 [ERROR] [HTTP_STATUS_ERROR] 服务器操作失败。
<?php
/* Set the error reporting. */
error_reporting(E_ALL);

/* Start output buffer. */
ob_start();

/* Set front as default mode. */
$runMode = 'front';

/* Check is api mode. */
if(preg_match('/token=[a-z0-9]{32}/i', $_SERVER["QUERY_STRING"])) $runMode = 'api';

/* Check is xuanxuan client mode. */
if(!empty($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'easysoft/xuan.im') !== false) $runMode = 'xuanxuan';

define('RUN_MODE', $runMode);

/* Load the framework. */
$routerFile = (RUN_MODE == 'api') ? '../framework/router.class.php' : '../framework/xuanxuan.class.php';
i n c l u d e $routerFile;

i n c l u d e '../framework/control.class.php';
i n c l u d e '../framework/model.class.php';
i n c l u d e '../framework/helper.class.php';

/* Log the time and define the run mode. */
$startTime = getTime();

/* Clear cookies for api requests. */
if(RUN_MODE == 'api') unset($_COOKIE);

/* Run the app. */
if(RUN_MODE == 'api') $app = router::createApp('xxb', dirname(dirname(__FILE__)));
if(RUN_MODE != 'api') $app = router::createApp('xxb', dirname(dirname(__FILE__)), 'xuanxuan');

/* Load common model. */
$common = $app->loadCommon();

/* Api mode need check entry and set default params. */
if(RUN_MODE == 'api')
{
    $common->checkEntry();
    $config->requestType   = 'GET';
    $config->default->view = 'json';
}

/* Parse request. */
$result = $app->parseRequest();
if(RUN_MODE != 'api' && !$result) die;

/* Check privilege of api. */
if(RUN_MODE == 'api') $common->checkPriv();

/* Load module. */
$app->loadModule();

/* Process api response. */
if(RUN_MODE == 'api')
{
    $output = json_decode(ob_get_clean());
    $data   = new stdClass();
    $data->status = isset($output->status) ? $output->status : $output->result;
    if(isset($output->message)) $data->message = $output->message;
    if(isset($output->data))    $data->data    = json_decode($output->data);
    $output = json_encode($data);

    unset($_SESSION['entryCode']);
    unset($_SESSION['validEntry']);
}

/* Flush the buffer. */
echo helper::removeUTF8Bom(ob_get_clean());


-------------------
Fetch from http://glgsoft.com:11443/serverInfo
    Request:
        Method: POST
        Headers: {"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}
    Response:
        Type: basic
        Status: 502
        OK: 
        Redirected: 
        StatusText: Bad Gateway
        Body: <?php
/* Set the error reporting. */
error_reporting(E_ALL);

/* Start output buffer. */
ob_start();

/* Set front as default mode. */
$runMode = 'front';

/* Check is api mode. */
if(preg_match('/token=[a-z0-9]{32}/i', $_SERVER["QUERY_STRING"])) $runMode = 'api';

/* Check is xuanxuan client mode. */
if(!empty($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'easysoft/xuan.im') !== false) $runMode = 'xuanxuan';

define('RUN_MODE', $runMode);

/* Load the framework. */
$routerFile = (RUN_MODE == 'api') ? '../framework/router.class.php' : '../framework/xuanxuan.class.php';
i n c l u d e $routerFile;

i n c l u d e '../framework/control.class.php';
i n c l u d e '../framework/model.class.php';
i n c l u d e '../framework/helper.class.php';

/* Log the time and define the run mode. */
$startTime = getTime();

/* Clear cookies for api requests. */
if(RUN_MODE == 'api') unset($_COOKIE);

/* Run the app. */
if(RUN_MODE == 'api') $app = router::createApp('xxb', dirname(dirname(__FILE__)));
if(RUN_MODE != 'api') $app = router::createApp('xxb', dirname(dirname(__FILE__)), 'xuanxuan');

/* Load common model. */
$common = $app->loadCommon();

/* Api mode need check entry and set default params. */
if(RUN_MODE == 'api')
{
    $common->checkEntry();
    $config->requestType   = 'GET';
    $config->default->view = 'json';
}

/* Parse request. */
$result = $app->parseRequest();
if(RUN_MODE != 'api' && !$result) die;

/* Check privilege of api. */
if(RUN_MODE == 'api') $common->checkPriv();

/* Load module. */
$app->loadModule();

/* Process api response. */
if(RUN_MODE == 'api')
{
    $output = json_decode(ob_get_clean());
    $data   = new stdClass();
    $data->status = isset($output->status) ? $output->status : $output->result;
    if(isset($output->message)) $data->message = $output->message;
    if(isset($output->data))    $data->data    = json_decode($output->data);
    $output = json_encode($data);

    unset($_SESSION['entryCode']);
    unset($_SESSION['validEntry']);
}

/* Flush the buffer. */
echo helper::removeUTF8Bom(ob_get_clean());



2022-06-15 10:42:15.47 [ERROR] 诊断完成,发现 1 个错误,0 个需要注意的问题。
1个回复
马超 沙发
从报错上来看可能x.php文件中没有被解析,可以在httpd.conf配置文件中增加允许访问x.php
  <Files "x.php">
    SetHandler application/x-httpd-php
  </Files>
如果还有其他疑问, 可以加一下左上角的商务联系方式,商务邀请进群后沟通。
2022-06-15 18:08:11 马超 回帖
联系人
张淑钧/高级客户经理
电话(微信)
13156280939
QQ号码
2082428410
联系邮箱
zhangshujun@chandao.com
返回顶部
张淑钧
高级客户经理
13156280939
2082428410
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。 问题反馈反馈点击这里,让我们聆听您的建议与反馈。