小编Ama*_*tap的帖子

OrangeHRM:Google oauth在成功授权后重定向到登录页面而不是仪表板

我正在使用opensource OrangeHRM并通过admin登录后,

我去了:

1.  Admin -> Configuration -> Social Media Authentication  
2.  Select Google+ from dropdown.
3. Add Client id, secret, redirect url and saved.  
Run Code Online (Sandbox Code Playgroud)

在登录页面中,如果通过Google登录选项,它提供了一个选择gmail帐户的选项,一旦我选择帐户并允许我的Gmail帐户访问OrangeHRM,它会在成功授权后返回登录页面而不是仪表板.

有没有办法解决它?根据OrangeHRM的一个文档,即用户指南,它说:

 Google Plus -
  This section allows configuring the Google + providers.   
  This section should be enabled from the back end.    
Run Code Online (Sandbox Code Playgroud)

我不确定我是否需要从后端启用任何内容,如果是这样,我应该启用相同的内容和位置?

php oauth symfony orangehrm

21
推荐指数
1
解决办法
1294
查看次数

php curl日本输出乱码

请考虑以下网址: 点击此处

日文字符有一些编码.我的电脑上的Firefox浏览器能够自动检测并显示字符.另一方面,对于Chrome,我必须手动将编码更改为"Shift_JIS"才能看到日文字符.

如果我尝试通过PHP-cURL访问内容,编码的文本会出现像这样的乱码

φîƂȂI݂ȂN`R〜TCgiAbg RXjɂ܂我

我试过了:

  curl_setopt($ch, CURLOPT_ENCODING, 'Shift_JIS');
Run Code Online (Sandbox Code Playgroud)

我也试过(下载卷曲响应后):

  $output_str = mb_convert_encoding($curl_response, 'Shift_JIS', 'auto');
  $output_str = mb_convert_encoding($curl_response, 'SJIS', 'auto');
Run Code Online (Sandbox Code Playgroud)

但这也不起作用.

这是完整的代码

   curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
        'Accept-Language: en-US,en;q=0.5',
        'Connection: keep-alive'
    ));

    //curl_setopt($ch, CURLOPT_ENCODING, 'SJIS');
    curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
    curl_setopt($ch, CURLOPT_TIMEOUT, 20);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $response = curl_exec($ch);
Run Code Online (Sandbox Code Playgroud)

php curl character-encoding

4
推荐指数
1
解决办法
937
查看次数

标签 统计

php ×2

character-encoding ×1

curl ×1

oauth ×1

orangehrm ×1

symfony ×1