首先,先检查贵站转HTTPS后UCENTER会否出现通讯失败,有问题先要修正
然后问题就出在了头像获取上,在uc_client/client.php中,找到
- $path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/';
复制代码 下面增加:
- $matches['port'] = !empty($matches['port'])&&$scheme=='http' ? $matches['port'] : 443;
复制代码 然后找到:
- if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
复制代码 修改为:
- if($port=='443'){
- $temp = 'ssl://';
- }else{
- $temp = 'http://';
- }
- if(!$fp = @fsocketopen($temp.($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
复制代码 至此应该修复了该问题了,如果还没修复,尝试以下方法:
在function uc_check_avatar中找到
- $res = uc_fopen2($url, 500000, ”, ”, TRUE, UC_IP, 20);
复制代码 修改为:
- $res = trim(uc_fopen2(UC_API."/avatar.php?uid=$uid&check_file_exists=1"));
复制代码 原本的call很不稳定,有时候返回不出1,新的这个直接打开url返回数值。 |
|