小草根

解决Discuz X3.3 X3.2 UC通信失败disable_functions =,fsockopen pfsockopen函数被...

作者:小草根   发布时间:2014-09-10 17:22   回复数:1   浏览数:773
小草根
7731小草根管理员
2014-09-10 17:22:38
7731 2014-09-10 17:22:38
话题: 通信
修改位置:/uc_server/model/misc.php

第95行左右,
                if(function_exists('fsockopen')) {
                        $fp = @fsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
                } elseif (function_exists('pfsockopen')) {
                        $fp = @pfsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
                } else {
                        $fp = false;
                }

替换成:

                if(function_exists('fsockopen')) {
                        $fp = @fsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
                } elseif (function_exists('pfsockopen')) {
                        $fp = @pfsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
                } elseif(function_exists('stream_socket_client')) {
                       $fp = @stream_socket_client($ip.':'.$port, $errno, $errstr, $timeout);
               } else {
                        $fp = false;
                }








小草根
沙发小草根管理员 2014-09-10 17:24
如果主机的话,把这两个函数从php.ini的这行中去掉

disable_functions =

留空即可!
游客
登录后才可以回帖,登录 或者 注册