萬網(wǎng)虛擬主機(jī)搭載wecenter郵箱問題

WeCenter 是一款知識型的社交化開源社區(qū)程序,專注于企業(yè)和行業(yè)社區(qū)內(nèi)容的整理、歸類、檢索和再發(fā)行。

官網(wǎng)地址:http://www.wecenter.com/

由于阿里云虛擬主機(jī)禁用了stream_socket_client函數(shù),所以直接部署會出現(xiàn)如圖情況,無法點(diǎn)擊下一步

部署

但是可以通過修改/instal/index.php以及\system\Zend\Mail\Protocol\Abstract.php這兩個(gè)文件實(shí)現(xiàn)郵箱功能。

直接上代碼
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替換為數(shù)據(jù)庫主機(jī)地址

$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:

參考配置
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容