万网虚拟主机搭载wecenter邮箱问题

WeCenter 是一款知识型的社交化开源社区程序,专注于企业和行业社区内容的整理、归类、检索和再发行。

官网地址:http://www.wecenter.com/

由于阿里云虚拟主机禁用了stream_socket_client函数,所以直接部署会出现如图情况,无法点击下一步

万网虚拟主机搭载wecenter邮箱问题_第1张图片
部署

但是可以通过修改/instal/index.php以及\system\Zend\Mail\Protocol\Abstract.php这两个文件实现邮箱功能。

直接上代码
index.php部分将

if (function_exists('stream_socket_client'))
{
$system_require['stream_socket_client'] = TRUE;
}

替换为

if (function_exists('fsockopen'))
{
$system_require['fsockopen'] = TRUE;
}

abstract.php部分将

public function __construct($host = '127.0.0.1', $port = null)

中的127.0.1替换为数据库主机地址

$this->_socket = (function_exists('stream_socket_client')) ?
@stream_socket_client($remote . ':' . $port, $errorNum, $errorStr, self::TIMEOUT_CONNECTION)
: @fsockopen($remote, $port, $errorNum, $errorStr, self::TIMEOUT_CONNECTION);

注释掉
添加一行代码

$this->_socket = fsockopen($remote, $port, $errorNum, $errorStr);

可参考下图


参考

ps:

万网虚拟主机搭载wecenter邮箱问题_第2张图片
参考配置

你可能感兴趣的:(万网虚拟主机搭载wecenter邮箱问题)